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

What format should I provide the proxy string as? #18

Open
rightaway opened this issue Jun 29, 2017 · 4 comments
Open

What format should I provide the proxy string as? #18

rightaway opened this issue Jun 29, 2017 · 4 comments

Comments

@rightaway
Copy link

I'm having trouble getting caw to work with got, and I'm trying to figure out whether the issue is because of the proxy itself or because of how I'm configuring caw. If my proxy IP is something like 1.2.3.4 and port is 555 and it's an HTTPS proxy, should the string argument be exactly https://1.2.3.4:555, or does it expect it in a different format?

@rightaway
Copy link
Author

Also would there any difference in how to configure caw when using an HTTPS proxy to access an HTTP webpage vs an HTTPS webpage? Thank you!

@kevva
Copy link
Owner

kevva commented Jul 1, 2017

You have to set protocol: https if you're accessing a HTTPS page. Otherwise it looks fine. If you don't set the proxy, it'll try to get it from environment flags.

@rightaway
Copy link
Author

So when accessing an HTTPS page, should it be like caw('https://1.2.3.4:555', {protocol: 'https'})? So https in both places, the proxy string as well as the protocol value?

@rightaway
Copy link
Author

And when accessing a regular HTTP page, it's caw('http://1.2.3.4:555', {protocol: 'http'}), so http in both places instead of https?

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