Be young and be simple.
The client and server use X25519 for key exchange and ChaCha20 for encryption.
See conn.go
for the protocol.
A reference client is implemented in cmd/ss-client
.
- Generate an ephemeral key.
- Listen on a local port.
- Dial to the server.
- Perform key exchange.
- Encrypt all traffic from local port and forward to the server.
A reference server is implemented in cmd/ss-server
.
- Load a key from file or generates an ephemeral key.
- Listen on a local port.
- Perform key exchange.
- Decrypt incoming traffic, and depending on the operating mode:
- Dial to a remote port and forward all traffic.
- Serve in incoming traffic using SOCKS5 protocol.