Sepehrom
Sepehrom

Reputation: 1335

Changing Mac System Proxy Settings In Command Line Tool Application

Is it possible to change proxy settings ( like what networksetup does ) in a command line tool app ? I mean I want to write a command line tool that can change network and proxy settings in mac.

If yes, Can anybody provide any source that I can go and search for starting points and learn about it ?

Upvotes: 3

Views: 536

Answers (1)

Sean Ed-Man
Sean Ed-Man

Reputation: 378

You can simply use NSTask to run networksetup with desired arguments. In order to do that you must include AppKit framework to your application. (But please note that you need root privilege to use networksetup in order to change proxy settings)

Upvotes: 3

Related Questions