Opt-In Software Blog

Making Any Scraper Work with Sticky Proxies

How to Use Sticky Proxies in Applications That Don’t Support Them

Many modern proxy providers sell so-called sticky proxies (also known as session-based proxies). This is a very popular solution for scraping, automation, data collection, and working around anti-bot protections.

What is a sticky proxy?

A sticky proxy is a proxy server that “locks” one IP address to you for a certain amount of time (for example, 5 or 10 minutes) using a session. Usually, the session is defined via the username, for example:

user-session-ABC123-sessTime-10:password@proxy_host:proxy_port

While the session is active, you will access the internet from the same IP address. When the time expires or you change the session ID, you get a new IP.

Today, most large proxy providers (residential, mobile, ISP) work exactly this way: you connect to a single host and port, and IP rotation is controlled via parameters in the username.

The problem: not all software supports sticky proxies

Many applications (scraping software, old parsers, bots, automation tools):

  • ❌ cannot work with proxies that require authentication
  • ❌ cannot manage sessions
  • ❌ expect just a list of IP:PORT, without username and password

Because of this, they cannot be directly connected to modern sticky proxy providers.

The solution: map local TCP ports through sticky proxies

The idea is very simple:

  • We run a local service
  • It opens a range of local ports
  • Each local port:
    • automatically connects to the sticky proxy
    • uses its own separate session
  • As a result:
    • 127.0.0.1:5001 → sticky proxy session AAA1
    • 127.0.0.1:5002 → sticky proxy session AAA2
    • 127.0.0.1:5003 → sticky proxy session AAA3
    • and so on

And your software just works with regular proxies without authentication:

127.0.0.1:5001
127.0.0.1:5002
127.0.0.1:5003

Ready-made solution: ProxyMapService

For this purpose, the following open-source project works perfectly:

👉 ProxyMapService
https://github.com/optinsoft/ProxyMapService

It can:

  • map port ranges
  • automatically manage sticky sessions
  • work with HTTP / SOCKS proxies
  • modify / generate username parameters

Configuration example

Here is an example config:

"ProxyMappings": [
  {
    "Listen": {
      "PortRange": {
        "Start": 10001,
        "End": 10100
      },
      "RejectHttpProxy": false,
      "StickyProxyLifetime": 10
    },
    "Authentication": {
      "Required": false,
      "Verify": false,
      "SetAuthentication": false,
      "RemoveAuthentication": false
    },
    "ProxyServers": {
      "Items": [
        {
          "Host": "PROXY_IP",
          "Port": PROXY_PORT,
          "ProxyType": "Http",
          "Username": "USERNAME",
          "Password": "PASSWORD",
          "UsernameParameters": [
            {
              "Name": "zone",
              "Value": "custom"
            },
            {
              "Name": "region",
              "Value": "US"
            },
            {
              "Name": "session",
              "Value": "^[A-Za-z]{8}",
              "SessionId": true
            },
            {
              "Name": "sessTime",
              "Value": "$sessTime",
              "Default": "10",
              "SessionTime": true
            }
          ]
        }
      ]
    }
  }
]

⚠️ In this example you need to replace:

  • PROXY_IP
  • PROXY_PORT
  • USERNAME
  • PASSWORD

with the values provided by your proxy provider.

How does it work in practice?

  • ProxyMapService opens local ports 10001–10100

  • Each port:

    • automatically generates a new sticky session
    • keeps it for StickyProxyLifetime = 10 minutes
  • You just set in your software:

127.0.0.1:10001
127.0.0.1:10002
127.0.0.1:10003
...

Conclusion

If your software:

  • doesn’t support proxy authentication
  • doesn’t support sessions
  • only works with IP:PORT lists

➡️ ProxyMapService solves this problem completely, allowing you to use modern sticky proxies without modifying your software.

Useful for:

  • scraping software
  • bots
  • automation tools
  • legacy tools
  • and basically any software with poor proxy support