Proxies and networking
Which proxy ports should a scraper use?
Whichever port your provider documents for the protocol and session behavior you need. The port only addresses the proxy server; the target site still receives ordinary HTTPS traffic on port 443.
The answer
A proxy URL such as http://user:pass@gate.example.net:8000 contains a port that points at the proxy service, and that number is chosen by whoever runs it. There is no port that makes scraping faster or stealthier by itself. Use the one documented for the protocol you want (HTTP or SOCKS5) and, on gateways that use ports to choose behavior, the one that gives you the right session type or location. What matters for detection is the IP that exits the proxy and the traffic you send through it.
Common conventions
| Port | Usual meaning |
|---|---|
| 8080, 3128, 8000, 8888 | HTTP proxies (3128 is the traditional Squid default) |
| 1080 | SOCKS proxies, the registered SOCKS port |
| Ranges such as 10000 to 10999 | gateway ports that each map to a sticky session or exit |
| Provider-specific ports | a country, city or rotation mode per port |
These are conventions, not rules. Always copy the host and port from your provider's dashboard or docs.
Ports that select behavior
Many gateway-style services expose one hostname and use the port number, or a parameter in the username, to choose what you get. A typical scheme assigns one port to "rotate on every request" and a range of ports where each number is a separate sticky identity. Others map ports to countries. If your scraper keeps getting new IPs when you expected a sticky session, check whether you are on the rotating port. The page on rotating and sticky proxies explains when you want each.
Target ports are separate
When you fetch https://shop.example.com/ through an HTTP proxy, your client first connects to the proxy port, then sends a CONNECT shop.example.com:443 request, and the proxy opens a tunnel to port 443 at the target. The site sees a normal TLS connection from the proxy's exit IP. Some proxies restrict CONNECT to ports 80 and 443 to prevent abuse, so if you need another target port (an API on 8443, for example), confirm it is allowed.
Testing a port from the command line
# does the proxy answer, and which IP do targets see?
curl -sS -x "http://USER:PASS@gate.example.net:8000" https://api.ipify.org; echo
# the same through SOCKS5, resolving names on the proxy side
curl -sS -x "socks5h://USER:PASS@gate.example.net:1080" https://api.ipify.org; echo
# is the port reachable at all from this machine?
nc -vz gate.example.net 8000
If nc cannot connect, the problem is reachability, not credentials: a firewall on your side, a wrong host, or a port your provider does not use. The socks5h scheme makes the proxy resolve DNS, which avoids leaking lookups from your machine; see SOCKS5 support.
Outbound firewalls
Corporate networks and some cloud hosts block outgoing connections on unusual ports. If a proxy works from your laptop but not from a server, check the server's egress rules for the proxy port. Providers often offer an alternative port for this reason.
Ports when passing a proxy to a CAPTCHA task
For task types that take your proxy, such as the Cloudflare Challenge and DataDome Slider tasks, the port is part of the proxy string you send, for example http://user:pass@1.2.3.4:8080. Send the same host and port your scraper uses, and if the port selects a sticky session, use the same session port so the solver's exit IP matches yours. Otherwise the clearance cookie is tied to a different address. The full format is on proxy format for tasks.
Common mistakes
- Using the SOCKS port with an
http://scheme, or the reverse. The handshake fails with confusing errors. - Mixing the rotating and sticky ports between the browser and the solver.
- Assuming a port is wrong when the real error is 407 proxy authentication.
- Hard-coding one port per provider when the provider uses ports to encode location.
Common questions
Is port 8080 better than 3128 for scraping?
No. They are conventions; use whichever port your provider documents. Performance depends on the service, not the number.
What port does SOCKS5 use?
The registered default is 1080, but providers can run SOCKS5 on any port.
Does the target site see my proxy port?
No. It sees a connection from the proxy's exit IP on its own port, usually 443.
Why does a different port give me a different IP?
Many gateways map ports to sessions, rotation modes or countries, so each port is a different identity.
Which port should I give the solver for a proxy task?
The same host and port your scraper uses, so the solved cookie matches your exit IP.
Keep reading
- Proxy serverA forward proxy relays requests under its own address; see what it changes, what it keeps and how credentials are written.
- What proxy format does a solving task accept?Tasks take one proxy string in URL form, http://user:pass@host:port, in the proxy field of the task object.
- Do proxies support SOCKS5?Many proxy services offer SOCKS5 next to HTTP; it carries any TCP traffic, while HTTP proxies are simpler to set up.
- SOCKS5 proxySOCKS5 relays raw TCP and UDP connections rather than HTTP messages; compare it with HTTP proxies and see how it authenticates.