koichik / node-tunnel

Node HTTP/HTTPS Agents for tunneling proxies
MIT License
537 stars 78 forks source link

CONNECT request should use port 443 as default for HTTPS #32

Closed mk-pmb closed 6 years ago

mk-pmb commented 6 years ago

Hi, thanks for this module!

.httpsOverHttp works, but only if I explicitly specify the port as 443. Otherwise it asks the proxy to CONNECT to port 80, my proxy does as requested, the SSL greeting goes to target server's port 80 and it replies with 400 Bad Request.

Could you please change the default port to 443 for the .httpsOver… methods?

Update: Here's an example using example.net, they reply with 501 Not Implemented. I'm using tunnel v0.0.5, Node.js v8.11.4, npm v5.6.0, Ubuntu 14.04.5 LTS trusty,

ash0080 commented 6 years ago

Same issue, besides, there isn‘t an auto routing methods for http & https, super annoying for a hybrid site for example most shopping sites

mk-pmb commented 6 years ago

auto routing methods

Do you mean automatic method selection based on URL? In that case, the got package got you covered. Its readme's "Proxies" chapter shows how to configure different agents per protocol.

ash0080 commented 6 years ago

@mk-pmb yes, but node-tunnel doesn't work( cuz the port mistake ) , I am using proxy-agent for instead now, auto fit http&https

koichik commented 6 years ago

Sorry for the delay, thanks!

mk-pmb commented 6 years ago

Do you know yet when it will be released?

koichik commented 6 years ago

Just published!