From b9e27a1052ff12e7b54a6e2f82d475a826466cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Sat, 11 Apr 2026 16:39:56 +0800 Subject: [PATCH] Update sb.sh --- sb.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sb.sh b/sb.sh index d25aaae..bcbf4cf 100644 --- a/sb.sh +++ b/sb.sh @@ -1026,7 +1026,8 @@ hy2_port=$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[2].listen_port' hy2_ports=$(iptables -t nat -nL --line 2>/dev/null | grep -w "$hy2_port" | awk '{print $8}' | sed 's/dpts://; s/dpt://' | tr '\n' ',' | sed 's/,$//') if [[ -n $hy2_ports ]]; then hy2ports=$(echo $hy2_ports | sed 's/:/-/g') -hyps=$hy2_port,$hy2ports +hyps=$hy2ports +sbhy2pt=(echo "$hy2_ports" | grep -o '[0-9]\+:[0-9]\+' | sed 's/.*/"&"/' | paste -sd,) else hyps= fi @@ -1199,10 +1200,10 @@ echo sb_client(){ -maxhy2ports(){ +sbhy2ports(){ if [[ -n $hy2_ports ]]; then cat <