一键搭建Shadowsocks

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_41654241/article/details/79122028

本文方法适用于CentOS,Debian,Ubuntu。参考文章

一、安装:

wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh
chmod +x shadowsocks.sh
./shadowsocks.sh 2>&1 | tee shadowsocks.log

 等待安装完毕即可!

二、配置用户文件

1.配置文件路径:

/etc/shadowsocks.json

2.配置单用户模版:

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

3.配置多用户模版:

{  
    "server":"0.0.0.0",
    "local_address":"127.0.0.1",
    "local_port":1080,
    "port_password":{
         "8000":"password0",
         "8001":"password1",
         "8002":"password2",
         "8003":"password3",
         "8004":"password4"
    },
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

三、操作命令

启动:

# /etc/init.d/shadowsocks restart
或
# ssserver -c /etc/shadowsocks.json -d restart

停止:

# /etc/init.d/shadowsocks stop
或
# ssserver -c /etc/shadowsocks.json -d stop

重启:

# /etc/init.d/shadowsocks restart
或
# ssserver -c /etc/shadowsocks.json -d restart

状态:

/etc/init.d/shadowsocks status

日志路径:

/var/log/shadowsocks.log

四、备注

 自启动是默认开启的,无需添加自启动。如需关闭或开启,执行以下命令:

关闭
# update-rc.d shadowsocks remove
开启
# update-rc.d shadowsocks defaults

END

猜你喜欢

转载自blog.csdn.net/weixin_41654241/article/details/79122028
今日推荐