• Home
  • About
    • 朱智博在Github上的Blog photo

      朱智博在Github上的Blog

      朱智博,朱智博的博客,zhuio,zhuio.github.io,

    • Learn More
    • Email
    • Github
    • Weibo
  • Posts
    • All Posts
    • All Tags
  • Projects

terminal proxy

28 Mar 2017

Reading time ~1 minute

利用proxychains在终端使用socks5代理

1.proxychains安装

git clone https://github.com/rofl0r/proxychains-ng.git
cd proxychains-ng
./configure
make && make install
cp ./src/proxychains.conf /etc/proxychains.conf
cd .. && rm -rf proxychains-ng

也可以用brew install proxychains-ng安装。

2.编辑proxychains配置

vim /etc/proxychains.conf

3.将socks4 127.0.0.1 9095改为

socks5 127.0.0.1 1080

ps: 默认的socks4 127.0.0.1 9095是tor代理,而socks5 127.0.0.1 1080是shadowsocks的代理。

proxychains.conf文件说明了代理配置格式,如下,这里根据自己使用的代理来配置就行了。

ProxyList format
94#       type  ip  port  [user pass]
95#       (values separated by 'tab' or 'blank')
96#
97#       only numeric ipv4 addresses are valid
98#
99#
100#        Examples:
101#
102#       socks5  192.168.67.78   1080    lamer   secret
103#       http    192.168.89.3    8080    justu   hidden
104#       socks4  192.168.1.49    1080
105#       http    192.168.39.93   8080

4.使用方法

在需要代理的命令前加上 proxychains4 ,如:

proxychains4 wget http://xxx.com/xxx.zip

5.测试方法

curl ip.gs


proxychains4ubuntuterminal Share Tweet +1