搬瓦工Shadowsocks配置多用户教程|多端口密码配置 本文前提是你的搬瓦工服务器已经安装Shadowsocks服务了,在此基础上配置多用户账户~
搬瓦工Shadowsocks配置多用户教程|多端口密码配置
首先终端连接服务器命令行编辑新建:
vi /etc/shadowsocks.json
按i输入模式输入以下内容: 单用户配置:
{ 'server': 'xxx.xxx.xxx.xxx', 'server_port': 8381, #端口任意(前提不占用已用端口) 'local_address': '127.0.0.1', 'local_port': 1080, 'password': 'xxxxxx', #密码 'timeout': 300, 'method': 'aes-256-cfb', 'fast_open': false }
多用户配置:
{ 'server': 'xxx.xxx.xxx.xxx', #填入你的IP地址 'local_address': '127.0.0.1', 'local_port': 1080, 'port_password': { '8381': 'xxxxxx', #端口号,密码 '8382': 'xxxxxx', '8383': 'xxxxxx', '8384': 'xxxxxx' }, 'timeout': 300, 'method': 'aes-256-cfb', 'fast_open': false }
其中账户数任意,即port_passsword中数量任意,注意最后一个结尾没有逗号~ 以上将xxx的地方替换成你自己的就可以了 按esc,:wq保存退出
Name | 说明 |
---|---|
server | 服务器地址,填ip或域名 |
local_address | 本地地址 |
local_port | 本地端口,一般1080,可任意 |
server_port | 服务器对外开的端口 |
password | 密码,可以每个服务器端口设置不同密码 |
port_password | server_port + password ,服务器端口加密码的组合 |
timeout | 超时重连 |
method | 默认: “aes-256-cfb”,见 Encryption |
fast_open | 开启或关闭 TCP_FASTOPEN, 填true / false,需要服务端支持 |
启动:
- 前端启动:ssserver -c /etc/shadowsocks.json;
- 后端启动:ssserver -c /etc/shadowsocks.json -d start;
- 停止:ssserver -c /etc/shadowsocks.json -d stop;
- 重启(修改配置要重启才生效):ssserver -c /etc/shadowsocks.json -d restart
设置开机启动:
- 在终端输入vi /etc/rc.local,
- 把里面最后的带有ssserver的一大段默认的代码删除掉,
- 再把ssserver -c /etc/shadowsocks.json -d start加进去,
- 按wq保存退出。
如图:
重启服务器单用户、多用户配置启动,试试运行吧~ 参考:
- https://blog.huihut.com/2016/12/03/BandwagonShadowsocksServer/
- https://www.wervps.com/we/1079.html
- http://www.sorared.com/archives/85/
原创,转载请注明出处豆豆网
欢迎分享至:
版权声明:原创文章自由转载-非商用-非衍生-保持署名及文章出处(创意共享3.0许可证)
转载说明:转载请注明出处豆豆网
部分文章选自网络(文首、末未标明豆豆网的均来自网络),我们对文中观点保持中立,本站涉及软件下载,仅供参考学习、交流之目的,涉及版权请告知删除,邮箱地址:豆豆网博客