Chi's Journal

- Ecclesiastes 1.11

Dec 20, 2019 - 1 minute read - Comments - 烂笔头

socat

snippets:

  • simple udp echo server: echo payload with client ip:port
socat -d -d udp-recvfrom:1926,fork system:"echo \"\$SOCAT_PEERADDR:\$SOCAT_PEERPORT\"; cat"

client > echo "0817" | socat - udp-sendto:server-ip:1926
  • simple tcp echo server: echo payload with client ip:port
socat -d -d tcp-l:1926,fork system:"echo \"\$SOCAT_PEERADDR:\$SOCAT_PEERPORT\"; cat"
client > echo "0817" | socat  tcp:server-ip:1926 -

Tags: socat

用 slack/nebula 在公网上部署 kubernetes 集群

comments powered by Disqus