安装方式就不介绍了。
Centos
yum install socat
Ubuntu
apt-get install socat
解决不了去换一下源
TCP转发
nohup socat TCP4-LISTEN:30000,reuseaddr,fork TCP4:1.1.1.1:30000 >> socat.log 2>&1 &
UDP转发
nohup socat -T 600 UDP4-LISTEN:10000,reuseaddr,fork UDP4:1.1.1.1:10000 >> socat.log 2>&1 &
轻松简单!