# assignProxyToAnAccount

### 🎮 Méthode

```coffeescript
ankabotController:assignProxyToAnAccount(username, ip, port, proxyUsername, proxyPassword, https, enabled)
```

### 📝 Arguments

| Nom           | Type   | Description                    |             |                  |
| ------------- | ------ | ------------------------------ | ----------- | ---------------- |
| username      | string | Nom du compte.                 | Obligatoire |                  |
| ip            | string | Adresse IP du proxy.           | Obligatoire |                  |
| port          | int    | Port d'accès au proxy.         | Obligatoire |                  |
| proxyUsername | string | Utilisateur du proxy.          | Facultatif  |                  |
| proxyPassword | string | Mot de passe du proxy.         | Facultatif  |                  |
| https         | bool   | True = https \| false = Socks5 | Facultatif  | false par défaut |
| enabled       | bool   | Activé ou non.                 | Facultatif  | true par défaut  |

### 💎 Valeur de retour

| Type | Description |
| ---- | ----------- |

### Exemple

Proxy accessible via un username et un password :

```coffeescript
username      = "username1"
ip            = "0.0.0.0"
port          = 8080
proxyUsername = "proxyN1"
proxyPassword = "proxyP1"

ankabotController:assignProxyToAnAccount(username, ip, port, proxyUsername, proxyPassword)
```

Proxy accessible sans username et sans password :

```coffeescript
username = "username1"
ip       = "0.0.0.0"
port     = 8080

ankabotController:assignProxyToAnAccount(username, ip, port)
```

Désactiver le proxy :

```coffeescript
username = "username1"
ankabotController:assignProxyToAnAccount(username, "", 0, "", "", false, false)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.ankabot.dev/mode-controleur/methodes/ankabotcontroller/assignproxytoanaccount.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
