From 18d47ec8572f74edb0131b45080b35bcd06279bc Mon Sep 17 00:00:00 2001 From: Qian Wang Date: Mon, 3 Dec 2018 21:01:56 +0000 Subject: [PATCH] Add instructions --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index cb811be..2ee4940 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,19 @@ This project is based on [GoQuiet](https://github.com/cbeuw/GoQuiet). The most s - 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) +1. Clone the repo +2. Build and run cmd/keygen. You may want to keep the public and private keys somewhere +3. Substitute the fields in config/ckserver.json and config/ckclient.json with the output of keygen +4. Run keygen again and copy only the UID to AdminUID in ckserver.json. This is your AdminUID. +5. On your server, run `ss-server -c --plugin --plugin-opts ""` +6. On your client, run `ck-client -a -c ` to enter admin mode +7. Input as prompted, that is your ip:port of the server and your AdminUID. Enter 4 to create a new user. +8. 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) +9. Ctrl-C to quit admin mode, start Shardowsocks with `ss-local -c --plugin --plugin-opts ""` + +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.