Skip to content

Guide

How to rotate a proxy's IP with a change-IP link.

On this page

Mobile and some residential proxy providers give each proxy a change-IP link (also called a rotation link). Opening the link makes the provider give the proxy a new exit IP. Donut Browser stores the link on the proxy, calls it when you click Change IP, and exposes the same action in its API, so a script can rotate between tasks. You need a proxy in Donut and its change-IP link from your provider’s dashboard.

  1. Open Network (Cmd/Ctrl+Shift+N) → Proxies.
  2. Open the proxy with Edit proxy, or create one with New proxy.
  3. Paste the link into Change IP link and save.

The link must be a full http:// or https:// address of at most 2,048 characters. Otherwise the form shows “The change IP link must be a full http:// or https:// URL.”

2. Note the current IP

Click the check button in the proxy’s Status column. Connection details shows the exit IP and its location. Keep it, so you can see the change in step 4.

3. Change the IP

Click Change IP. The button is in three places:

  • on the proxy’s row in the Proxies table (only when the proxy has a link),
  • in the action bar when you select several proxies,
  • in the Network section of a profile panel that uses the proxy.

Donut sends a GET request to the link and waits up to 30 seconds. Any 2xx answer counts as success, and the toast reads “New IP requested for” and the proxy name. For several proxies, Donut sends up to 4 requests at once and reports each result on its own.

The request goes from your computer to the provider directly, not through the proxy. If you set Proxy for Donut in Settings → Network, or a system proxy, the request goes through that one.

4. Confirm the new IP

A 2xx answer means the provider accepted the request. Donut does not measure the new exit, and some providers take a few seconds to switch. Click the check button again and compare the IP with step 2.

Every profile that uses the proxy reaches the internet through the new IP. Donut does not restart running profiles. A site that you have open can see the IP change in the middle of a session. Rotate between tasks, and never during a login.

If the new IP is in another city or country, the profile’s timezone may no longer match it. At the next launch, Donut compares the two and can block the launch. See How to match a browser’s timezone and language to its proxy.

Rotate from a script

POST /v1/proxies/{id}/rotate calls the stored link. It works on every plan and needs the local API token in DONUT_API_KEY. Find the proxy ID with GET /v1/proxies.

curl -sS -X POST http://127.0.0.1:10108/v1/proxies/<proxy id>/rotate \
  -H "Authorization: Bearer $DONUT_API_KEY"
# {"proxy_id":"…","elapsed_ms":812,"status":200,"error":null}
FieldMeaning
proxy_idThe proxy you rotated
elapsed_msHow long the provider took to answer
statusThe provider’s HTTP status, when it answered
errorA coded error when the change was not confirmed, else null

To set or change the link from a script, send rotation_url with POST /v1/proxies or PUT /v1/proxies/{id}. In PUT, an empty string removes the link, and leaving the field out keeps it. See Change a proxy’s IP in the API reference.

Rotate on a timer

Donut has no automatic rotation. To rotate every 10 minutes, run the API call from a scheduler while the app is open. On macOS or Linux, with cron:

# crontab -e
*/10 * * * * curl -sS -X POST http://127.0.0.1:10108/v1/proxies/<proxy id>/rotate -H "Authorization: Bearer <token>" >/dev/null

Cron does not read your shell profile, so the line holds the token. Keep the crontab private. On Windows, Task Scheduler can run the same request with Invoke-RestMethod.

Troubleshooting

MessageStatusWhat to do
“This proxy has no change IP link. Add one when you edit the proxy.”400Add the link in step 1.
“The provider refused the IP change (HTTP N).”502The provider answered with an error. Some providers limit how often a proxy can rotate. Wait, or check the link in their dashboard.
“The provider did not answer the IP change within 30 seconds.”502Try again later.
“Donut could not reach the provider’s change IP link.”502The host in the link does not answer from your computer. Open the link in a normal browser to test it.
“Donut could not connect through the system proxy …”502Your system proxy is down. Fix it or turn it off in the system network settings.
“None of these proxies has a change IP link. Add one when you edit a proxy.”You selected proxies without a link.

If the check in step 4 shows the old IP, the provider accepted the request but has not switched yet, or gave the same IP back. Wait a few seconds and check again.

Change IP and the rotate API are part of the free plan. Download Donut Browser for macOS, Windows or Linux.

Last updated .