Proxy connection code
Paste a proxy line in any format and get a ready-made example for curl, Python, Node.js or PHP. No data is sent to the server.
The code is built in your browser: the proxy line is not sent anywhere.
How to use it
- Paste a proxy line in any familiar format:
username:password@host:port,host:port:username:passwordor with the protocol at the start. - If the line does not specify a protocol, choose it in the list: HTTP or SOCKS5.
- Enter the address you want to open and the language. The code appears right away — copy it with the button.
By default the example uses an address that returns your external IP, so you can see at once that the request goes through the proxy.
What the examples take into account
- Special characters in the password. The username and password are encoded in the proxy address, so characters like
@and:in the password do not break the line. - SOCKS5 with name resolution on the proxy side. The examples use the variant in which the site name is passed to the proxy, so there is no DNS leak.
- Timeout. It is set to 30 seconds everywhere: short timeouts are often not enough for residential and mobile addresses.
- Required libraries. SOCKS5 in Python and Node.js needs an extra package — the install command is given in a comment.
If the code does not work
First test the line itself in the proxy checker: if the proxy responds there, look for the cause in your environment. The error code will tell you what is wrong — it is explained on the proxy error codes page. Detailed examples for individual languages are in the guides section.
FAQ
Is it safe to paste a username and password here?
Yes. The code is built in your browser; the proxy line is not sent to the server.
How is socks5h different from socks5?
With socks5h the site name is resolved by the proxy, not by your computer. That way name lookups do not bypass the proxy.
Which port should I use?
823 is HTTP, 824 is SOCKS5, with a new address on every request. Ports from 10000 to 20000 hold one address for 1 to 120 minutes.
Why is the built-in axios proxy disabled in the Node.js example?
The built-in setting works poorly with HTTPS sites. It is more reliable to route the connection through a separate agent, as in the example.
Need your own proxies?
Pick a type for your task and connect it with a step-by-step guide.
Residential $1.59, mobile $2.50, datacenter $0.80 per GB
Sign up in a minute, get access right after payment.