- In many cases you may want to run several parallel sessions from the same Client, use different Proxy Peers per session, and be able to change them when needed.
This can be done by adding the session to the proxy username:brd.superproxy.io:22225 brd-customer-{YOUR_CUSTOMER_ID}-zone-{YOUR_ZONE}-session-rand39484
Generate the random number on thread startup, and change it when you want to change the Proxy Peer assigned for the thread's connection. - Session ID can be any random string/counter: requests with same session string will use the same Proxy Peer (as long as possible); requests with different session strings will be assigned different Proxy Peers.
- To force an IP change, just modify the session ID
- If an assigned Proxy Peer(exit node IP) becomes unavailable, the Super Proxy will return an error "502 - No peers available" for the first request and then on the second request the super proxy will assign a new peer even if you do not change the session ID.
- The Session IP is kept persistent up to 1 minute of idle time. After a minute with no requests, the IP is released back to the pool.
To keep this Session/IP for longer, send a tiny keep-alive request every 30 seconds, to prevent this session from becoming idle for over a minute.
This request may be anything small, such as /favicon.ico or even a request that returns 404 (as long as the web server does not disconnect the socket due to this request).