> CentOS > CentOS教程 >

CentOS 7 安装 shadowsocks 客户端

1、CentOS 7 安装 shadowsocks 客户端
yum install -y gcc automake autoconf libtool make build-essential curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel git asciidoc xmlto
git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev
./configure --prefix=/use/local/shadowsocks 
make && make install

2、写入配置文件
mkdir -p /etc/shadowsocks
vim /use/local/shadowsocks/etc/config.json
写入
{
 "server":"0.0.0.0",
 "server_port":1234,
 "local_address": "127.0.0.1",
 "local_port":1080,
 "password":"password",
 "timeout":300,
 "method":"aes-256-cfb",
  "fast_open": false,      
  "workers": 1  
}
把相应的信息修改为自己服务器信息

3、创建start.sh
#=========================================
#!/usr/bin/sh
ss-local -c /usr/local/shadowsocks/etc/config.json >/usr/local/shadowsocks/run.log 2>&1 &

4、执行./start.sh即可
  
5、 查看后台进程
ps aux|grep ss-local |grep -v grep

注意:socks5代理不能转发http请求,需要privoxy将http转发给socks5方可使用。



(责任编辑:IT)