Skip to content
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

Allow users to pass a custom IPRESOLVE cURL option. #1272

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

dcr-stripe
Copy link
Contributor

@dcr-stripe dcr-stripe commented Apr 25, 2022

r? @richardm-stripe

Summary

Allow users to pass a custom IPRESOLVE cURL option. Note: Stripe API currently only supports IPv4.

$optionsArray = [\CURLOPT_IPRESOLVE => \CURL_IPRESOLVE_WHATEVER];
$client = new CurlClient($optionsArray);

This lets users pass IPRESOLVE_WHATEVER if they are proxying to Stripe through an IPv6 proxy or some other approach rather than connecting directly.

Motivation

#1046 (comment)

@dcr-stripe dcr-stripe merged commit 8275e7a into master Apr 25, 2022
@dcr-stripe dcr-stripe deleted the dcr-curl-whatever branch April 25, 2022 22:50
@miyurusankalpa
Copy link

Can this be mentioned on the README please.

I am running a IPv6 only setup, with a proxy to talk to IPv4 only endpoints such as Stripe and ran into this issue.

Also this also breaks DNS64 setups as well. which are used on AWS IPv6 only VPCs.

@miyurusankalpa
Copy link

@GouravSingh2580

You need to ask your question here. aws/containers-roadmap#835 (comment)

To force DNS64 add the following, till this is reverted.

$optionsArray = [\CURLOPT_IPRESOLVE => \CURL_IPRESOLVE_V6];
$client = new CurlClient($optionsArray);

@GouravSingh2580
Copy link

Thank you! @miyurusankalpa 🙌

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.

None yet

4 participants