A secure proxy setup is one where the proxy does what you expect and nothing more. It relays your traffic, changes the IP address websites see, and doesn't become a new weak point. Whether that holds true depends on three things you control: which protocol your traffic uses, how you handle your proxy credentials, and what you expect the proxy to protect. This page goes through each of them, with the technical detail you need to make good decisions.
What a proxy can and can't see
| Plain HTTP site | HTTPS site, through a CONNECT tunnel | |
|---|---|---|
| Destination host | Visible | Visible |
| Full URL and query string | Visible | Hidden |
| Headers and cookies | Visible | Hidden |
| Page content and form data | Visible | Hidden |
| Timing and amount of data | Visible | Visible |
The right-hand column is why HTTPS matters so much. When you visit an https:// site through a proxy, the encryption runs between your client and the website, and the proxy only relays encrypted bytes. It knows you connected to example.com and roughly how much data moved, but not what you read or typed. SOCKS5 behaves the same way for HTTPS traffic.
How HTTPS travels through a proxy
- Your client connects to the proxy and sends a CONNECT request naming the site and port, with your login in a
Proxy-Authorizationheader. - The proxy checks the login, opens a TCP connection to the site and replies that the tunnel is ready.
- Your client starts a TLS handshake with the site through the tunnel. Your client checks the site's certificate, not the proxy.
- From then on, the proxy passes encrypted data in both directions without being able to read it.
CONNECT example.com:443 HTTP/1.1
Host: example.com:443
Proxy-Authorization: Basic <base64 of USERNAME:PASSWORD>
One detail matters here. With a standard HTTP proxy connection, that CONNECT request itself travels to the proxy unencrypted, and Basic authentication is base64 encoding, not encryption. SOCKS5's username and password login is sent in the clear too. Anyone who can watch the network between you and the proxy, such as the operator of an untrusted Wi-Fi network, could read your proxy credentials. Run proxy-heavy work from networks you trust, such as your own server, and treat the credentials like any other password. The HTTP and SOCKS5 doc covers the connection options we support.
Keeping proxy credentials safe
Proxy credentials are worth money: anyone who has them can spend your traffic or use your IPs. A few habits keep them safe:
- Keep them out of code. Load them from an environment variable or a secrets file that's excluded from version control.
- Don't paste them into public chats, support forums, screenshots or shared notebooks.
- Use separate credentials for separate projects where your setup allows it, so a leak in one place doesn't expose everything.
- Watch your usage. A jump in traffic you didn't cause is usually the first sign of a leak.
- Change the password right away if you suspect a leak, then update every tool that uses it.
import os
import requests
# Set PROXY_URL outside your code, for example http://USERNAME:PASSWORD@HOST:PORT
proxy = os.environ["PROXY_URL"]
response = requests.get("https://example.com", proxies={"http": proxy, "https": proxy}, timeout=30)
print(response.status_code)
Many tools also read the standard HTTPS_PROXY and HTTP_PROXY environment variables, which keeps credentials out of your scripts entirely.
What a proxy does not protect
- Malware and phishing. A proxy relays whatever you download, good or bad, and it can't tell a fake login page from a real one.
- Your identity on sites you log in to. Logged-in accounts, cookies and browser fingerprints identify you whatever IP you use.
- DNS lookups made outside the proxy. If your system resolves hostnames itself, your DNS provider sees which sites you visit. Check with the DNS leak test.
- WebRTC. Browsers can expose IP addresses through WebRTC even when a proxy is set. The WebRTC leak test shows whether yours does.
- Plain HTTP. Anything sent without TLS can be read along the way, by the proxy and by every network in between.
- Other apps. A proxy set in one browser or script doesn't cover the rest of your device.
None of this is a flaw in a particular proxy. It's simply the scope of the tool. A proxy reroutes traffic. Encryption, safe browsing habits and up-to-date software do the rest of the security work.
A secure proxy setup, step by step
- Use a paid provider you can identify, with published terms and a privacy policy you've actually read.
- Prefer
https://URLs for everything, and never send passwords or personal data over plain HTTP. - Keep DNS at the proxy. HTTP proxies resolve hostnames for you, and with SOCKS5 you can use
socks5h://so the proxy does the lookup. - Store credentials outside your code, and change them if they leak.
- Run the leak tests above after any change to your browser or proxy settings.
- Keep your browser, libraries and operating system up to date, because a proxy won't protect a vulnerable client.
- Limit who has access. Share proxy details with the people and machines that need them, and no one else.
Why free proxies are the weakest link
Most of the risks on this page grow sharply with a free proxy from a public list. You don't know who runs it or why. The operator can log every site you visit, read and rewrite any plain HTTP page, and collect whatever credentials you send through it. Some open proxies are simply misconfigured servers, while others are set up deliberately to watch the traffic that passes through. HTTPS still protects page content, but you're trusting a stranger with everything else, and nobody answers for it when something goes wrong. For anything that involves an account, a payment or personal data, a free proxy isn't worth the risk.
Questions worth asking any provider
What do they record, and for how long? Read the privacy policy instead of trusting a "no-logs" badge, which no buyer can verify. Do they require authentication on every connection? Do they enforce acceptable use rules, so the IPs you share with others aren't burned by abuse? Who runs the service, and how do you reach them when something goes wrong?
Our answers are in our policies, and every product we sell uses username and password authentication over HTTP(S) or SOCKS5. When you're ready, compare packages on the pricing page. It's pay-as-you-go with no subscription, so you can start with a small package and check everything on this page for yourself.