mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:47:20 +08:00
fix: 获取公网IP
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user