搭梯子

系统

Ubuntu 16.04 64bit

安装
apt-get install python-pip
pip install --upgrade pip
pip install shadowsocks
使用

配置文件  /etc/shadowsocks.json

{
    "server":"0.0.0.0",
    "server_port":8388,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"mypassword",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

后台运行

ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop

配置服务

/etc/init.d/shadowsocks

#!/bin/bash

start(){
    echo "Starting Shadowsocks..."
    /usr/local/bin/ssserver -c /etc/shadowsocks.json -d start
}

stop(){
    echo "Stoping Shadowsocks..."
    /usr/local/bin/ssserver -c /etc/shadowsocks.json -d stop
}
case $1 in
start):
start
;;
stop):
stop
;;
esac

exit 0

添加到service

update-rc.d shadowsocks defaults
service shadowsocks start
service shadowsocks stop

愉快的玩耍吧~~~

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据