Shadowsocks Mac: the Plaintext Half on 127.0.0.1

Every shadowsocks for mac guide ends at the same screen: a server address, a port, a password. None of them say what the client actually puts on the machine. We built a Shadowsocks chain from the published wire format, pointed a real browser at it, and logged both legs of every connection: the hop between the browser and the local listener, and the hop between the listener and the server.

The result splits cleanly in two. The tunnel leg behaves exactly as the encryption promises. The local leg is a plain SOCKS5 door with no lock on it, and sixteen handshakes proved it.

16connections logged on both legs
16 / 16local handshakes in plaintext
0credentials the local door required
81 Bfirst frame of every tunnel

The encryption starts after the local listener, and the listener itself is a shared, unauthenticated SOCKS5 door.

measured

1. What a Shadowsocks client actually puts on the Mac

A Shadowsocks client is two programs in one. Facing the internet it speaks the encrypted stream: a random salt, an AEAD-encrypted address header, and authenticated chunks, as measured in our wire-format page. Facing the machine it speaks plain SOCKS5 on a loopback port, because the browser, curl and every other local tool already know how to speak SOCKS5 and nothing on that hop is worth encrypting from the machine's own point of view.

That split is the whole story of this page. The protocol's threat model begins at the network interface. Everything before the listener, meaning everything on the Mac itself, is assumed to be trusted. The measurement below shows what that assumption means in practice: which bytes are readable, to whom, and at which hop the hostnames disappear.

2. The chain, measured with a real browser

The test chain had two parts: a local listener on 127.0.0.1:1081 speaking standard SOCKS5, and a test server speaking the published AEAD format, each side logging its own leg. Chrome was pointed at the local door with the ordinary proxy switch and navigated three pages. The full window ran from 06:46:45Z to 06:46:52Z, and all three pages returned HTTP 200 through the chain.

Three page navigations through a hand-built Shadowsocks chain, with local-leg and tunnel-leg observations.
PageLocal leg sawTunnel leg sawDelivered
example.comhostname in plaintext81-byte first frame6,999 B
info.cern.chhostname in plaintext82-byte first frame8,918 B
example.orghostname in plaintext81-byte first frame7,008 B

Two details in that table deserve a pause. First, every navigation landed on port 443 even though the addresses were typed as http: the browser upgraded to TLS on its own, so the payload crossed the tunnel encrypted twice, once by the browser and once by the Shadowsocks stream. Second, the tunnel side of the same requests reduced to a salt, an 81-byte opening frame and opaque chunks, while the local side still held the full hostname as readable text. The two logs describe the same seven seconds from two different trust levels.

3. The door has no lock

The local listener does not authenticate, and it does not even insist on the no-authentication method. All sixteen greetings opened with the same two bytes, 0501, and listed a single method; the door replied 05 00, the one-byte clearance that the session may continue without any identity at all. Fifteen of the sixteen connections offered the standard no-auth greeting. The sixteenth was our stranger probe: a separate process that connected to the same door offering only the username-password method, with no password to send, the shape of a client configured for a proxy that requires credentials. The door answered with the no-auth reply anyway, granted the CONNECT, and the request crossed the entire encrypted chain to the target.

The practical meaning is that the tunnel is a shared resource for everything on the machine. The password protects the ride from the listener onward; it does nothing to decide who gets to board. On a single-user Mac that is exactly what you want, because every app can use the tunnel without configuration. On a machine with untrusted software, the same property becomes a liability: any process, including one you did not approve, reaches the internet through your encrypted exit and inherits its address.

4. Six background connections you did not open

Chrome's three navigations produced ten page connections, but the local log recorded sixteen in total, and nothing in the exchange separates the browser that owns the machine from software that merely runs on it. The other six went to clients2.google.com, update.googleapis.com, www.gstatic.com, accounts.google.com, www.google.com and dl.google.com, all opened by the browser on its own. Each one crossed the tunnel the same way, so the server's network saw none of those hostnames, but the local leg spelled out every one of them in plaintext.

This is the same asymmetry the Chrome wire capture found on a plain SOCKS5 proxy, and Shadowsocks does not change it: the local leg is SOCKS5 either way. Whoever can read process traffic on the machine can list which services a browser is talking to, no matter how strong the tunnel is. Conversely, this is also the sign that tells you a client is working: the local log fills up even when no page is open.

5. What this changes about picking a client

Stating the limits first: there was no macOS host in the loop, so the application measured was Chrome on Windows riding a hand-built chain, and the listener behavior follows the protocol rather than any one shipped client. With that said, the property being measured belongs to the architecture, not to an implementation, because every Shadowsocks client ships the same kind of plain local door.

The buying decision that follows is straightforward. Shadowsocks is the right tool when the link between the machine and the exit is the thing being watched, and it is a poor substitute for per-application isolation, which is a different product category. If the goal is that several identities never share one exit, a plain SOCKS5 endpoint plus a client that separates profiles does the isolation part and leaves the encryption decision to each site. The two tools differ at exactly the hop this page measured, and knowing where the plaintext ends is what makes the choice rational.

One exit per profile, not one exit per machine?

Download RoxyBrowser

Each profile carries its own cookie jar and proxy, so a shared local door stops being a shared identity.

Frequently Asked Questions

Does Shadowsocks encrypt traffic on the Mac itself?

No. The encryption covers the leg between the client and the Shadowsocks server. The leg between an application and the client's local listener on 127.0.0.1 is plain SOCKS5: in the measured chain every one of the 16 local handshakes arrived as readable plaintext, including the target hostnames of six background connections.

Can other programs on the Mac use a Shadowsocks client without a password?

Yes. The local door does not ask for credentials. A test probe that offered only the username-password method, with no password to send, was still answered with the no-authentication reply and had its CONNECT granted, and the request crossed the full encrypted chain to the target. Any process on the machine can ride the tunnel.

What can an observer on the local machine see?

The same things a plain SOCKS5 listener exposes: the method list, the address type and the destination hostname of every connection. In the measurement the local leg carried the names example.com, info.cern.ch, example.org and six Google background hosts in cleartext, while the tunnel leg showed only 81-byte and 82-byte frames.

Is TLS still needed inside Shadowsocks?

For HTTPS sites the browser adds TLS on top, and the measured pages did exactly that: every navigation upgraded to port 443, so the payload was encrypted twice, once by the browser and once by the Shadowsocks stream. For plain HTTP sites the Shadowsocks stream is the only encryption, and the destination hostname is hidden only past the local listener.