Detecting http proxy settings on Mac OS X

Dave Cragg dcragg at lacscentre.co.uk
Tue Oct 21 04:40:15 EDT 2003


Hi

Does anyone know a way to detect the current "in-use" http proxy 
settings on Mac OS X from within Rev?

This is what I know so far.

All the network settings (set in the System Preferences Network pane) 
are stored in the file /var/db/SystemConfiguration/preferences.xml.

However, although this file will tell you which is the currently 
selected "set" (i.e when a user has more than one location 
configured), it doesn't tell you which interface is currently in use. 
So if you have an http proxy set for the built-in ethernet interface 
but not for the modem, you can't be sure whether the proxy should be 
used or not.

There is a command line tool called scutil which gives the 
information I need. But this is an interactive utility, and I don't 
know how (or even if it's possible) to make use of this from within 
Rev.

(For anyone familiar with scutil, the "key" I'm interested in is 
"State:/Network/Global/Proxies".)

Any help appreciated.

Cheers
Dave




More information about the use-livecode mailing list