Linux安装网络代理SSR

  • 第一步,先安装yarn、python-pip

    1
    2
    3
    4
    curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee 			 	/etc/yum.repos.d/yarn.repo
    curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
    yum install -y yarn
    yum install -y python-pip
  • 第二步,yarn安装ssr-helper

    1
    yarn global add ssr-helper
  • 第三步,ssr配置代理服务器地址

    1
    2
    3
    4
    cd /root
    git clone -b manyuser https://github.com/shadowsocksr-backup/shadowsocksr.git
    ssr config /root/shadowsocksr
    ssr add

    按提示输入数据,参考下列json(不保证代理服务器长久可用,建议自行配置代理服务器)
    {
    remarks: ‘’,
    group: ‘ssr-01’,
    obfsparam: ‘’,
    obfs: ‘plain’,
    protocolparam: ‘’,
    protocol: ‘origin’,
    method: ‘aes-256-cfb’,
    server_port: ‘34989’,
    password: ‘JtP2hxAj5l’,
    server: ‘70866.us-1.baacloud1.com’
    }

    1
    2
    3
    ssr connect ssr-01
    ssr status 当前配置的服务器是否可用
    ssr start 启动
  • 第四步,配置请求走代理

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    mkdir /etc/privoxy
    touch /etc/privoxy/config
    echo 'forward-socks5 / 127.0.0.1:1080 .' >> /etc/privoxy/config
    vim /etc/profile
    在该文件最后加上下面3行
    export http_proxy=http://127.0.0.1:8118
    export https_proxy=http://127.0.0.1:8118
    export no_proxy=localhost
    source /etc/profile
    yum install -y privoxy
    systemctl start privoxy.service
  • 第五步,测试

    1
    2
    3
    4
    5
    6
    # 访问各大网站,如果都有网页源码输出说明代理没问题
    curl -sL www.baidu.com
    curl -sL www.google.com
    curl -sL www.youtube.com
    curl -sL facebook.com
    curl -sL twitter.com