安装sshuttle 发表于 2021-07-21 分类于 Proxy 阅读次数: 说明支持TCP、UDP,不支持ICMP 安装12export {http,https,ftp}_proxy="http://127.0.0.1:1081"yum install python3 python3-devel gcc 主机环境安装1pip3 install sshuttle 虚拟环境安装12345pip3 install virtualenvvirtualenv -p python3 /tmp/sshuttlesource /tmp/sshuttle/bin/activatepython -V && pip -Vpip install sshuttle 配置代理TCP1sshuttle -r [email protected]:60022 0.0.0.0/0 -x 192.168.128.0/24 -v 代理TCP和DNS1sshuttle -r [email protected]:60022 0.0.0.0/0 -x 192.168.128.0/24 --dns -v 代理TCP和UDP123456sshuttle -r [email protected]:60022 0.0.0.0/0 -x 192.168.128.0/24 --method tproxy -v# 添加路由ip route add local default dev lo table 100ip rule add fwmark 1 lookup 100ip -6 route add local default dev lo table 100ip -6 rule add fwmark 1 lookup 100 常用配置123456789101112sshuttle -r [email protected]:60022 0.0.0.0/0 \-x 0.0.0.0/8 \-x 10.0.0.0/8 \-x 100.64.0.0/10 \-x 127.0.0.0/8 \-x 169.254.0.0/16 \-x 172.16.0.0/12 \-x 192.168.0.0/16 \-x 198.18.0.0/15 \-x 224.0.0.0/4 \-x 240.0.0.0/4 \-v