Monday, 5 June 2017

Is that possible to gain a permanent privilege to auto configure network settings in macOs

I have a Nodejs App to configure macOs network proxy settings with networksetup:

networksetup -setwebproxy ${networkType} ${ip} ${port}

But every time I run the code, macOs askes me for password:

networksetup is trying to modify the system network configuration. Type your password to allow this.

There is a very similar topic in stackOverflow: Prevent networksetup from asking password , but can we try some other way, like Charles?

When Charles firstly run, it will ask for a privilege that allows it configure the network settings without password required, then Charles can update the network settings automatically。

-- Can't post image for now, below is the screenshot content --

Charles can automatically configure your Network Settings for use with Charles. This requires that you grant privileges to the Charles Proxy Settings application. You only need to do this once. Would you like to do this now?

So, are we possible to do this in Nodejs as well?



via Nick Wang

No comments:

Post a Comment