fix: Get client public IP return a IPV6

This commit is contained in:
yuanyuanxiang
2025-07-28 04:19:36 +08:00
parent 2657b41e5f
commit 7068394305
2 changed files with 4 additions and 7 deletions

View File

@@ -190,7 +190,7 @@ public:
hInternet = InternetOpen("Mozilla/5.0", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
if (!hInternet) return "";
hConnect = InternetOpenUrl(hInternet, "https://api64.ipify.org", NULL, 0, INTERNET_FLAG_RELOAD | INTERNET_FLAG_SECURE, 0);
hConnect = InternetOpenUrl(hInternet, "https://api.ipify.org", NULL, 0, INTERNET_FLAG_RELOAD | INTERNET_FLAG_SECURE, 0);
if (!hConnect) {
InternetCloseHandle(hInternet);
return "";