linux ubuntu下使用ss设置全局代理,命令行也走代理

来源:互联网 发布:如何开通淘宝 编辑:程序博客网 时间:2024/06/10 03:14

通过proxychains实现

  • 安装
    sudo apt-get install proxychains

  • 配置

编辑~/.proxychains/proxychains.conf

strict_chainproxy_dns remote_dns_subnet 224tcp_read_time_out 15000tcp_connect_time_out 8000localnet 127.0.0.0/255.0.0.0quiet_mode[ProxyList]socks5  127.0.0.1 1080

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

  • 使用方法
    命令前加上proxychains:
proxychains4 curl https://www.google.com/proxychains4 git push origin master
原创粉丝点击