Linux配置SSR科学上网
Linux安装网络代理SSR
第一步,先安装yarn、python-pip
1
2
3
4curl --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
4cd /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
3ssr connect ssr-01
ssr status 当前配置的服务器是否可用
ssr start 启动第四步,配置请求走代理
1
2
3
4
5
6
7
8
9
10
11mkdir /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
https://blog.ubclejoke.cn/2021/05/16/Linux%E9%85%8D%E7%BD%AESSR%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 楚歌!
