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

HTTPS doesn't work #11

Open
dfabulich opened this issue Aug 4, 2015 · 2 comments
Open

HTTPS doesn't work #11

dfabulich opened this issue Aug 4, 2015 · 2 comments

Comments

@dfabulich
Copy link

$ node simple_processor.js
https man-in-the-middle proxy server started on port 8000
http proxy server started on port 8080
$ curl -v -k -x http://localhost:8080 https://www.google.com
* Rebuilt URL to: https://www.google.com/
* Hostname was NOT found in DNS cache
*   Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
* Establish HTTP proxy tunnel to www.google.com:443
> CONNECT www.google.com:443 HTTP/1.1
> Host: www.google.com:443
> User-Agent: curl/7.37.1
> Proxy-Connection: Keep-Alive
>
* Proxy CONNECT aborted
* Connection #0 to host localhost left intact
curl: (56) Proxy CONNECT aborted

$ curl -v -k -x http://localhost:8000 https://www.google.com
* Rebuilt URL to: https://www.google.com/
* Hostname was NOT found in DNS cache
*   Trying ::1...
* Connected to localhost (::1) port 8000 (#0)
* Establish HTTP proxy tunnel to www.google.com:443
> CONNECT www.google.com:443 HTTP/1.1
> Host: www.google.com:443
> User-Agent: curl/7.37.1
> Proxy-Connection: Keep-Alive
>
* Proxy CONNECT aborted
* Connection #0 to host localhost left intact
curl: (56) Proxy CONNECT aborted

curl -x http://localhost:8080 http://www.google.com works fine, but I wanted to use this library for its HTTPS support.

@andrewfister
Copy link

Hey @dfabulich I found the same thing happened to me. However, from previous experience I remembered that the event name for the CONNECT request changed from "upgrade" to "connect". On changing the code everything works fine.

@GeneGenie
Copy link

@andrewfister worked for me as a charm. Thank you

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

3 participants