Skip to content

Session control

Session control types include sticky sessions and rotating sessions

sticky session

Sticky sessions allow a single IP address to be reserved for multiple requests.

Configuration Rules:

  • No need to splice session ID parameters

  • Can be used with specified country/region parameters when configuring, without specifying the default global random

  • Parameterized configuration

For example, set the sticky mode duration to 10 minutes for a US IP: USERNAME_dc_any-number-country-us

After a standard session time of 10 minutes or no more than 60 seconds of inactivity (no requests), a new IP address is automatically assigned.

For example, after you are assigned to the proxy IP 1.1.1.1 using USERNAME_dc_234234, your requests will always be transmitted through 1.1.1.1 as long as you continue to send requests using this session parameter and the proxy node remains available. When the session time exceeds the preset 10 minutes, the next request using USERNAME_dc_234234 will automatically be assigned a new proxy IP, such as 1.1.1.2.

You can also set multiple different session proxy addresses, such as:

USERNAME_dc_234234:PASSWORD
USERNAME_dc_345345-country-us:PASSWORD
USERNAME_dc_456456-country-jp:PASSWORD
USERNAME_dc_567567-country-ca:PASSWORD

Code Example:

USERNAME_dc_234234-country-us This example demonstrates how to make a first request from a US IP containing the -country-us parameter. During the 10-minute session validity period, all subsequent queries will continue to use the US IP address.

sh
curl -x "socks5h://USERNAME_dc_234234-country-us:PASSWORD@proxy-hk.socks5.io:3000" "http://ip123.in/ip.json"

Rotate session

When the session type is set to Rolling Session:

Rotating IP allocation: Automatically assign a new datacenter IP for each request

Applicable scenarios: High anonymity business requirements

Configuration Rules:

  • Add the -f-1 parameter to USERNAME when configuring
  • Can be used with specified country/region parameters when configuring, without specifying the default global random

Code Example:

USERNAME_dc_arbitrary-f-1-country-us This example demonstrates how to make a request from an IP that contains the -f-1 parameter and the -country-us (specifies the United States) parameter. Each request will be assigned a brand new US datacenter IP.

sh
curl -x "socks5h://USERNAME_dc_any number-f-1-country-us:PASSWORD@proxy-hk.socks5.io:3000" "http://ip123.in/ip.json"