proxychains安装
sudo apt install proxychains
编辑proxychains配置
vim /etc/proxychains.conf
将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文件说明了代理配置格式,如下,这里根据自己使用的代理来配置就行了。
1 2 3 4 5 6 7 8 9 10 11 12 13
| ProxyList format 94 95 96 97 98 99 100 101 102 103 104 105
|
使用方法
在需要代理的命令前加上 proxychains ,如:
1 2
| proxychains wget http://xxx.com/xxx.zip proxychains git clone https://xxxxxxxxx.git
|
npm设置http代理:
1 2 3 4 5 6 7
| npm config set proxy http://127.0.0.1:1081 npm config set https-proxy http://127.0.0.1:1081
npm config set proxy http://username:password@127.0.0.1:1081 npm confit set https-proxy http://username:password@127.0.0.1:1081
|
npm设置socks5代理:
1 2 3 4 5 6 7 8
|
npm install -g http-proxy-to-socks
hpts -s 127.0.0.1:1081 -p 8002
npm config set proxy http://127.0.0.1:8002 npm config set https-proxy http://127.0.0.1:8002
|
查看删除代理
1 2 3 4 5 6 7
| npm config get or npm config list
npm config delete proxy and npm config delete https-proxy
|