Ubuntu下安装ss服务端

来源:互联网 发布:查看软件的注册表 编辑:程序博客网 时间:2024/05/01 12:20

不废话直接上步骤

1.安装python

apt-get updateapt-get install python-gevent python-pip

2.安装ShadowSocks

pip install shadowsocks

3.新建一个配置文件,我用的vim

vim /etc/ss.json// 输入命令后进入编辑页面按i进入insert模式,输入下面的配置信息:{    "server":"my_server_ip",    "server_port":8388,    "local_port":1080,    "password":"barfoo!",    "timeout":600,    "method":"table"}// server          服务器 IP (IPv4/IPv6),注意这// 也将是服务端监听的 IP 地址// server_port     服务器端口// local_port      本地端端口// password        用来加密的密码// timeout         超时时间(秒)// method          加密方法,可选择 "bf-cfb", "aes-256-cfb", "des-cfb", "rc4", 等等。默认是一种不安全的加密,推荐用 "aes-256-cfb"

4.启动服务

ssserver -c /etc/ss.json -d start//上面这条命令可以启动ss服务端并且长期运行,如果想要开机启动可以加入下面的命令:/usr/local/bin/ssserver -c /etc/ss.json -d start

5.搞定。

下面是一些官方的链接

https://github.com/clowwindy/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E
https://github.com/clowwindy/shadowsocks/wiki/Ports-and-Clients

问题收集

  1. 服务端配置完后,运行命令ssserver -c /etc/shadowsocks.json,报错socket.error: [Errno 99] Cannot assign requested address
    解决办法: 编辑ss.json,把服务器ip改为0.0.0.0,保存,重新启动ssserver -c /etc/shadowsocks.json
0 0