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

How to set "CURLOPT_PROXYTYPE" = "CURLPROXY_HTTPS" in pycurl? #622

Closed
savandriy opened this issue Apr 15, 2020 · 2 comments
Closed

How to set "CURLOPT_PROXYTYPE" = "CURLPROXY_HTTPS" in pycurl? #622

savandriy opened this issue Apr 15, 2020 · 2 comments

Comments

@savandriy
Copy link

Hi, I'm trying to make requests through a secure web proxy in pycurl. The requests work fine with curl, by just providing the proxy url with "https" protocol and "--proxy-insecure" flag. But pycurl seems to have different behavior.

While trying to set the proxy type to "https" in pycurl, I noticed the option is not present.

Is this not supported at the moment? If so, is there a way to set the desired curl parameters directly?

@p
Copy link
Member

p commented Apr 19, 2020

You should be able to find the numeric value of this option from libcurl source code and supply it that way.

@savandriy
Copy link
Author

You should be able to find the numeric value of this option from libcurl source code and supply it that way.

Thanks for the hint, was able to successfully set "CURLOPT_PROXYTYPE" = "CURLPROXY_HTTPS" with the following code:

c.setopt(pycurl.PROXYTYPE, 2)

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

No branches or pull requests

2 participants