首页 期权学习期权知识正文

linux ubuntu下shell终端使用ssr设置全局代理,命令行也走代理

xiaojiucai 期权知识 2020-08-18 1556 0

通过proxychains实现

  • 安装 

  • sudo apt-get install proxychain
  • 配置

编辑~/.proxychains/proxychains.conf

strict_chain
proxy_dns
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000
localnet 127.0.0.0/255.0.0.0
quiet_mode
[ProxyList]
socks5  127.0.0.1 108

最后的这个socks里的值写代理的ip,不一定是本机

  • 使用方法 
    命令前加上proxychains:

proxychains4 curl https://www.google.com/
proxychains4 git push origin master


版权声明:本文为期权记的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://www.qiquanji.com/post/9207.html

本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。