[racket] PLaneT and proxies

From: Norman Gray (norman at astro.gla.ac.uk)
Date: Sun Jun 20 16:23:51 EDT 2010

Eli and Robby, hello.

On 2010 Jun 20, at 20:59, Norman Gray wrote:

>> Does planet go through net/url?  If so, then this is better done
>> there.  (And if it doesn't, then it should...)
> It does.  And yes (and yes, probably).

Come to think of it, this is possibly something that should be sorted out (within or via net/url) at a slightly lower level.

On OS X, for example, there is API support for detecting whether a proxy has been set in the Approved Fashion (that is, within the Network System Preference, either manually or via automatic proxy configuration, and with different values depending on the current 'location').  See <http://developer.apple.com/mac/library/samplecode/CFProxySupportTool/Introduction/Intro.html> for sample code.

I presume there will be similar support on other unixes and on windows.

The http_proxy variable is a leeeettle bit of a hack, and that's especially true on OS X, where it's really only set for the benefit of those unix-generic tools which don't know how to get the information directly from the OS.  For what it's worth, I set http_proxy at shell startup time using the attached scsh script, which shows how one might extract the information from 'scutil --proxy' reasonably straightforwardly.

Best wishes,


Norman Gray  :  http://nxg.me.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extract-http-proxy-info
Type: application/octet-stream
Size: 2022 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20100620/32d4ebf6/attachment.obj>

Posted on the users mailing list.