Ubuntu配置shadowsocks

Ubuntu配置shadowsocks

从官网下载shadowsocks软件

apt-get install python-pip
pip install shadowsocks

配置/etc/shadowsocks.json(没有就新建一个)

{
    "server":"代理服务器IP",
    "server_port":代理服务器ss服务端口,
    "password":"密码",
    "timeout":300,
    "method":"加密类型"
}

启动服务

sudo sslocal -c /etc/shadowsocks.json

这时配置系统代理为127.0.0.1:8080即可科学上网

export http_proxy=127.0.0.1:8080
export https_proxy=127.0.0.1:8080

可能遇到的问题

在输入加密类型为aes-256-gcm后启动服务可能会遇到“ERROR method aes-256-gcm not supported”的版本不支持的错误。

shadowsocks解决method aes-256-gcm not supported方法。

pip install https://github.com/shadowsocks/shadowsocks/archive/master.zip -U
sudo apt-get install -y libsodium*