Re: How to change the system proxy configuration ?
Re: How to change the system proxy configuration ?
- Subject: Re: How to change the system proxy configuration ?
- From: Quinn <email@hidden>
- Date: Tue, 26 Aug 2008 10:29:03 +0100
At 10:31 +0800 25/8/08, Andy wrote:
I want to change the system proxy configuration with my app.
There are (at least) two tricky aspects of changing proxy settings:
A. All modifications to SCPreferences require root privilege. During
initial testing you can just enable the root account, log in as root,
run Xcode, and you're up and debugging. However, to deploy your
program to end users you will need some sort of privileged escalation
mechanism. The currently recommended technique is illustrated by the
"BetterAuthorizationSample" sample code.
<http://developer.apple.com/samplecode/BetterAuthorizationSample/index.html>
B. There's a notably asymmetry between reading and writing proxy
settings. Proxy settings are stored per interface, so when you write
a proxy setting you have to write it to a specific interface. OTOH
there is only one set of currently active proxy settings; AFAIK the
system always uses the proxy settings, if any, from the current
primary interface.
So this raises the question of which settings you're trying to
modify. Are you:
a) trying to modify the settings of a specific interface (perhaps
you're building a utility for some networking device),
b) trying to modify the currently active proxy settings
c) trying to modify the proxy settings for all interfaces
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden