From fe7f956f31f5adc1e5a0e0a948d17d6ae5b20ae8 Mon Sep 17 00:00:00 2001 From: sbwml Date: Tue, 29 Aug 2023 23:26:43 +0800 Subject: [PATCH] luci-app-mosdns: Update the ECS address to obtain the URL --- luci-app-mosdns/root/usr/share/mosdns/mosdns.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh index 95f2bc6..0715838 100755 --- a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh +++ b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh @@ -103,13 +103,8 @@ restart_service() { /etc/init.d/mosdns restart } -ecs_local() { - ipaddr=$(curl -s --connect-timeout 3 -H "Host:ip.3322.org" 118.184.169.32) || ipaddr=119.29.0.0 - echo "ecs ${ipaddr%.*}.0/24" -} - ecs_remote() { - ipaddr=$(curl -s --connect-timeout 3 -H "Host:ifconfig.me" 34.160.111.145) || ipaddr=103.103.65.0 + ipaddr=$(curl -s --user-agent "curl/8.2.1" --connect-timeout 3 -H "Host:v4.ident.me" 49.12.234.183) || ipaddr=110.34.181.1 echo "ecs ${ipaddr%.*}.0/24" } @@ -157,9 +152,6 @@ case $script_action in "adlist_update") adlist_update && restart_service ;; - "ecs_local") - ecs_local - ;; "ecs_remote") ecs_remote ;;