Programmatically Toggle Proxy in Safari

Discussion in 'Mac Programming' started by ninalashes, Oct 9, 2009.

  1. macrumors newbie

    Joined:
    Oct 9, 2009
    #1
    Hello,

    I have written an application for OSX that toggles browser proxy settings in Safari. The problem is that it requires root-level access in order to function. Is there a programmatic way I can tell Safari to use a proxy server without requiring root access on the computer?

    Right now, my application essentially executes:
    sudo networksetup -setwebproxystate Ethernet on
    ... [other networksetup calls] ...

    I have scoured the Internet for days now and haven't found a more stable way of changing the proxy in Safari. Applescript is also out of the question.

    Any help or direction would be greatly appreciated.

    Thanks
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Safari does not have a proxy setting: the machine-global network settings do which is what Safari uses. So the answer is no, there is no way of changing the machine-global settings without requiring an admin username/password.
     
  3. macrumors member

    Joined:
    Mar 18, 2008
    Location:
    Lisbon, Portugal
    #3

Share This Page