Lupino / shadowsocks-auth

带有用户和流量统计的 shadowsocks
MIT License
376 stars 124 forks source link

How to add this project to shadowsocks #5

Open k0tkin opened 8 years ago

k0tkin commented 8 years ago

Hi,

I don't understand Chinese May I ask you how i can add this project to shadowsocks?

Lupino commented 8 years ago

This project modify the original shadowsocks. add an auth handle an store user flow on redis.

the original client can' t connected to shadownsocks-auth server. you must use a modify client such https://github.com/Lupino/shadowsocks-gui or https://github.com/Lupino/shadowsocks-auth/tree/master/local

Lupino commented 8 years ago

build just use go get

go get github.com/Lupino/shadowsocks-auth/server
go get github.com/Lupino/shadowsocks-auth/local
Lupino commented 8 years ago

server usage:

redis-server &

$(GOPATH)/bin/server -p 8388 -redis=127.0.0.1:6379

redis-cli
redis 127.0.0.1:6379> set ss:user:lupino "{\"name\": \"lupino\", \"password\": \"lup12345\", \"method\": \"aes-256-cfb\", \"limit\": 10737418240}"
redis 127.0.0.1:6379> keys "*"
 1) "ss:flow:lupino:2014:7:31"
 2) "ss:flow:lupino:2014:7:29"
 3) "ss:user:lupino"
 4) "ss:flow:lupino"
Lupino commented 8 years ago
# redis keys
ss:flow:[username] sorted set total user flow
ss:flow:[username]:year:month:day sorted set user flow on a day
ss:user:[username] json user info
@name: the username
@password: the user password
@method: shadownsocks method
@limit: max limit flow
AminMhmdi commented 8 years ago

tnx for adding auth to shadowsocks. i config original shadowsocks on my windows server how can i config shadowsocks-auth in windows server?

Lupino commented 8 years ago

@jesonpark I thank is the same of config shadowsocks-auth and shadowsocks for windows

complie with GOOS=window will work

ldwnt commented 6 years ago

@Lupino i download this gui client Shadowsocks-win-dotnet4.0-2.5.2.zip as you mentioned here https://github.com/Lupino/shadowsocks-gui. but this client doesn't have a user name field in the server config: image am i using the wrong version?

Lupino commented 6 years ago

@ldwnt no support the original shadowsocks-gui client, must modify and recompile yourself

reference this commit https://github.com/Lupino/shadowsocks-gui/commit/8bc29e0d009d22194e438e4a14edc63c723447f1