Update hyps variable assignment in sb.sh
This commit is contained in:
@@ -1026,7 +1026,7 @@ 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
|
||||
cmhy2pt=$(echo $hy2_ports | tr ':' '-')
|
||||
hyps=$cmhy2pt
|
||||
hyps="&mport=$cmhy2pt"
|
||||
sbhy2pt=$(echo "$hy2_ports" | grep -o '[0-9]\+:[0-9]\+' | sed 's/.*/"&"/' | paste -sd,)
|
||||
else
|
||||
hyps=
|
||||
@@ -1152,7 +1152,7 @@ echo
|
||||
reshy2(){
|
||||
echo
|
||||
white "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
hy2_link="hysteria2://$uuid@$sb_hy2_ip:$hy2_port?security=tls&alpn=h3&insecure=$ins_hy2&allowInsecure=$ins_hy2&mport=$hyps&sni=$hy2_name#hy2-$hostname"
|
||||
hy2_link="hysteria2://$uuid@$sb_hy2_ip:$hy2_port?security=tls&alpn=h3&insecure=$ins_hy2&allowInsecure=$ins_hy2$hyps&sni=$hy2_name#hy2-$hostname"
|
||||
echo "$hy2_link" > /etc/s-box/hy2.txt
|
||||
red "🚀【 Hysteria-2 】节点信息如下:" && sleep 2
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user