在家办公终极解决(socat)
办公室内网机器
nohup socat tcp:hostip:8888,forever,interval=10,fork tcp:127.0.0.1:22 >socat.log &
远程做代理的公网机器
vim socat.sh
#!/bin/sh
while true; do
killall -9 socat
killall -9 socat
socat tcp-listen:8888 tcp-listen:2222
sleep 30
done
chmod u+x socat.sh
nohup ./socat.sh >socat.log &
在家浏览内网
ssh -p 2222 -N -D 7070 user@hostip
将浏览器设为代理:127.0.0.1:7070