How does a SOCKS5 proxy work?



Your app connects to the SOCKS5 proxy server and authenticates, either with a username and password or because its IP is on your allowlist.
The app tells the proxy which host and port it wants to reach.
The proxy opens the connection from its own IP and relays data in both directions.
The destination sees the proxy's IP, not yours. If you send a hostname rather than an IP address (in Python, that's the socks5h scheme), the proxy resolves DNS too, so lookups don't leak from your machine.
SOCKS5
HTTP(S)























