From 134bc52163b9661bd2dc9ffcfc341bb526acd69e Mon Sep 17 00:00:00 2001 From: 084 Date: Sat, 9 Mar 2024 16:42:12 +0900 Subject: [PATCH] Added --ipv4 option --- modules/GetIP/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/GetIP/main.c b/modules/GetIP/main.c index 5a7f90e9..7b64ae48 100644 --- a/modules/GetIP/main.c +++ b/modules/GetIP/main.c @@ -62,6 +62,7 @@ void get_ip(wchar_t *url, wchar_t *buf, int size) { curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &data); + curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); if (!curl_easy_perform(curl) && data.len && *data.ptr) { MultiByteToWideChar(CP_UTF8, 0, data.ptr, -1, buf, size); }