在Linux下终端使用代理可以利用 SET HTTP=http://127.0.0.1:8080的方法来完成当前shell的代理

但每一次都要设置非常烦,写入.bashrc文件的话又不见得每次登录Shell都需要使用代理

ProxyChains就可以很方便的做到需要代理的命令走代理,只需要在前面加上 proxychains,例如使用代理运行wget

proxychains wget https://www.chancel.me/sitemap

ProxyChains is a UNIX program, that hooks network-related libc functions in dynamically linked programs via a preloaded DLL and redirects the connections through SOCKS4a/5 or HTTP proxies.

各大发行版包管理器大部分都包含了ProxyChains,Ubuntu下安装ProxyChains

sudo apt install proxychains -y

安装完成之后修改一下位于/etc/proxychains.conf配置文件就可以使用了,打开文件后,在最下方添加你的代理信息,如下

...
#       proxy types: http, socks4, socks5
#        ( auth types supported: "basic"-http  "user/pass"-socks )
#
[ProxyList]
# add proxy here ...
# meanwile
# defaults set to "tor"
http 127.0.0.1:8080