VPN技术 · 2023年11月10日 0

Shadowsocks 用户与流量统计

Shadowsocks 用户与流量统计

在提供 Shadowsocks 服务时,可以通过单一端口和用户模式来服务多个用户,而无需启动多个服务实例。同时,流量统计功能允许实时监控用户流量,并设置流量限制。

相关的 GUI 客户端可以在此获取:https://github.com/Lupino/shadowsocks-gui

构建方法

git clone https://github.com/Lupino/shadowsocks-auth.git  cd shadowsocks-auth  make  

服务器配置

$(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"    

服务器端的脚本可在此找到:https://gist.github.com/Lupino/d0609ab79d873b2c1015

本地配置

请修改 config.json 文件如下:

{      "server":"23.226.79.100",      "server_port":8388,      "local_port":1080,      "password":"lupino:lup12345",      "method": "aes-256-cfb",      "timeout": 600  }      $(GOPATH)/bin/local -c config.json