luci-app-mosdns: Update the ECS address to obtain the URL
This commit is contained in:
parent
a4306ad5f1
commit
fe7f956f31
@ -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
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user