环境变量all_proxy

下载软件的时候,由于墙,经常很慢.以前是通过开代理,然后用polipo转http,然后在各个软件工具里面配置代理.
最近发现原来,一般yum curl git wget 等工具都支持环境变量all_proxy.赶紧mark一下.

  alias huiproxy='export all_proxy=socks5h://127.0.0.1:1080 && curl ip.sb'
  alias huiproxyno='unset all_proxy && curl ip.sb'

因为用了ssr,我这里用了socks5h.socks5和socks5h的区别可以看这里Differentiate socks5h from socks5 and socks4a from socks4 when handling proxy string
1. In a proxy string, socks5h:// and socks4a:// mean that the hostname isresolved by the SOCKS server.
2. socks5:// and socks4:// mean that the hostname is resolved locally.
3. socks4a:// means to use SOCKS4a, which is an extension of SOCKS4. Let’s make urllib3 honor it.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.