Store SOCKS5 and HTTP proxies in Asterobot, give one to an Ankama account or to a bot, and choose which address Ankama sees each of them come from.
A proxy makes connections leave from another address instead of yours. Asterobot keeps a list of them on the Proxy Manager page, and you give one to an Ankama account, to a bot, or to both. From those two choices, Asterobot works out which proxy each connection goes through.
Two kinds of proxy work: SOCKS5 and HTTP. SOCKS4 proxies don't.
The usual reason to want one is a rented server. When Asterobot runs on a VPS in a datacenter, Ankama's sign-in page often blocks or challenges it, because addresses from datacenters are commonly flagged by the protection in front of that page. A proxy on the account makes the sign-in, and everything else Asterobot asks Ankama for that account, leave from the proxy's address instead.
Accounts and bots
An Ankama account and a bot each have a Proxy setting, and they cover different connections:
- An account's proxy carries everything Asterobot asks Ankama for that account over the web: the automatic sign-in in the browser Asterobot drives, the code exchange that ends any sign-in, token renewals, Verify, and the game login token a bot needs each time it connects.
- A bot's proxy carries the bot's own connections to the Dofus servers: the login server and the game server.
By default a bot uses its account's proxy, so one proxy set on an account covers everything done with it, from the sign-in to playing. You can still force a bot onto another proxy, or onto a direct connection.
| A bot's Proxy choice | The bot's connections go through |
|---|---|
| Same as the account (...) | The account's proxy, named in brackets. When the account has none, the brackets say "direct" and the bot connects directly; a bot with no account connects directly too. This is the default. |
| Always connect directly | No proxy, whatever the account uses. |
| A proxy's name | That proxy, whatever the account uses. |
An account has No proxy (connect directly), the default, or a proxy's name.
What goes through which proxy
| Connection | When it happens | Goes through |
|---|---|---|
| Ankama's sign-in page, in the browser Asterobot drives | An automatic sign-in | The account's proxy |
| The code exchange after a sign-in | Any sign-in, automatic or manual | The account's proxy |
| Token renewals, Verify, Force refresh token and Disconnect | When a Full socket bot connects, and when you click them | The account's proxy |
| The game login token | Each time a Full socket bot connects | The account's proxy |
| The login server | A Full socket bot connecting | The bot's choice |
| The game server | A Full socket bot, or a MITM bot relaying a session | The bot's choice |
| The login server of a relayed session | A MITM bot relaying a session | Direct |
| The game's configuration file and game downloads | A bot connecting, a game version downloading | Direct |
A bot in MITM mode (man-in-the-middle: the bot relays the session of a Dofus client you play) sends only the game server connection through its proxy. The sign-in half of a relayed session travels over two ports that every waiting bot shares, and Asterobot opens them before anything in the traffic says which bot the session belongs to, so at that moment there's no bot to read a proxy from. Your own Dofus launcher signs in from your computer, as it always does: an account's proxy only covers what Asterobot itself sends.
When you sign an account in manually, you open Ankama's page in your own browser, so that visit leaves from wherever your browser is. Only the code exchange that follows goes through the account's proxy. Manual sign-in covers that flow.
Important
With the defaults, a Full socket bot and its account leave from the same address. Force the bot onto another proxy, or onto Always connect directly, and Ankama sees the bot's game login token requested from one address and its game connections coming from another. Decide whether that suits you before you set it up.
Two kinds of proxy
| Type | What it is | Credentials |
|---|---|---|
| SOCKS5 | A SOCKS5 server, often listening on port 1080. | A username and a password, with SOCKS5's own authentication. |
| HTTP | An HTTP proxy that opens tunnels with CONNECT. Providers often sell these as "HTTP/HTTPS proxies". |
A username and a password, sent as Basic authentication. |
Both carry everything Asterobot needs, for accounts and for bots, with one catch on the HTTP side: some HTTP proxies only open tunnels to port 443, the HTTPS port. That's enough for an account, whose requests to Ankama are all HTTPS. It isn't enough for a bot, because the Dofus servers listen on other ports. Test can't reveal it either, since a test is an HTTPS request too. A bot that fails with the HTTP proxy refused to open a tunnel followed by 403 or 405, while Test works, has hit that limit: ask your provider whether other ports are allowed, or give the bot a SOCKS5 proxy.
With either type, the proxy's username and password travel unencrypted from Asterobot to the proxy, as those two protocols define them. What goes through the tunnel is unchanged: Ankama's pages stay HTTPS, end to end.
Store a proxy
- Open Proxy Manager in the sidebar. An empty list says "No proxies stored yet."
- Click Add a proxy.
- Fill in the fields below and click Add.
| Field | Required | What to put in it |
|---|---|---|
| Name | No | How you recognise this proxy when picking it on an account or a bot. Lowercase letters, digits and hyphens, starting and ending with a letter or a digit. Leave it blank and Asterobot generates one; the dice button next to the field fills one in so you can see it and edit it first. It can't be changed later, and it can't be direct, the word a bot uses to connect directly. |
| Type | Yes | SOCKS5 or HTTP, as your provider names it. It starts on SOCKS5. |
| Address | Yes | The host and the port together, as your provider gives them: proxy.example.com:1080. An IPv6 address goes in brackets, [2001:db8::1]:1080. The port has to be between 1 and 65535. |
| Username | No | The username the proxy asks for. Leave it and Password empty for a proxy that needs no credentials. |
| Password | No | The password that goes with the username. It's never shown again after you save it. |
Nothing is contacted while you type, and nothing is contacted when you click Add. A proxy that's down, or whose password is wrong, is stored exactly like a working one. Test, in the same dialog, is what tells the two apart, and storing is deliberately not gated on it: a proxy that happens to be unreachable right now is often the one you're in the middle of fixing.
The name is this proxy's identity for good. Accounts and bots refer to it by that name, so renaming would break them: to change it, add a second proxy and point them at that one instead.
Read the list
| Column | What it shows |
|---|---|
| Name | The name you gave it. Click the header to sort. |
| Address | The host and port, with SOCKS5 or HTTP underneath. |
| Authentication | With credentials when a username or a password is stored, No credentials otherwise. When there is a username, it's shown next to the badge. |
| Used by | The accounts set to use this proxy, each with a person icon, then the bots set to use it by name, each a link to that bot's Settings. A bot that follows its account isn't listed again: the account's entry covers it. Unused when nobody uses it. |
| Last test | What the last test of this proxy found, while this page is open. A dash until you ask. |
The box above the table filters on the name and on the host, so you can search either.
Test a proxy
A test sends one real HTTPS request through the proxy and reports the address the other end saw it come from. That address is the answer: it's what anything reached through this proxy looks like it comes from, so comparing it with your own address is how you know the proxy is genuinely carrying the traffic, rather than merely accepting a connection.
There are three ways to run it, and they're the same test:
- Test in the Add a proxy dialog, before the proxy is stored. Use it to try details you've just pasted in.
- Test in a proxy's menu at the end of its row, for one stored proxy.
- Test all, next to the filter box, for every stored proxy at once. They run together rather than one after another, so a pool of ten takes about as long as one.
Results appear in the Last test column: the exit address and how long the round trip took on success, Failed with the reason in a tooltip otherwise. A failure gives you the reason as Asterobot received it: a refused connection, a rejected password (username/password authentication failed for SOCKS5, the HTTP proxy refused to open a tunnel: 407 Proxy Authentication Required for HTTP), or a host that doesn't resolve. Asterobot gives up after 15 seconds.
Nothing is remembered. Results live only while the page is open, and no badge survives a reload, because a proxy that answered a minute ago is not a proxy that answers now.
Note
Testing a proxy in the dialog while editing an existing one doesn't use the password you saved: Asterobot never sends a stored password back to the browser. The dialog says so under the result. Type the password in again if you want the test to include it.
What the test contacts
The address comes from a service outside Asterobot, set in proxymanager.ipCheckUrl on Server > Config. It starts as https://api.ipify.org?format=json, which answers with your address and nothing else.
Only tests use it, only when you ask for one, and the request carries nothing about you beyond the proxy's own address. Testing does tell whoever runs that service that this proxy exists and works, so point the setting at your own if you'd rather not say so. Asterobot reads an ip field from a JSON answer, or the whole answer when it's a single line, so most such services work unchanged.
Give a proxy to an account
When you add an account in Account Manager, the Add a bot account dialog has a Proxy field under the password. It starts on No proxy (connect directly). Pick a stored proxy instead, or use the + button to store one without leaving the dialog.
For an account that's already stored, open its menu at the end of its row and click Set proxy. The Proxy for ... dialog shows the same field: pick a proxy, or No proxy (connect directly), and click Save. The Proxy column of Account Manager shows each account's proxy, or "direct".
The change applies from the next request Asterobot makes for the account. A bot that's already playing isn't disturbed, and the bots that follow the account use the new proxy from their next connect.
Several accounts can share one proxy, and Asterobot puts no limit on how many. That's how a team of accounts looks like it connects from one network.
Give a proxy to a bot
When you add a bot, the Connection tab has a Proxy field between Server selection and the device identifier. It starts on Same as the account (...), with the account's proxy in brackets once you've picked an account. Keep it there to follow the account, or pick Always connect directly or a stored proxy. The + button stores a new proxy without leaving the form.
An existing bot has the same field on its own page, under Settings, in the Connection section. Changing it needs no disconnection: Asterobot reads the proxy when it opens a connection, so a change applies at the bot's next connect and leaves a running session alone. Click Save as usual.
The Proxy column of Bot Manager shows what each bot actually goes through: a proxy's name, the account's proxy followed by "(account)" when the bot follows its account, or "direct".
Whichever way you set it, picking a proxy shows a reminder under the field of what that proxy carries.
Automatic sign-in through a proxy
When an account has a proxy, the browser Asterobot drives for an automatic sign-in goes through it too. Asterobot doesn't hand the proxy to the browser directly: Chrome can't use a SOCKS5 proxy that has a password, and asks for an HTTP proxy's password in a window nobody is there to fill in. Instead, Asterobot starts the browser pointed at a small relay of its own, on 127.0.0.1, that sends every connection through the account's proxy and closes with the browser. Any proxy that works for a bot works for the browser that way, with or without credentials, and the proxy's password never reaches the browser.
Address lookups go through the proxy as well, and Asterobot starts the browser with WebRTC restricted to connections the proxy carries, so a page can't learn your own address around the proxy.
If the proxy is down, the browser can't load Ankama's page and the sign-in fails with failed to open ankama's sign-in page. Test the proxy first when you see that on an account that has one.
Common setups
| What you want | Account | Its bots |
|---|---|---|
| Run Asterobot on a VPS whose address Ankama's sign-in refuses | A residential proxy | Same as the account |
| Several accounts that look like they connect from one place | The same proxy on each | Same as the account |
| Keep the account's web requests on an expensive proxy and play through a cheaper one | The expensive proxy | The cheaper proxy, by name |
| Try a new proxy on one bot without touching the others | Unchanged | The new proxy on that bot only |
| Use a provider that only sells HTTP proxies | The HTTP proxy | Same as the account, if the provider allows tunnels to the game's ports |
The third setup saves bandwidth, because the web requests of an account weigh a few kilobytes per connect while a game session runs for hours. It's also the setup the warning in What goes through which proxy is about: Ankama sees two addresses for one bot.
Change or remove a proxy
Edit, in the proxy's menu, reopens the same dialog for everything except the name, the type included. The password field is empty because Asterobot never sends a stored password back: leave it empty to keep the one you saved, type a new one to replace it, or tick Remove the stored password to take it off entirely. Like any other change, a new address reaches an account at its next request and a bot at its next connect.
Remove deletes the proxy, and refuses while any account or bot still names it:
proxy "fr-datacenter-1" is still used by bots harvester-one, harvester-two and accounts my-login
Point those accounts and bots somewhere else first, then remove it. The refusal is on purpose. An account or a bot whose proxy disappeared could otherwise carry on from your own address, which is the one thing a proxy is there to prevent.
When a proxy is missing
Removing a proxy in use is refused, so this mostly happens if proxies.toml is edited by hand or restored from an older copy. The account or the bot keeps the name it was given, and Asterobot refuses to connect rather than quietly connecting directly. For a bot:
bot "harvester-one" connects through proxy "fr-datacenter-1": proxy not found: "fr-datacenter-1"
For an account, when you sign it in, verify it, or connect one of its bots:
account "my-login" connects through a proxy that cannot be used: proxy not found: "fr-datacenter-1"
The bot's Settings page, or the account's Set proxy dialog, shows the missing name in the Proxy field, marked as no longer stored, with a warning under it. Pick another choice and save.
Where proxies are stored
Proxies live in proxies.toml, in Asterobot's application data folder, next to bots.toml and accounts.toml. Each account's proxy is saved by name in accounts.toml, and each bot's choice in bots.toml.
The password of each proxy is in proxies.toml in plain text. It has to be: SOCKS5 and HTTP proxies both want it on every connection, so Asterobot needs the password itself rather than a scrambled copy. On Linux and macOS the file is readable only by your own user, and Asterobot applies that again each time it starts and each time it saves. No endpoint ever gives a stored password back, which is why the dialog can't prefill it.
Asterobot reads these files when it starts and rewrites them whenever you change something, so edit them only while Asterobot is stopped.
Limits
- SOCKS5 and HTTP proxies only. SOCKS4 isn't supported.
- An HTTP proxy that only opens tunnels to port 443 can carry an account's requests, but not a bot's game connections.
- One proxy per account and one per bot. Asterobot doesn't rotate proxies, pick one automatically, or fall back to a second one when the first fails.
- In MITM mode, the login server of a relayed session stays direct, and your own launcher signs in from your computer.
- Game downloads and the game's configuration file never go through a proxy.
Where to go next
- Add an account and Account status and actions cover the rest of Account Manager.
- Full socket mode covers connecting a bot that signs in on its own.
- MITM mode explains relaying the game you play.
- Bot settings goes through every field you can change on a bot afterwards.
- Security covers who can reach your Asterobot and what they can do with it.