• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to change the system proxy configuration ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How to change the system proxy configuration ? (From: Andy <email@hidden>)

  • Prev by Date: Re: Raw socket behavior in OS/X 10.5... "Invalid argument"?
  • Next by Date: Re: CFSocketCreateRunLoopSource crashes
  • Previous by thread: Re: How to change the system proxy configuration ?
  • Next by thread: Re: How to change the system proxy configuration ?
  • Index(es):
    • Date
    • Thread