2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 06:47:20 +08:00

fix: 获取公网IP

This commit is contained in:
耗子
2024-05-21 02:01:14 +08:00
parent fa7c54ada5
commit 3a5ff9179a

View File

@@ -546,7 +546,7 @@ func IsChina() bool {
func GetPublicIP() (string, error) {
client := resty.New()
client.SetTimeout(5 * time.Second)
client.SetTimeout(2)
client.SetRetryCount(2)
resp, err := client.R().Get("https://www.cloudflare-cn.com/cdn-cgi/trace")
if err != nil || !resp.IsSuccess() {