Backconnect proxy explained: gateways and what sits behind one port
What backconnect actually means
Most explanations of a backconnect proxy stop at “you get one address and it rotates for you.” That’s true, but it hides everything interesting. I run proxy farms and production scrapers, and the gap between that one-line description and what’s really happening behind the port is where most confusing bugs live: sessions that drop, “rotating” IPs that repeat, a bill that doesn’t match your request count.
Here’s the short version. A backconnect proxy is a gateway. You connect to a single hostname and port that never changes. The gateway accepts your connection, authenticates you, decides which exit connection from a larger pool should carry your traffic, and forwards it. The word “backconnect” comes from the fact that the exit devices often connect out to the provider rather than the provider connecting in to them. A phone or a home router dials the network, and the gateway later sends traffic back down that already open connection.
Compare that with a classic proxy list, where every line is an address you dial directly. With a list, you own the rotation logic. You pick an entry, track which ones died, and retire the bad ones. With a gateway, the provider owns it, and you steer through parameters instead of choosing addresses.
This article is the deeper companion to the video. We’ll walk through the gateway, session handling, how exits get into the pool, the mobile version from the farm side, a worked request, failure modes, and how to test a provider without trusting the sales page. Blocking and detection come up too, but only from the defensive side: how the target’s systems read what a gateway produces, and how a compliant scraper stays well behaved.
One port, many exits
From your side, the whole thing looks like an ordinary HTTP or SOCKS5 proxy. Your client opens a TCP connection to a hostname on one port, sends a CONNECT request for the target host, and then tunnels TLS through it.
The trick is that the hostname and port are a front door, not an exit. Behind it sits a fleet of exit nodes, and the address the target site sees belongs to one of those, not to the gateway. That’s the key difference from a forward proxy you run yourself, where the IP you connect to is the IP the target sees.
Two connections exist for every request. The first runs from your scraper to the gateway. The second runs from the gateway, through an exit node, to the target. The gateway splices them together and copies bytes in both directions. For HTTPS traffic it usually can’t read the contents, because the TLS session is negotiated end to end between your client and the target through the tunnel. What it can see is the destination hostname, the byte counts, and timing.
This splice design explains several behaviours people find odd. Latency is the sum of two hops plus the exit’s own last mile, so a residential or mobile exit will feel slower than a datacenter one, and that’s not a bug. A failure can happen on either leg, and the error your client sees may not tell you which. And because the exit is chosen per connection or per session, two requests a second apart can legitimately leave from different countries, cities or carriers unless you tell the gateway otherwise.
Ports on the gateway sometimes mean something too. Some providers use one port for rotating and another for sticky, or one per country. Others use a single port and put everything in the username. Both are fine; you just need to know which yours is.
The moving parts inside a gateway
If you strip a gateway down, there are about five components, and knowing them helps you predict behaviour.
The listener accepts connections and speaks the proxy protocols. Most support HTTP CONNECT and SOCKS5, and many accept both on different ports.
The authenticator checks credentials, either username and password or an allow-listed source IP. It also maps you to an account, which carries your plan, your traffic balance and your targeting defaults. IP allow-listing is convenient on a server with a fixed address, but it breaks the moment your egress IP changes, which is a classic Monday-morning outage.
The session table is the part most people overlook. It maps a session key to an exit node, with a time to live. When you ask for a sticky session, the gateway writes an entry. Later requests carrying the same key look it up and get the same exit, until the entry expires or the exit disappears.
The selector chooses an exit when there’s no live session entry. It filters the pool by your targeting rules, such as country or carrier, drops nodes that are busy or recently failed, and picks one, often at random or weighted by health. Random selection with replacement means repeats are normal. If the pool for a small city has a few hundred nodes, you’ll see the same address twice in a short run, and that’s the maths, not a fault.
The exit manager holds the long-lived connections to the nodes, tracks whether they’re alive, and handles the handover when one drops mid-request.
Around these sits metering, which counts bytes per account, usually in both directions, and often includes overhead like the TLS handshake and failed attempts. That’s why your provider’s traffic figure is nearly always higher than the size of the pages you kept.
Rotating and sticky sessions
Two behaviours cover almost every use, and they’re set by session handling, not by the proxy type.
Per-request rotation means the selector runs for every new connection. There’s no session entry, so each connection may get a different exit. It suits stateless work: fetching public listing pages that don’t care who you are between requests, or spreading a large crawl thinly across many addresses so no single one carries a suspicious volume.
Sticky sessions mean the first request creates a session entry and later ones reuse it. It suits anything with state: a login you’re entitled to, a cart, a multi-step form, or a paginated result set the server ties to a client address. If the address changes halfway through page three, some sites will invalidate the cursor or ask you to start again.
Here’s a subtlety that catches people. Sticky is a promise about the gateway’s routing, not about the exit’s health. Residential and mobile exits are real devices that go to sleep, lose signal or change network. If the exit vanishes, the gateway has to either fail the request or quietly reassign you. Providers differ, and the difference matters. A silent reassignment mid-session can look to the target like a client that teleported, which is exactly the pattern a defensive system is built to notice.
Also check what the session time to live counts from. Some count from creation, some from last use. A ten minute session that refreshes on use behaves very differently from one that hard-expires ten minutes after you opened it.
My rule of thumb: rotate by default, go sticky only when the workflow has state, and keep sticky sessions as short as the task allows. Long sessions concentrate all your traffic on one exit, and that concentration is its own signal.
How the username steers the gateway
Because you only have one hostname and port, everything else rides in the credentials. The typical pattern is a username built from your account name plus a string of flags, separated by dashes or underscores. The exact syntax is provider specific, so read the docs, but the categories are consistent.
Country, and sometimes region, city or ASN. This filters the selector. Narrower filters mean smaller candidate pools, and smaller pools mean more repeats and more contention. Asking for one small city on one carrier is a reasonable need for localized price checks, but expect it to be less stable than asking for a whole country.
Session key. An arbitrary string you make up, like a job ID. Same string, same exit, until the time to live ends. A new string means a new selection. This is how you build sticky behaviour without any client state beyond the string.
Session duration. Some gateways let you set the time to live in the username, others fix it per port.
Protocol or exit type. Some gateways serve several pools through one endpoint, and a flag chooses between residential, mobile and datacenter.
Two practical warnings. First, generate session keys deliberately. If you reuse one key across parallel workers, they all share a single exit and you’ve quietly built a bottleneck. If you generate a fresh random key per request, you’ve built per-request rotation by a longer route. Second, malformed flags often fail open rather than closed. A typo in a country code may be ignored, and you get a random country without any error. Log the exit’s reported country from an echo endpoint during setup and spot-check it in production.
Where the exits in the pool come from
The gateway is only as meaningful as the pool behind it, and there are three broad kinds.
Datacenter exits are servers in hosting facilities. They’re fast, cheap to run, stable, and their addresses belong to hosting networks. That last point is the defensive story: a target can see that a request originates from a hosting network rather than a consumer ISP, and many sites treat that traffic more cautiously. For public, tolerant targets, or for APIs that expect server traffic, datacenter is often exactly right.
Residential exits are devices on home connections. They appear on consumer ISPs, which is why they get different treatment. They reach the pool in a few ways, and this is where I’d ask hard questions of any provider. Some come from software whose users knowingly opted in and are compensated, and some come from arrangements where the user barely understood what they agreed to. You can’t audit that from the outside, so it’s worth asking a provider directly how exits are sourced and whether consent is explicit.
Mobile exits sit on cellular networks. Carriers commonly place many subscribers behind shared public addresses, which is why a single mobile address may be used by a large number of real people at once. A defensive system that blocked such an address hard would block a lot of ordinary users, so those systems often treat it with more caution before acting. That’s a property of carrier networking, not a guarantee, and it’s no licence to be careless.
Static residential, sometimes called ISP proxies, are a hybrid: an address registered to a consumer ISP but hosted on a server. They’re stable like datacenter and are classified more like residential.
Price and speed loosely follow how hard each kind is to source, but measure it for your provider.
The mobile version, from the farm side
I run mobile proxy hardware, so here’s what a gateway looks like from the inside of that world. It’s simpler than the marketing suggests.
A mobile exit is usually a 4G or 5G modem or a phone with a SIM. Each one has its own connection to the carrier and gets whatever address the carrier assigns. On the box next to it is software that opens a local proxy listener bound to that modem’s network interface. Traffic sent to that listener leaves through that SIM and nowhere else. That’s a direct port: one port, one modem, one carrier line.
A backconnect gateway sits in front of many of those ports, or in front of many devices that dial out to it. It gives customers one endpoint and maps requests onto whichever modem fits the request. The map is the whole product.
Rotation on a mobile line is a different thing from rotation across a pool. Rotating a modem means toggling its data connection or airplane mode so the carrier assigns a new address. That takes time, commonly some seconds, during which that port is unusable, and the new address may come from the same small range or even repeat. So a mobile gateway that offers “rotate on demand” has a real physical cost behind each call, which is why providers rate-limit it.
Capacity is physical too. Each modem has one line’s throughput, and per-box network links and USB controllers are ceilings that show up under load. A port shared by many customers at once will slow down, and no software layer can invent bandwidth the SIM doesn’t have.
Then there’s the paperwork side: SIM plans, carrier terms and local rules on reselling connectivity. If you’re thinking of building your own, read those before buying hardware. It’s a real operating business, with real failures such as dead modems, exhausted data caps and carrier changes that alter behaviour overnight.
A worked example: one request, end to end
Let’s trace a request. The numbers below are illustrative, chosen to make the mechanics visible, not measurements from any provider.
Your scraper wants a public product page. The proxy URL is built from a gateway host, a port, and a username carrying a country flag and a random session key. The client sends CONNECT shop.example:443.
Step one, the listener accepts and the authenticator matches the credentials to an account. Step two, the session table is checked for the key. It’s new, so nothing exists. Step three, the selector filters the pool to the requested country, removes nodes flagged busy, and picks one. It writes a session entry with, say, a ten minute time to live. Step four, the exit manager sends a connect instruction down the already open tunnel to that exit device, which opens a connection to shop.example. Step five, the gateway replies 200 to your CONNECT and starts splicing bytes. Your client then runs the TLS handshake with the target through the tunnel.
Now the useful part. Say the whole thing takes 900 ms to first byte. Where did the time go? Perhaps 60 ms to reach the gateway, 40 ms for selection and dispatch, 250 ms for the device to open its connection over a cellular last mile, and the rest in TLS round trips, each one crossing both hops.
If your client opens a new connection per request, you pay the setup cost every time and, with per-request rotation, you also churn exits. If it keeps connections alive within a sticky session, you pay once. Reuse is faster, cheaper in metered overhead, and closer to how a normal browser behaves.
Second request, same key: the session table hits, the same exit is used, and the setup drops to the dispatch and the target connection only.
Failure modes worth knowing by name
When a gateway misbehaves, the symptom is usually vague. Here are the ones I see most, with what’s actually going on.
Exit churn. Requests fail intermittently with connection resets. Often the exit device dropped mid-request. Fix: retry with a new session key, with a cap and backoff, never in a tight loop.
Session leakage between workers. Two workers shared a key and now they interleave on one exit, so one worker’s cookies confuse the other’s server-side state. Fix: one key per logical session, owned by one worker.
Silent reassignment. A sticky session changes exit without telling you. Detect it by logging the exit address at intervals in long jobs and alerting on change.
Pool exhaustion under narrow targeting. Ask for one city and one carrier at high concurrency and you hit the same handful of exits, which then slow or fail. Widen the filter or lower concurrency.
Authentication flaps. IP allow-listing fails after your own egress address changes; the gateway answers 407 or just closes the connection. Check your outbound IP first.
Misattributed errors. A 403 or a captcha page comes from the target, through a healthy tunnel. A 502 or a connection close before any response often comes from the gateway or exit. Learn to tell them apart, because the first is a signal about your behaviour and the second is an infrastructure problem. Retrying harder makes the first worse.
Metering surprises. Failed attempts, redirects and retries all consume billable bytes. A scraper in a retry storm can burn a month’s allowance quickly.
DNS location. If the exit resolves names, the answer reflects the exit’s region, which can change which server or content variant you get. If your client resolves names locally instead, the target may see a mismatch between your resolver and the exit’s location. Check whether your gateway resolves remotely, which most do for HTTP CONNECT and for SOCKS5h-style setups.
What the target sees, told defensively
Now the other side of the port. This is how detection systems generally read gateway traffic, so you can build a scraper that behaves well, not one that hides.
The most visible signal is the address itself. A target can look up the network that owns it and classify it as hosting, consumer broadband, or cellular. It can also see how much traffic has come from that address recently, and from that whole range. Rotation spreads volume across addresses, but it doesn’t erase volume; a site can still notice that a huge number of unrelated addresses all request the same rare URLs in the same order.
Next is consistency. A real visitor has a coherent bundle: an address in a region, a language header that fits, a time zone that fits, a browser version whose TLS and HTTP/2 behaviour match its user agent string. When those disagree, for example an exit in one country and a client that announces another, that’s a mismatch a system can score. The address was never the only signal.
Then behaviour: request rate, the absence of the assets a browser would load, perfectly regular timing, and no cookies carried between requests where a browser would carry them.
Finally, reputation. Addresses carry history. Anything a previous user did with that exit can stay attached to it for a while, which is a real hazard of shared pools. You inherit reputation you didn’t earn.
A compliant scraper’s answer is manners. Read and honour robots.txt and the site’s terms. Identify your client honestly where the site asks for it. Keep the rate low and steady. Use an official API or a data licence when one exists. Back off on 429 and 503 responses. If a site clearly tells you to stop, stop. Proxies change where requests come from; they don’t change whether you’re permitted to make them.
Gateway, direct ports or a plain list
Which shape fits depends on the work, and each has a real cost.
A backconnect gateway is the least effort. One endpoint, provider-managed rotation, and scaling means opening more connections. The costs are opacity, since you can’t see or choose individual exits, plus metering that includes overhead, and dependence on the provider’s selector. It’s a sensible default for broad public crawling and for teams without infrastructure people.
Direct ports, one per device, give control. You know which modem or address you’re using, you can pin a workflow to it, and behaviour is repeatable. The costs are that you manage health, retirement and rotation yourself, and one dead port is your problem to notice. It suits workflows that need a stable identity for a proper reason, like a long-running monitoring job on your own account.
A plain list of static datacenter or ISP addresses is the cheapest and most predictable. You own the rotation logic in your client, which is not hard: a pool object, a per-host cooldown, a failure counter that ejects bad entries. The cost is that you’re responsible for all of it, and static addresses accumulate reputation with a single target over time.
Some mixes work well. I often put a gateway in front of tolerant targets to keep the code small, and use pinned addresses only where a workflow needs continuity. Whatever you choose, put the proxy behind a small interface in your code, get_proxy for a request and report_result afterwards, so swapping providers is a config change and not a rewrite.
How to test a gateway before you commit
You can learn a lot about a gateway in an afternoon with a small script and an IP echo endpoint. Here’s the test plan I’d use, and every item is something you can measure yourself.
First, rotation behaviour. Send a few hundred requests with no session key and record the exit address for each. Count distinct addresses and the longest run of repeats. A small pool or a sticky-by-default gateway shows up right away. Then repeat with a fixed session key and confirm the address holds, and record how long it holds by polling on a timer.
Second, targeting accuracy. Request a specific country and check each exit against a geolocation lookup, remembering that geolocation databases disagree with each other, so treat small mismatches with caution and look for large ones. Also check the network classification: does a supposedly residential exit resolve to a hosting network?
Third, latency and error rate. Record time to first byte and the status class for each request, at low concurrency and again at the concurrency you actually plan to use. Report percentiles, not averages. A median of one second with a p95 of twelve seconds is a different product than the average suggests.
Fourth, metering. Fetch a page of known size a fixed number of times and compare your own byte count to the dashboard. The gap is your overhead, and it matters for cost planning.
Fifth, protocol behaviour. Check whether SOCKS5 supports what you need, whether DNS resolves remotely, and how idle connections are treated.
Sixth, failure handling. Run a job for an hour on one sticky session and see whether the address ever changes silently.
Save the raw results and the script, and rerun monthly, since pool quality drifts. A verdict is only worth publishing with the numbers behind it. Test against targets you’re allowed to hit, at gentle rates. An echo endpoint or your own test server is ideal.
What a gateway doesn’t change
It’s tempting to think a gateway solves the hard parts. It solves one part: where your traffic appears to come from. Everything else stays yours.
Legality and permission. Terms of service, copyright, database rights and computer misuse rules apply regardless of the address you use. Rules differ by country and by site, and I’m an operator, not your lawyer. If a project depends on a legal question, get actual advice.
Personal data. Scraping personal information brings data protection duties in many places, and there’s rarely a good reason to collect it in bulk. Scope your collection to the fields you need, drop everything else at ingestion, and avoid personal data unless you have a clear lawful basis. Don’t touch paywalled content or anything behind a login you weren’t given.
Load. Targets pay for your requests. A polite rate isn’t only good manners; it keeps you from becoming the incident someone has to investigate. Cache what you’ve fetched, use conditional requests where the server supports them, and don’t refetch pages that haven’t changed.
Supply chain ethics. Residential and mobile pools involve real people’s devices and connections. Prefer providers who can explain how consent works, and be wary of ones who can’t. If a price looks too low to fund honest sourcing, ask where the difference comes from.
Your own credentials. A gateway credential is a key to a metered account. Keep it out of repos and logs, rotate it if it leaks, and restrict by source IP where you can. Leaked proxy credentials get used by strangers, and you pay the bill.
None of this is glamorous, but it’s what separates a scraper that runs for years from one that gets shut down in a week. And even then, no setup guarantees you won’t be blocked. Sites are entitled to refuse traffic, and a good scraper treats a block as an answer.
What to do differently on Monday
Here’s the short list, in the order I’d do it.
One: put your proxy behind an interface. A function that returns a proxy URL for a request and a function that reports the outcome.
Two: build the username in one tested function. Include the country flag, the session key and the duration in one place, and log the exit address on setup.
Three: decide per job whether it’s stateless or stateful. Stateless jobs rotate. Stateful jobs get one session key per logical session, owned by a single worker and kept short.
Four: reuse connections. Keep-alive inside a session cuts both latency and metered overhead.
Five: classify failures. Separate tunnel errors from target responses, log status class, exit address, key and bytes per request, and retry infrastructure errors with a cap and backoff. Never retry a block harder.
Six: run the six-part test above on any provider you’re considering, and keep the numbers. Rerun it monthly.
Seven: check your compliance basics. robots.txt, terms, an API if there is one, no personal data you don’t need, and a rate you’d be comfortable explaining to the site owner.
Eight: watch the bill. Compare your own byte counts to the provider’s every week. A retry loop or a misbehaving worker shows up there before it shows up anywhere else.
The gateway is a convenient abstraction, not a magic one. Behind the single port there’s a selector, a session table and real devices with real limits. Once you can picture those, you can pick the right shape of proxy for each job instead of buying whatever is labelled best.
If you want more walkthroughs like this, including the tests and the tooling behind them, head to the Proxy Scraping home page and watch the companion video on the channel.
Get new guides and videos first — join the Telegram channel.