centos7安装SS代理客户端

  1. 云栖社区>
  2. 博客>
  3. 正文

centos7安装SS代理客户端

calvink 2018-05-24 17:45:00 浏览2530
展开阅读全文

linux上安装不可描述的软件。有些时候github什么的总是访问慢呀,尤其是npm安装有些资源down不下来,很是恼火!

第一步安装ss客户端

#参考:https://github.com/shadowsocks/shadowsocks-libev
yum -y install epel-release
yum -y install python-pip
pip install shadowsocks

sudo yum install gettext gcc autoconf libtool automake make asciidoc xmlto c-ares-devel libev-devel
# Installation of Libsodium
export LIBSODIUM_VER=1.0.13
wget https://download.libsodium.org/libsodium/releases/libsodium-$LIBSODIUM_VER.tar.gz
tar xvf libsodium-$LIBSODIUM_VER.tar.gz
pushd libsodium-$LIBSODIUM_VER
./configure --prefix=/usr && make
sudo make install
popd
sudo ldconfig

第二步编辑json文件

vi /etc/shadowsocks.json
#例如:
{
    "server":"*",
    "server_port":*,
    "local_address": "0.0.0.0",
    "local_port":1080,
    "password":"*",
    "timeout":300,
    "method":"chacha20",
    "fast_open": false,
    "workers": 1
}

第三步sslocal设置系统服务并开机自动启动

vi /etc/systemd/system/sslocal.service

[Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/sslocal -c /etc/shadowsocks.json
[Install]
WantedBy=multi-user.target

systemctl enable sslocal
systemctl start sslocal

大公告成,如果在配合一个privoxy工具,嗯!很是爽歪歪

网友评论

登录后评论
0/500
评论
calvink
+ 关注