WSL2配置proxychains, 使得终端走宿主机代理
- 安装:
sudo apt-get upgrade
sudo apt-get install proxychains4
sudo apt-get install proxychains4
- 获得宿主机 IP:cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }'
- 查询代理软件端口:10810
- 编辑配置文件:sudo nano /etc/proxychains4.conf
change:socks4 127.0.0.1 9095
to:socks5 xxx.xxx.xxx.xxx 10810
中间的x是上面查出来的ip地址,10810是v2rayN局域网(不是本地)监听的端口。
并在[ProxyList]之前添加:
# Exclude localhost
localnet 127.0.0.0/255.0.0.0
- 测试:
proxychains4 curl -L cip.cc
- vscode走代理:proxychains4 code .
- 更新proxychains:
sudo apt-get update # This will update the list of available packages
sudo apt-get upgrade # This will upgrade the installed packages to the latest versions
- 注意:proxychains 与 proxifier 会冲突,只需用二者之一。
- 参考文献:
Comments
Post a Comment