What Is a SOCKS5 Proxy and How Does It Compare to a VPN
Patrick Bushe
November 21, 2024 · 5 min read
A SOCKS5 proxy is a server that relays traffic for the apps you point at it, so websites see the proxy's IP address instead of yours. A VPN does something similar for your whole device and encrypts the traffic too. They overlap, but they solve different problems.
How a SOCKS5 proxy works
- You set an app, such as a browser or a torrent client, to send its connections through the proxy's address and port.
- The proxy forwards them to the destination, which sees the proxy's IP address.
- SOCKS5 can carry almost any kind of traffic, including UDP, and supports a username and password.
- It doesn't encrypt anything by itself. Your internet provider can't see the final destination's content if the site uses HTTPS, but the proxy connection itself isn't protected.
SOCKS5 vs VPN
- Encryption: a VPN encrypts everything between you and the VPN server. A plain SOCKS5 proxy doesn't.
- Coverage: a VPN covers every app on the device. A proxy covers only the apps you configure.
- Speed: without encryption, a proxy adds less overhead, which is why it's popular for torrenting and bulk downloads.
- Setup: a VPN is one app and one button. A proxy has to be set in each app.
Choose a VPN for privacy on public Wi-Fi and to protect everything at once. Choose a proxy when you want one app to appear somewhere else, without routing the rest of your traffic.
Using a SOCKS5 proxy in Chrome
Chrome uses your system's proxy settings, or you can start it with a proxy for that session only:
chrome.exe --proxy-server="socks5://127.0.0.1:1080"
Chrome doesn't support SOCKS5 usernames and passwords, so for a proxy that needs a login, use a proxy extension or a local helper. Firefox has SOCKS5 settings built in, including an option to send DNS lookups through the proxy.
A handy trick: if you have access to a server over SSH, ssh -D 1080 user@server turns it into a SOCKS5 proxy on your computer, and that connection is encrypted by SSH.
Watch out for WebRTC leaks
Browsers use WebRTC for video calls, and it can connect around a proxy and reveal your real IP address to a website. That defeats the point of the proxy. In Chrome, WebRTC Privacy Shield at its strongest level tells Chrome to send WebRTC only through your proxy. See what a WebRTC leak is for how to test.
Be careful with cheap or free proxies
Whoever runs the proxy can see where your traffic goes, and on sites without HTTPS, what's in it. Free and very cheap proxy lists are often slow, logged, or run on hijacked devices. Use a proxy from a provider you trust, or run your own.