using MouseHole behind corporate proxy

Daniel Sheppard daniels at pronto.com.au
Tue Sep 27 19:46:32 EDT 2005


You can set the http_proxy environment variable.

However, I had some trouble with that, as there's quite a few sites running internally that I don't want sent through the proxy, and also some other sites that need to go through a separate proxy - so I added in a little fragment (attached) which allows me to have a separate configuration file that defines which proxy to use for a given host.

Require this directly after requiring the mousehole.rb script, and you can put a proxy_config.rb file in your mousehole directory that will be eval'd constantly to determine what proxy to use. It gets the host passed in, so you can write a file something like this:

case host
	when "localhost",
		"127.0.0.1",
		"192.168.0.2",
		"168.168.8.88",
		/^172\.17\./
		nil
	when "www.example.com"
		"http://proxy1:5466"
	else
		"http://proxy2:8080"
end

You should install the zipped version of mousehole, not the installer version so that you can play around with the mousehole source and add in the new require statement.

Also, if your firewall happens to be running NTLM authentication (ie. it's the microsoft proxy), you can use http://apserver.sourceforge.net/ to provide a local proxy that runs the NTLM part of the puzzle. Does anybody know if this has been ported to ruby?


-----Original Message-----
From: mousehole-scripters-bounces at rubyforge.org [mailto:mousehole-scripters-bounces at rubyforge.org] On Behalf Of Nicolas Delsaux
Sent: Wednesday, 28 September 2005 12:14 AM
To: mousehole-scripters at rubyforge.org
Subject: using MouseHole behind corporate proxy

Hi,
I would like to use MouseHole at my company. Unfortunatly, I can't connect to any web site, since my company use a corporate proxy.
I've tried diving into source code but, since I'm only a Ruby padawan, I didn't encounter success.
So, is there any way to ask gently MouseHole (or even the WEBrick
underneath) to access the web through that proxy ?
Even involving code, i'm ready to produce some Ruby gem (well, in my case, it won't be really a cool gem, but at least a first try).
Notice I already have a Ruby fragment for doing such proxied connection, used for a bookmark synchronization script.
Thanks.
--
Nicolas Delsaux
Depuis GMail qui vous espionne, mais qui est bien Et pour ceux que ça intéresse, j'ai 50 invitations

_______________________________________________
Mousehole-scripters mailing list
Mousehole-scripters at rubyforge.org
http://rubyforge.org/mailman/listinfo/mousehole-scripters



#####################################################################################
This email has been scanned by MailMarshal, an email content filter.
#####################################################################################
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_proxy.rb
Type: application/octet-stream
Size: 736 bytes
Desc: fix_proxy.rb
Url : http://rubyforge.org/pipermail/mousehole-scripters/attachments/20050928/dd78d07e/fix_proxy.obj


More information about the Mousehole-scripters mailing list