diff --git a/install.sh b/install.sh index 68ece3b6..47ede92a 100644 --- a/install.sh +++ b/install.sh @@ -7,7 +7,6 @@ yellow='\033[0;33m' plain='\033[0m' cur_dir=$(pwd) -show_ip_service_lists=("https://api.ipify.org" "https://4.ident.me") # check root [[ $EUID -ne 0 ]] && echo -e "${red}致命错误: ${plain} 请使用 root 权限运行此脚本\n" && exit 1 diff --git a/web/service/server.go b/web/service/server.go index 6b4e5d63..2dc83d77 100644 --- a/web/service/server.go +++ b/web/service/server.go @@ -235,8 +235,21 @@ func (s *ServerService) GetStatus(lastStatus *Status) *Status { } // IP fetching with caching - showIp4ServiceLists := []string{"https://api.ipify.org", "https://4.ident.me"} - showIp6ServiceLists := []string{"https://api6.ipify.org", "https://6.ident.me"} + showIp4ServiceLists := []string{ + "https://api4.ipify.org", + "https://ipv4.icanhazip.com", + "https://v4.api.ipinfo.io/ip", + "https://ipv4.myexternalip.com/raw", + "https://4.ident.me", + "https://check-host.net/ip", + } + showIp6ServiceLists := []string{ + "https://api6.ipify.org", + "https://ipv6.icanhazip.com", + "https://v6.api.ipinfo.io/ip", + "https://ipv6.myexternalip.com/raw", + "https://6.ident.me", + } if s.cachedIPv4 == "" { for _, ip4Service := range showIp4ServiceLists {