- 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:zproxy.lum-superproxy.io:22225 lum-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). - If you have multiple Clients and would like to ignore your Clients source IP (which is used together with you session ID to create a session), then you want to use global session then add
glob_
as a prefix to your session:lum-customer-{YOUR_CUSTOMER_ID}-zone-{YOUR_ZONE}-session-glob_rand39484
Full request example:lum-customer-CXXXXX-zone-ZONE_X-session-glob_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.