SOCKS: Asking Another Server to Carry the Connection
SOCKS is a protocol that lets a program ask a proxy server to relay its communication. A proxy is an intermediary: the program contacts it, tells it where it wants to go, and asks it to make the next connection.
That arrangement changes the path the communication takes. It doesn't automatically make the contents secret or the person using it anonymous. The route and the protection around the data do different jobs.
First, permission to use the relay
In SOCKS version 5, the client—the program requesting the service—first contacts the SOCKS server. They negotiate how the client will authenticate, or establish that no authentication is required. Authentication is a way to check the client before allowing it to use the relay.
The client then supplies its intended destination. The proxy can accept or refuse the request. For an accepted outward TCP connection, the proxy opens a separate connection to the destination and relays data between the two sides. TCP, the Transmission Control Protocol, supplies reliable, ordered communication.
What Changes When a Proxy Stands Between You and a Website?
The SOCKS5 specification defines this exchange. It explains why a proxy is more than a different address typed into an application: the application and proxy have a conversation about what to connect to and whether that connection is allowed.
Because the proxy makes the outward connection, the destination ordinarily sees the proxy's network address for that connection. That is a useful property of a forward proxy, which acts on a client's behalf. Only communication routed through it takes this path.
SOCKS5 also supports UDP, the User Datagram Protocol, which carries separate messages called datagrams. It accepts destination names as well as numerical network addresses. These choices let it serve more than web requests, but they don't make it a general service for forwarding every kind of network packet.
What happens to an encrypted web page?
Suppose an application uses the relay to reach an HTTPS website. HTTPS protects web communication with Transport Layer Security, or TLS. In an ordinary relay arrangement, that protection can continue between the application and website as the data passes through the proxy.
The proxy's presence doesn't, by itself, turn the protected content back into readable text. Encryption and relaying do different jobs: one protects the content; the other carries it along another route.
TLS doesn't conceal every detail of a connection. Its specification notes that information such as the lengths of transmitted data can remain visible. And changing the network address a website sees doesn't erase the identity of an account used on that website.
- Turn sketchy hotel and airport Wi-Fi into your own private network in minutes.
- Put every device you own behind your VPN at once, with nothing to install on each one.
- Block ads and trackers for everything connected with the flick of a switch.
The password isn't necessarily protected
Authentication sounds like a security feature because it is one: it can restrict who gets to use the proxy. But checking a password and hiding that password are separate tasks.
The SOCKS username-and-password method specified in RFC 1929 sends the password in cleartext, meaning readable form. Without other protection around that exchange, someone able to observe it may read the credential. The limitation belongs to this method; it isn't a description of every possible SOCKS authentication arrangement.
Forward Proxies: What That Extra Server Can See

Network Tunnels: How One Packet Rides Inside Another

VPNs: Follow the Protected Connection to Its Exit

QUOTE:
"Amateurs hack systems, professionals hack people."
