(1)目标: https://abc.com/hello
abc.com的IP为:1.1.1.1
中转机IP:2.2.2.2,监听端口:7896
本地IP:3.3.3.3,
socat TCP-LISTEN:7896,reuseaddr,fork,RANGE=3.3.3.3/24 TCP:1.1.1.1:443
(2)在本地3.3.3.3上配置hosts文件:
2.2.2.2 abc.com
(3)在3.3.3.3上请求:
https://abc.com:7896/hello
附加:
vi allow
ALL:192.168.0.122/32
vi deny
ALL:ALL
socat TCP-LISTEN:3333,reuseaddr,fork,allow-table=./allow,deny-table=./deny TCP:192.168.0.219:22
refer:
http://www.dest-unreach.org/socat/doc/socat.html