1、查看系統(tǒng)
[root@localhost ~]# cat /etc/issue
CentOS release 6.6 (Final)
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-042stab106.6 #1 SMP Mon Apr 20 14:48:47 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux
2、安裝ShadowSocks
# yum install python-setuptools && easy_install pip
# pip install shadowsocks
3、創(chuàng)建配置文件/etc/shadowsocks.json
[root@localhost /]# touch /etc/shadowsocks.json
[root@localhost /]# vi /etc/shadowsocks.json
{
"server":"138.128.208.158",
"server_port":443,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"MyPass",
"timeout":600,
"method":"rc4-md5"
}
備注:加密方式官方默認(rèn)使用aes-256-cfb,推薦使用rc4-md5,因?yàn)?RC4比AES速度快好幾倍。
各字段說明:
server:服務(wù)器IP
server_port:服務(wù)器端口
local_port:本地端端口
password:用來加密的密碼
timeout:超時時間(秒)
method:加密方法,可選擇 “bf-cfb”, “aes-256-cfb”, “des-cfb”, “rc4″等
4、使用配置文件在后臺運(yùn)行shadowsocks服務(wù)
[root@localhost /]# ssserver -c /etc/shadowsocks.json -d start
備注:若無配置文件,在后臺可以使用一下命令運(yùn)行:
[root@localhost /]# ssserver -p 443 -k MyPass -m rc4-md5 -d start
5、停止服務(wù)
[root@localhost /]# ssserver -c /etc/shadowsocks.json -d stop
專注數(shù)字化方案建設(shè),推動智慧企業(yè)生態(tài)圈的升級發(fā)展