~增加对ss命令的兼容以替代netstat命令

This commit is contained in:
juewuy
2026-07-29 10:42:38 +08:00
parent db8ba09663
commit d8941fb202
4 changed files with 18 additions and 6 deletions
+8 -1
View File
@@ -592,10 +592,17 @@ testcommand() {
2)
line_break
echo "==========================================================="
netstat -ntulp | grep 53
if ckcmd netstat;then
netstat -ntulp | grep 53
elif ckcmd ss;then
ss -ntulp | grep 53
else
echo -e "Neither net-tools nor iproute2 is installed. Please install one of these packages and try again."
fi
echo
echo -e "$TOOLS_NETSTAT_HINT"
echo "==========================================================="
sleep 2
;;
3)
line_break