您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
安装 shadowsocks
1. 安装shadowsocks
pip install shadowsocks
2. 编写shadowsocks配置文件测试,配置文件如下:
cat >> /etc/shadowsocks.json <<EOF { "server":"0.0.0.0", "server_port":1075, "local_port":1080, "password":"25d55ad283aa400af464c76d713c07ab", "timeout":10, "method":"aes-256-cfb" } EOF
3.测试配置文件是否可用
ssserver -c /etc/shadowsocks.json
4.如果启动成功,出现1075端口即可
5. 使用supervisor管理shadowsocks进程。安装 supervisor
pip install supervisor
6. 启动 supervisor
mkdir -p /etc/supervisor/conf.d/ cat >>/etc/supervisor/supervisor.conf<<EOF ; supervisor config file [unix_http_server] file=/var/run/supervisor.sock ; (the path to the socket file) chmod=0700 ; sockef file mode (default 0700) [supervisord] logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) ; the below section must remain in the config file for RPC ; (supervisorctl/web interface) to work, additional interfaces may be ; added by defining them in separate rpcinterface: sections [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket ; The [include] section can just contain the "files" setting. This ; setting can list multiple files (separated by whitespace or ; newlines). It can also contain wildcards. The filenames are ; interpreted as relative to this file. Included files *cannot* ; include files themselves. [include] files = /etc/supervisor/conf.d/*.conf EOF
启动supervisor
supervisord
7. 添加supervisor 的shadowsocks配置文件
cat >>/etc/supervisor/conf.d/shadowsocks.conf <<EOF [program:shadowsocks] command=ssserver -c /etc/shadowsocks.json autorestart=true redirect_stderr=true stdout_logfile=/tmp/shadowsocks.log stdout_logfile_maxbytes=300MB stdout_logfile_backups=10 stdout_capture_maxbytes=500MB EOF
8.重新加载supervisor
supervisorctl update
9.检查supervisor是否启动了shadowsocks
ubuntu@ip-172-131-12-251:~$ sudo supervisorctl status shadowsocks RUNNING pid 18785, uptime 0:13:10 ubuntu@ip-172-131-12-251:~$ 出现RUNNING 即成功
windows客户端下载地址:https://github.com/shadowsocks/shadowsocks-windows/releases/download/4.0.4/Shadowsocks-4.0.4.zip
mac客户端下载地址:https://github.com/shadowsocks/shadowsocks-iOS/releases
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。