Skip to content

How to Use a Proxy: Setup, Residential Sessions, Walls and Fixes

How to use a proxy in five steps, from the four values to the exit IP test and the errors, plus residential sessions, traffic budgets and 50+ setup guides.

HProxy TeamAugust 4, 2026Updated October 22, 202611 min read

How to Use a Proxy: Every Setup, Every Wall, Every Fix

To use a proxy, take the four values your provider gives you (host, port, username and password), enter them in the tool that sends the traffic, and check that the exit address changed. When a request fails, the error tells you which side refused it. A residential proxy adds two choices on top: where the address should be, and whether it changes on every request or stays for a session. This page walks through those steps, then maps more than fifty setup guides for browsers, languages, anti-bot systems and error codes.

How do you use a proxy, step by step?

  1. 1

    Read the four values

    A provider hands you a host, a port, a username and a password, often joined as host:port:user:pass. Each value has its own field, and what ip:port:username:password means says which one goes where.

  2. 2

    Enter them in the tool that sends the traffic

    A browser, the operating system, an app or your own code. The sections below link the guide for each one.

  3. 3

    Prove the exit address

    Run curl -x http://user:pass@host:port https://api.ipify.org, or open an IP lookup through the proxy. The address shown must be the proxy's.

  4. 4

    Read any error by the side that sent it

    A 407 comes from the proxy, a 403 or 429 from the target site, and a 502 or 504 from the path between them.

  5. 5

    Scale after one request works

    Add rotation, more lines or more threads once a single request succeeds, because every extra layer hides the cause of a failure.

The test in step three saves the most time. curl takes the proxy with -x, and a socks5:// prefix switches it to SOCKS5. The http_proxy and HTTPS_PROXY environment variables work too, and curl's manual says they have "the same effect as using the --proxy option". Python's Requests reads the same variables.

An IP lookup then shows what a website sees for the exit address. Below is our lookup of one free proxy's address on October 22, 2026: a DigitalOcean server in Santa Clara, typed as datacenter and hosting, and listed as a running free proxy in our pool.

Our own capture, October 22, 2026, 07:01 UTC

A residential exit would name a home internet provider in the network box. Free proxies rarely pass this kind of check: in our measurement of October 22, 2026, an IP reputation check flagged 99.1% of 7,082 working free proxies, as our page on anonymous proxy detected explains.

How do you use residential proxies?

A residential proxy goes into your tool like any other proxy: a host, a port and a login. Four choices come before the first request.

Pick the location. Every residential pool targets by country. On ours, Residential Lite targets by country from $0.50 per GB, and Residential Premium adds state, city and ISP targeting from $1.49 per GB.

Rotate per request or keep a sticky session. A rotating session gets a new exit address on the next request. A sticky session keeps one address for its lifetime, which on our Premium pool runs from 3 minutes to 24 hours. Rotation suits data collection across many pages. A sticky session suits a login, a checkout or anything that sets cookies, and sticky vs rotating sessions covers the trade in detail.

Generate the lines in your tool's format. Most dashboards write the lines for you. In ours you pick the product, the country and the format, and the generator writes the session and the location into each line, so your tool needs no extra setting for them.

Budget the traffic. Residential proxies bill per GB, and the pages you load decide the bill. In the HTTP Archive's October 2024 crawl, the median desktop page weighed 2,652 KB, the median mobile page 2,311 KB, and the median HTML document 18 KB.

What one GB of traffic carries
Full desktop page loads2,652 KB each
377 pages
Full mobile page loads2,311 KB each
433 pages
HTML documents alone18 KB each
55,556 pages
Fetching only the HTML stretches a gigabyte about 150 times further than loading every image and script.
Source: HTTP Archive Web Almanac 2024, median page weight, October 2024 crawl; 1 GB taken as 1,000,000 KB · hproxy.comProxy.

A scraper that requests only the HTML, or a browser that blocks images, fonts and video, pays for far less traffic, and caching lowers repeat loads further. Datacenter vs residential proxies covers when the residential price is worth paying. Our residential proxies start at $0.50 per GB for one GB, and the balance does not expire.

Plugging it into a browser or system

The browser route is where most people start, and it is the right tool for checking how a page renders from another country. Chrome takes its proxy from the operating system's settings, which is why setting up a proxy in Chrome is really an operating system guide. Extensions add per-site control: FoxyProxy gives Firefox and Chrome per-site rules, and SwitchyOmega does the same with profiles you switch in one click. One trap catches many first setups: Chromium's own documentation says Chrome supports no authentication method for SOCKS5, so a proxy that needs a username and password goes into Chrome as an HTTP proxy.

The system guides cover Windows, macOS and Linux, where Linux has three separate layers that do not know about each other. Phones set a proxy per network, and the iPhone and Android guides walk the screens.

For programs with no proxy settings, proxychains forces their traffic through your proxy anyway, which makes it the tool of last resort on Linux. When the obstacle is the login, as it often is on Windows and in Chrome, there are three ways to make an authenticated proxy work in software that cannot send a password.

Two applications get their own guides because both have a trap. In antidetect browsers, a rotating IP quietly breaks the profile you bought the browser for. In qBittorrent, an HTTP proxy covers the tracker and leaves every peer connection on your own address.

Wiring it into code

Almost every HTTP library speaks two dialects: the HTTP_PROXY and HTTPS_PROXY environment variables, or an explicit proxy setting on the client. HTTPS rides through the proxy in a CONNECT tunnel either way, and RFC 9110 has the proxy forward that tunnel blindly, so it carries the encrypted bytes without reading them. The HTTP vs HTTPS proxy explainer covers the difference.

On the command line, curl is the reference and the fastest test you have, and curl-impersonate takes over when the target checks TLS fingerprints. In Python, Requests takes a two-line mapping per request or per session, httpx renamed its proxy argument and broke many older tutorials, and Scrapy moves the question into middleware. Browser automation has its own pair: Selenium wants the proxy at driver launch, and Playwright can give every browser context its own IP.

The rest of the stack: Node.js needs an agent or dispatcher object because fetch has no proxy option of its own, and Axios has a proxy option that fails on HTTPS targets, so its guide shows the agent that works. Go configures the Transport, Java separates proxy authentication from site authentication, C# and .NET route through HttpClientHandler, PHP sets cURL options, Ruby passes proxy arguments to Net::HTTP, and Rust builds a reqwest client with a Proxy value. Each guide covers authentication, rotation and the failures specific to its runtime.

The wall: twelve anti-bot systems by name

Sooner or later a defended site stops you, and the most useful thing you can do is identify the vendor that stopped you, because each one checks different things. The tells are usually in the cookies, the challenge page or the response headers, and how websites detect proxies explains the shared machinery: IP reputation, JA3 and JA4 TLS fingerprints and behavior scoring.

Cloudflare is the one you will meet first, because so much of the web sits behind it. Akamai guards many large retailers and airlines with its sensor-data cookies. DataDome is common on European marketplaces and serves its own CAPTCHA page. PerimeterX, now HUMAN, is the press-and-hold button. Kasada shows no visible challenge at all, which is its tell. Imperva announces itself through incapsula cookie names, Radware protects banks and airlines, and F5 Shape specializes in login flows with heavily obfuscated JavaScript. AWS WAF ships as a checkbox on CloudFront, so it appears on sites that never chose a bot vendor, and Fastly's bot defense rides its CDN the same way. Queue-it is a waiting room with rules of its own, and Arkose Labs serves the puzzles the next section covers.

Every one of those guides ends at the same point: the proxy decides whether you may knock, and the client fingerprint and behavior decide whether the door opens.

The puzzle: CAPTCHA families

A CAPTCHA is what a wall serves when it is unsure about you, so it is feedback as much as an obstacle. Why you keep hitting reCAPTCHA explains the reputation mechanics behind the frequency, and reCAPTCHA v3 covers the invisible variant that scores you without a puzzle. Cloudflare Turnstile replaced the checkbox with browser attestation, hCaptcha sells detection to sites that left Google, FunCaptcha is Arkose's rotating 3D puzzle, and GeeTest is the slide-the-piece family common on Chinese platforms. All six guides arrive at one lesson: solving is the expensive path, and avoiding the puzzle is the one worth engineering for.

The error on the screen

Error codes divide by who refuses you, and reading them that way turns debugging into a flowchart. A 407 is the proxy itself asking for credentials, before the target ever sees you; RFC 9110 defines it for a client that "needs to authenticate itself in order to use a proxy". A 403 is the target rejecting what it saw, which on defended sites usually means the wall above. A 429 says the target counts your request rate as too high. A 502 means the proxy reached the next hop and got a bad answer back, and a 504 means that hop never answered: the first is usually a dead exit, the second a slow target.

Which side refused you, read from the status code
Who is refusingWhat it means
407your proxyit wants credentials before the target sees you
403the targetit rejected what it saw
429the targettoo many requests in its time window
502the path betweenthe proxy got a bad answer from the next hop
504the path betweenthe next hop never answered
Source: RFC 9110; HProxy error guides · hproxy.comProxy.

Browsers name their own errors, and Google's search data shows which ones people meet most.

Proxy error messages people search for each month
ERR_​TUNNEL_​CONNECTION_​FAILED
8,100 searches
ERR_​PROXY_​CONNECTION_​FAILED
3,600 searches
407 Proxy Authentication Required
1,900 searches
ERR_​PROXY_​CERTIFICATE_​INVALID
480 searches
The proxy server is refusing connections
390 searches
ERR_​NO_​SUPPORTED_​PROXIES
210 searches
The tunnel error leads by far: Chrome reached the proxy, and the tunnel through it to the site failed.
Source: Google Ads Keyword Planner, worldwide monthly searches, read October 22, 2026 · hproxy.comProxy.

ERR_TUNNEL_CONNECTION_FAILED is the one most people search for: Chrome reached the proxy, and the CONNECT tunnel through it to the site failed. ERR_PROXY_CONNECTION_FAILED usually means the settings point at an address that does not answer, and Firefox's "the proxy server is refusing connections" is the same failure in other words. On the command line, curl's error codes map cleanly to causes once you know the table.

Staying unblocked once it works

A setup that works on Monday and a banned pool on Friday is the normal free-tier experience, and the fix is method. How to avoid IP bans while scraping is the prevention checklist: pacing, session discipline, header hygiene and rotation that matches how the target counts. Proxies for web scraping is the full playbook, and the use-case map covers target-specific versions, because Instagram and a price API count you in different ways.

Paying for the right thing

How much do proxies cost works through advertised rates against what a new customer actually pays, the cheapest residential proxies ranks entry prices with the volume gates spelled out, and how to vet a proxy provider is the checklist for everything a pricing page leaves out. The measured versions live in our data studies: the residential price study, and the scraping API credit multipliers study on why an API "request" is rarely one credit. The free proxy map covers the tier below, including the narrow places where free proxies hold.

The odd ones out

A few guides cover things that look like proxy setup and work differently. Telegram has its own MTProto proxy protocol built into the app. WhatsApp's in-app proxy exists for internet shutdowns, with rules of its own. A proxy for school networks is mostly a question about the network's filter. Free Fire is a latency and region problem in a game that bans aggressively. And the Janitor AI and DeepSeek "proxies" are reverse-proxy API keys for language models, a different thing wearing the same word, which both guides say up front.

What this page could not check

  • No network tests. We tested no proxy's speed or success rate, ours included. The pages-per-GB figures are arithmetic on public medians.
  • Your target's weight. A median page sits in the middle of the web; your target can weigh far more or far less, and caching lowers repeat loads.
  • Error searches. The counts include people on office or school networks who never chose a proxy.
  • Libraries change. httpx has renamed its proxy argument once already; check the guide for your version.
  • Check by January 22, 2027. Library APIs and page weights move; every figure here needs a fresh read by then.

Sources

  • RFC 9110, HTTP Semantics, sections 9.3.6 (CONNECT) and 15.5.8 (407 Proxy Authentication Required), IETF, June 2022.
  • curl manual, the --proxy option and the proxy environment variables, read October 22, 2026.
  • Requests documentation, Advanced Usage, Proxies, read October 22, 2026.
  • Chromium, "Proxy support in Chrome" (net/docs/proxy.md), read October 22, 2026.
  • HTTP Archive, Web Almanac 2024, Page Weight chapter, read October 22, 2026.
  • Google Ads Keyword Planner, worldwide monthly searches, read October 22, 2026.
  • HProxy residential proxies page and IP lookup, October 22, 2026.

Frequently asked questions

How do I use a proxy?

Take the four values your provider gives you (host, port, username and password), enter them in the tool that sends the traffic, and check that the exit address changed. Then read any error by the side that sent it: a 407 comes from the proxy, and a 403 or 429 from the target site.

What is the fastest way to test that a proxy works?

One curl line: curl -x http://user:pass@host:port https://api.ipify.org. If the address that comes back is the proxy's, the proxy carries traffic. Our IP lookup then shows the country, the network owner and whether the address runs a known proxy, and how to check if a proxy is working covers the full routine.

How do I use residential proxies?

Pick the location, choose a new address per request or a sticky session, generate the lines in your tool's format, and test one line before you scale. Residential traffic bills per GB, and a scraper that downloads only the HTML stretches a gigabyte about 150 times further than full page loads.

Can I use a proxy and a VPN at the same time?

Yes. With the VPN on, your connection to the proxy runs inside the VPN, so the proxy sees the VPN's address and the target site sees the proxy's. Our proxy vs VPN vs Tor guide explains what each layer hides.

Can I use a proxy on my iPhone?

Yes, per Wi-Fi network: Settings, Wi-Fi, the info button next to the network, then Configure Proxy, Manual, and the server, port and login. Mobile data needs a configuration profile, and SOCKS5 needs an app. Our iPhone guide shows every screen.

Why am I seeing 407 Proxy Authentication Required?

The proxy refuses you before your request reaches the target. A wrong or missing username and password is the usual cause, and a mismatched IP allowlist the less obvious one. Our 407 guide walks the checklist.

Will a proxy alone get me past Cloudflare or DataDome?

Rarely on its own. Anti-bot systems score the TLS fingerprint, the browser signals and the behavior along with the address, so a clean residential IP is one requirement among several on hard targets. The per-wall guides on this page cover what each system checks.

Proxies that don't die mid-job

Residential, ISP, datacenter and mobile, verified by the same engine that runs tens of millions of checks. They read as a real device and hold up under load. Pay as you go, and your balance never expires. $0.44/GB is the 2,000 GB+ rate; a single gigabyte is $0.50/GB, with no minimum order.

129M+ proxy checks run · 100+ countries · HTTP / HTTPS / SOCKS · re-checked every few minutes · no signup

HProxy.

Honest guides and comparisons on proxies, scraping and staying unblocked, from the team that runs the network.

RSS feed