Ubuntu16 SSR客户端配置

随笔 2019-08-30 863 次浏览 次点赞

  1. 拥有ss服务端的账号密码等信息
  2. 安装依赖 sudo apt update && sudo apt install git vim -y
  3. 下载与安装

    mkdir -p ~/Proxy
    cd ~/Proxy
    git clone --branch akkariiin/master https://github.com/shadowsocksrr/shadowsocksr.git
    cd shadowsocksr
    bash initcfg.sh
  4. 配置
vim ~/Proxy/shadowsocksr/user-config.json
{
    "server": "xxx.xxx.xxx.xxx",
    "server_ipv6": "::",
    "server_port": xxxx,
    "local_address": "127.0.0.1",
    "local_port": 1080,

    "password": "xxxxxxxxxxxxx",
    "method": "xxxxxxxxxxx",
    "protocol": "xxxxxxxxxxxx",
    "protocol_param": "",
    "obfs": "xxxxxxxxxxxxxxx",
    "obfs_param": "",
    "speed_limit_per_con": 0,
    "speed_limit_per_user": 0,

    "additional_ports" : {}, // only works under multi-user mode
    "additional_ports_only" : false, // only works under multi-user mode
    "timeout": 120,
    "udp_timeout": 60,
    "dns_ipv6": false,
    "connect_verbose_info": 0,
    "redirect": "",
    "fast_open": false
}

根据实际替换其中的ip等参数

  1. 添加 systemd 服务
vim /lib/systemd/system/shadowsocksr.service
[Unit]
Description=Shadowsocks R Client Service
After=default.target

[Service]
ExecStart=/usr/bin/python3 /home/(username)/Proxy/shadowsocksr/shadowsocks/local.py -c 
/home/(username)/Proxy/shadowsocksr/user-config.json
Restart=on-abort

[Install]
WantedBy=default.target

根据实际替换其中的 username

6.设为系统服务并自启动

sudo systemctl daemon-reload
sudo systemctl restart shadowsocksr
sudo systemctl status shadowsocksr

Screenshot from 2019-08-30 23-05-49.png

active则服务启动成功

7.设置本机网络服务

Screenshot from 2019-08-30 22-49-46.png

最后测试浏览器访问google成功


本文由 Tony 创作,采用 署名-非商业性使用-相同方式共享 3.0,可自由转载、引用,但需署名作者且注明文章出处。

如果对您有用,您的支持将鼓励我继续创作!