From cc7d2c428425b4f893de8e802ba9f53a074c19d2 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: Fri, 1 Aug 2025 08:37:09 +0800 Subject: [PATCH] Update sb.sh --- sb.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sb.sh b/sb.sh index f45167b..5acddea 100644 --- a/sb.sh +++ b/sb.sh @@ -156,14 +156,17 @@ v4orv6(){ if [ -z $(curl -s4m5 icanhazip.com -k) ]; then echo red "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" -yellow "检测到 纯IPV6 VPS,添加DNS64" +yellow "检测到 纯IPV6 VPS,添加NAT64" echo -e "nameserver 2a00:1098:2b::1\nnameserver 2a00:1098:2c::1\nnameserver 2a01:4f8:c2c:123f::1" > /etc/resolv.conf -endip=2606:4700:d0::a29f:c101 ipv=prefer_ipv6 else -endip=162.159.192.1 ipv=prefer_ipv4 fi +if [ -n $(curl -s6m5 icanhazip.com -k) ]; then +endip=2606:4700:d0::a29f:c101 +else +endip=162.159.192.1 +fi } warpcheck if [[ ! $wgcfv4 =~ on|plus && ! $wgcfv6 =~ on|plus ]]; then