mousehole Net::HTTP(S)::Proxy'ing

Leslie Wu lwu.two at gmail.com
Sun Feb 4 21:15:30 EST 2007


D'oh, it looks like I might have run into a Firefox 2 + SwitchProxy bug.

I left "Use this proxy server for all protocols" clicked, and https wasn't
getting passed through mouseHole (Mongrel) as it should have been. I click
it off and on, and it passes through.

Mongrel (and thus mH2 out of the box) doesn't support SSL, so I'll have to
piece together some other workaround.

~L


On 2/4/07, Leslie Wu <lwu.two at gmail.com> wrote:
>
> Hey,
>
> I've been trying to get proxylike to proxy https sites (ignoring security
> concerns for the moment).
>
> Set as a Firefox proxy, mH2 seems to support proxying https:// sites such
> as https://login.yahoo.com, which means I can log into Yahoo!
> successfully.
>
> However, as of the moment, trying to use proxylike to access http://127.0.0.1:3704/https://login.yahoo.com/
> from Firefox (no proxy set there) doesn't yet work -- 404 on the mH2
> console.
>
> I just added a unit test for a simpler case, just using Net::HTTP::Proxy
> to get_response from https://javacc.dev.java.net/ -- a non-random https
> site with high PageRank.
>
> This test currently fails, and I'll try to work it through, but to make
> sure my understanding is correct, I ran this script --
> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/23379 --
> against http://127.0.0.1:3704 and http://127.0.0.1:8888, mH2 and Charles
> respectively.
>
> The former fails, but the latter succeeds.
>
> [Charles is a Java-based Web Debugging proxy (
> http://www.xk72.com/charles/) <http://www.xk72.com/charles/%29>]
>
> This suggests to me that:
>
> * Net::HTTP::Proxy'ing a HTTPS site works (with Charles, a 3rd party
> proxy)
> * mH2 can proxy HTTPS if accessed from Firefox
>
> but
>
> * mH2 + HTTPS + Net::HTTP::Proxy doesn't work yet.
>
> Phew.
>
> As an aside, now that you can get the Firebug source through svn, tools to
> integrate mH2+Firebug might be mighty sweet.
>
> ~L
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mousehole-scripters/attachments/20070204/d2a7d37e/attachment.html 


More information about the Mousehole-scripters mailing list