Connecting to an HTTPS server through a HTTP proxy

2,493 views
Skip to first unread message

Elio

unread,
Feb 16, 2012, 11:55:40 AM2/16/12
to nodejs
Hi,

In our application we need to connect to arbitrary web servers from
Node but our server can only connect to the outside internet through
the corporate proxy. If the target page is on a regular HTTP server we
simply set the path to the full URL and things just work; however if
the target page is under HTTPS and we use the same solution we get
invalid requests errors from the proxy.

I have also tried to change the request_method to "CONNECT" with no
luck.

Is there a way to connect to HTTPS servers through a HTTP proxy in
Nodejs?

Thanks,

Elio.

Koichi Kobayashi

unread,
Feb 16, 2012, 12:21:01 PM2/16/12
to nod...@googlegroups.com
Hi Elio,

You can use node-tunnel.

https://github.com/koichik/node-tunnel

Current version (v0.0.0) supports only Node v0.7, but next version
will work with v0.6.11 (probably it will be released soon).

> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

Elio

unread,
Feb 16, 2012, 1:13:35 PM2/16/12
to nodejs
Wow that's that looks awesome! Eagerly looking forward for the
release.

Koichi Kobayashi

unread,
Feb 18, 2012, 3:00:00 AM2/18/12
to nod...@googlegroups.com
Hi Elio,

node-tunnel v0.0.1 which supports Node v0.6.11 has been released.


On Thu, 16 Feb 2012 10:13:35 -0800 (PST), Elio <elc...@gmail.com> wrote:

> Wow that's that looks awesome! Eagerly looking forward for the
> release.
>

Elio Cuevas

unread,
Feb 21, 2012, 12:24:24 PM2/21/12
to nodejs
Thanks Koichi,

This works perfectly. I owe you a beer!
Reply all
Reply to author
Forward
0 new messages