mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-09-08 13:46:33 +00:00
~增加对ss命令的兼容以替代netstat命令
This commit is contained in:
@@ -95,7 +95,7 @@ set_dns_mod() {
|
||||
;;
|
||||
*)
|
||||
if [ "$num" -ge 1 ] && [ "$num" -lt 65535 ]; then
|
||||
if ckcmd netstat && netstat -ntul | grep -q ":$num "; then
|
||||
if netstat -ntul 2>/dev/null | grep -q ":$num " || ss -ntul 2>/dev/null | grep -q ":$num "; then
|
||||
dns_redir_port="$num"
|
||||
setconfig dns_redir_port "$dns_redir_port"
|
||||
common_success
|
||||
|
||||
Reference in New Issue
Block a user