node-grant-setproxy
mac only!!! setup proxy, type password only once
Usage:
;// set mac os x grant dialog name;await ;
type password once to authorize, never type again
you can find all avaliable args by typing networksetup
in the command line;
Trouble Shooting
why can't my app change the proxy state?
use exactly 'Wi-Fi', not 'wi-fi', you can find the exact name in network settings
why does my app show grant dialog many times?
exec return a Promise
, please use await
Wrong way, this will show dialog more than once:
;;
Right way, recommanded, es7
await ;await ;
Right way, es6, es5 or es3
;