From 770cfa4e16a1fcf62837e5298e07713ae9504d9b Mon Sep 17 00:00:00 2001 From: eooce <142894633+eooce@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:41:34 +0800 Subject: [PATCH] =?UTF-8?q?VPS=E4=B8=80=E9=94=AE=E5=9B=9B=E5=90=88?= =?UTF-8?q?=E4=B8=80=E8=84=9A=E6=9C=AC(reality+vmess-argo+hysteria2+tuic5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sing-box.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sing-box.sh b/sing-box.sh index 7df4e9b..22be9b0 100644 --- a/sing-box.sh +++ b/sing-box.sh @@ -126,13 +126,12 @@ manage_packages() { get_realip() { ip=$(curl -s ipv4.ip.sb) if [ -z "$ip" ]; then - server_ip=$(curl -s --max-time 1 ipv6.ip.sb) - echo "[$server_ip]" + ipv6=$(curl -s --max-time 1 ipv6.ip.sb) + echo "[$ipv6]" else - org=$(curl -s http://ipinfo.io/$ip | grep '"org":' | awk -F'"' '{print $4}') - if echo "$org" | grep -qE 'Cloudflare|UnReal'; then - server_ip=$(curl -s --max-time 1 ipv6.ip.sb) - echo "[$server_ip]" + if echo "$(curl -s http://ipinfo.io/org)" | grep -qE 'Cloudflare|UnReal'; then + ipv6=$(curl -s --max-time 1 ipv6.ip.sb) + echo "[$ipv6]" else echo "$ip" fi