2.5 KiB
Cloak
A shadowsocks plugin that obfuscates the traffic as normal HTTPS traffic and disguises the proxy server as a normal webserver.
This is an active WIP. The functionality is incomplete, the code is messy and nothing has been properly tested (though the core multiplexing part seems to work fine). Everything is subject to change.
This project is based on GoQuiet. The most significant difference is that, in GoQuiet, a new TCP connection is establieshed and a TLS handshake is done between the client and the proxy server each time a connection is made to ssclient, whereas in Cloak all the traffic is multiplexed through a fixed amount of consistant TCP connections between the client and the proxy server. The major benefits are:
-
Significantly quicker establishment of new connections as TLS handshake is only done on the startup of the client
-
More realistic traffic pattern
Besides, Cloak allows multiple users to use one server on a single port. QoS restrictions such as bandwidth limitation and data cap can also be managed.
Setup Instructions
(unless specified, all UID are presented in base64 encoded form)
- Clone the repo
- Build and run cmd/keygen. You may want to keep the public and private keys somewhere
- Substitute the fields in config/ckserver.json and config/ckclient.json with the output of keygen
- Run keygen again and copy only the UID to AdminUID in ckserver.json. This is your AdminUID.
- On your server, run
ss-server -c <path-to-ss-config> --plugin <path-to-ck-server-binary> --plugin-opts "<path-to-ckserver.json>"
- On your client, run
ck-client -a -c <path-to-ckclient.json>
to enter admin mode - Input as prompted, that is your ip:port of the server and your AdminUID. Enter 4 to create a new user.
- Enter the UID in your ckclient.json as the prompted UID, enter SessionsCap (maximum amount of concurrent sessions a user can have), UpRate and DownRate (in bytes/s), UpCredit and DownCredit (in bytes) and ExpiryTime (as a unix epoch)
- Ctrl-C to quit admin mode, start Shardowsocks with
ss-local -c <path-to-ss-config> --plugin <path-to-ck-client-binary> --plugin-opts "<path-to-ckclient.json>"
If you want to add a new user, just run keygen again and put the UID into ckclient.json of the new user (don't touch the public and the private key), and do steps 6-8 again to add the new user into the server.
The user database is persistent as it's in-disk. You don't need to add the users again each time you start ck-server.