socat

经典应用

socat TCP-LISTEN:1935,fork TCP:10.18.18.102:1935 &

socat udp4-listen:1935,reuseaddr,fork UDP:10.18.18.102:1935 &

 

检查端口连通性

server:
socat tcp-listen:port –

client:
echo “test”|socat – tcp-connect:ip:port