views:

443

answers:

1

Hello.

Is there a way, from within a Cocoa application to change the system network settings (specifically, the proxy settings). I've found that there is a file called preferences.plist in /Library/Preferences/SystemConfiguration that has the settings I want, but I can't figure out how to get the system to process changes to this file without rebooting.

Can this be done programmatically, or at least by launching some command? (This solution would probably be 10.5.x only, I'm assuming)

Since I can change these settings in System Preferences immediately, there must be some way, it just eludes me ....

Thanks!

+1  A: 

You want the SystemConfiguration framework, specifically the Proxies Dictionary (see here for more details).

Alex Martelli
Excellent. Exactly what I was looking for.