在 Linux 上用 socat 进行网络环境测试 UDP 端口
前面介绍过怎么测试 tcp 端口, tcping https://zelikk.blogspot.com/2022/05/linux-socat-tcp-udp-ipv4-ipv6-localhost.html https://zelikk.blogspot.com/2024/09/socat-tcping.html 现在搭 Hysteria2 HY2 翻墙协议的越来越多, 那么我们怎么测试 UDP 端口是否正常工作呢? UPD 监听 还是用 socat socat -v UDP-LISTEN: 端口号,fork PIPE socat -v UDP-LISTEN:4000,fork PIPE * 如果你的环境没有 socat, 你需要安装一下 apt install -y socat 检测 网络在线检测 https://check-host.net/ 从另一个 VPS Linux 命令行检测 用到这个项目 https://github.com/wangyu-/UDPping 先下载测试脚本 (python) wget -L https://github.com/wangyu-/UDPping/raw/refs/heads/master/udpping.py 执行方式为 python3 udpping.py IP 地址 UDP 端口 python3 udpping.py 134.195.211.170 4000 windows 环境测试工具 https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/portqry-command-line-port-scanner-v2