The Sticky session allows you to keep the same IP address with a specified session length to run multiple requests and be able to change them when needed. Moreover, Sticky sessions help you get more stable and efficient proxy sessions and reduce node resets, ensuring smoother operations.
SOAX offers proxy access through a single endpoint: proxy.soax.com:5000
Building sticky sessions connection:
Sticky sessions work with the parameters described below:
package_id - your package id can be found on the left top corner of your package card.
country – country code. Two symbols in ISO 3166-1 Alpha-2 format. You can generate it in the dashboard. To get a random country, simply exclude this parameter from the username string.
Example: United Stites - uscity – city name. Adding this parameter to the authorization header will let you specify the city of the IP you want to use to process the request. Please use this parameter together with the country information. You can use the algorithm described on the screen above to choose a city.
Example city: New York - new+yorkregion - region name. Adding this parameter to the authorization header will let you specify the region of the IP you want to use to process the request. Please use this parameter together with the country information. You can use the algorithm described on the screen above to choose a region.
Example region: New York - new+yorkisp - ISP name. Adding this parameter to the authorization header will let you specify the ISP of the IP you want to use to process the request. Please use this parameter together with the country information. You can use the algorithm described on the screen above to choose an ISP.
Example ISP: at&t+u-versesessionid – a random string to create a session in order to keep the same proxy for more than one request. If this parameter is not indicated (along with sessionlength), you will get new IP on every request you make.
Example: rand123456sessionlength – must be used with session. Specifies the sticky session time in seconds – from 10 seconds up to 3600 sec (60 minutes). If you will not indicate, a session lasts for 360 sec.
Example: 90package_key - package key can be found in Login field of Quick Access block.
Example: PFh4Nm42Boe6hcJ0
To build sticky sessions, you need to add the parameters described above:
Login:
package-{your_package_id}-country-{cc_code}-sessionid-{session_id}-sessionlength-{time_in_sec}
Password (package_key)
{package_key}
Server:
proxy.soax.com
Port:
5000
Use the Session ID only if you want a sticky session. Otherwise, just ignore that part to receive a rotating proxy with a specified Session length.
How sticky sessions work:
To force an IP change, just modify the sessionid.
Sticky sessions work only on 5000 port with endpoint proxy.soax.com.
You can start as many parallel connections using sessions as you want. To do that, just use a different random string sessionid.
If you keep sending requests to the same sessionid, you can maintain the same IP for any amount of time within the set sessionlength.
If an assigned to the session node IP becomes unavailable, the proxy server will return the error “502 — Node is not available” and the new IP will be assigned in 60 seconds if the IP didn’t return.
The session automatically expires in 60 seconds of inactivity. After that, a new IP will be assigned to this session’s ID. 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.
While IP is assigned to a specified, sessionid it can not be assigned to another sessionid. Therefore, IPs in parallel active sessions cannot overlap.
If you do not indicate sessionid and sessionlength you will get new IP on every request you make.
For every new GEO-targeting, you need to use a different sessionid.
sessionlength – must be used with session otherwise, you will get an error from the proxy server.
When you are using Sticky Sessions, and you want to use any geo-targeting that includes more than one word in targeting, for instance, "New York" or "Los Angeles", instead of
space
or+
can use%20
. Example:
curl -k -x "http://package-130503-country-us-city-los%20angeles:[email protected]:5000" -L http://checker.soax.com/api/ipinfo
Examples of using Sticky sessions
Here is the basic example for the country US with a session length of 180 seconds with the request to our checker.
Windows:
curl -k -x http://package-<your_package_id>-country-us-sessionid-1-sessionlength-180:<your_package_login>@proxy.soax.com:5000 -L http://checker.soax.com/api/ipinfo
MacOS
curl -k -x "package-<your_package_id>-country-us-sessionid-1-sessionlength-180:<your_package_login>@proxy.soax.com:5000" -L http://checker.soax.com/api/ipinfo
Antidetect browser
Please use your Login (package key) for the Proxy password.
Also, you can use any other antidetect browser.
Here is an example of a US country with and 600-sec length:
In proxy (IP port), add - "server" from your dashboard and port 5000 (on the screenshot) - proxy.soax.com:5000
Proxy username - package-<your_package_id>-country-us-sessionid-rand3-sessionlength-600
Proxy password - your Login from the dashboard (on the screenshot)
This example includes Browser logic, which helps reduce node resets, ensuring smoother operations:
curl -x "package-{your_package_id}-opt-wb:{your_package_login}@proxy.soax.com:5000"
This option provides the maximum number of unique IP addresses available:
curl -x "package-{your_package_id}-opt-uniqip:{your_package_login}@proxy.soax.com:5000"
Examples of the request string
Examples of the request string
Random proxy from a random target location with the new IP on each request
proxy.soax.com:5000 package-{your_package_id}:{your_package_login}
Random proxy from a specific country and random city/region/isp and new IP on each request
proxy.soax.com:5000 package-{your_package_id}-country-{cc_code}:{your_package_login}
A specific country and random city/region/isp with sticky proxy (using session ID) and default session length in 180 sec
proxy.soax.com:5000 package-{your_package_id}-country-{cc_code}-sessionid-{session_id}:{your_package_login}
A specific country, city, and random region/isp with sticky proxy (using session ID) and default session length in 180 sec
proxy.soax.com:5000 package-{your_package_id}-country-{cc_code}-city-{city_name}-sessionid-{session_id}:{your_package_login}
A specific country, city, and random region/isp with sticky proxy (using session ID) and custom session length
proxy.soax.com:5000 package-{your_package_id}-country-{cc_code}-city-{city_name}-sessionid-{session_id}-sessionlength-{time_in_sec}:{your_package_login}
A specific country, region, city, isp with sticky proxy (using session ID) and custom session length
proxy.soax.com:5000 package-{your_package_id}-country-{cc_code}-region-{region_name}-city-{city_name}-isp-{isp_carrier}-sessionid-{session_id}-sessionlength-{time_in_sec}:{your_package_login}
An example represents a list of credentials that establish different sessions in different countries with different sessions length (seconds).
proxy.soax.com:5000 package-64412-country-us-sessionid-rand123456-sessionlength-90:PFh4Nm42Boe6hcJ0
proxy.soax.com:5000 package-64412-country-uk-sessionid-tsa122-sessionlength-180:PFh4Nm42Boe6hcJ0
proxy.soax.com:5000 package-64412-country-br-sessionid-rwaf123122-sessionlength-360:PFh4Nm42Boe6hcJ0