Skip to content

Added option to force curl to use IPv4 #1412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AlphiiGD
Copy link

@AlphiiGD AlphiiGD commented Jul 3, 2025

I was having trouble with Curl. The literal only way I could get it to work was forcing it to use IPv4 instead of IPv6. Geode doesn't have an option to force IPv4 (not that I know of at least) so I added this. Made the shit work for me. Hopefully this could help someone in the future, too.

if (Mod::get()->getSettingValue<bool>("curl-force-ipv4")) {
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
} else {
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default should be CURL_IPRESOLVE_WHATEVER imo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants