Total Pageviews

Monday 21 May 2018

替mac系统设置代理的程序-proxysetup

proxysetup is a command-line utility that allows managing Macintosh proxy settings via the networksetup program without having to sudo or supply one's password.

Overview

proxysetup runs the /usr/sbin/networksetup utility using whatever parameters were passed to the program. This is useful if you want to be able to run networksetup and make network changes without having to sudo or supply your password interactively.
To do so, make root own proxysetup and set the setuid bit to allow anyone to execute it as root.
chown root:wheel proxysetup
chmod 4755 proxysetup
Since proxysetup is intended primarily for managing proxy settings, it only allows the following networksetup commands to be run:
-listallnetworkservices
-getwebproxy
-setwebproxy
-setwebproxystate
-getsecurewebproxy
-setsecurewebproxy
-setsecurewebproxystate
-getautoproxyurl
-setautoproxyurl
-setautoproxystate
-getproxybypassdomains
-setproxybypassdomains
-help
-printcommands

Building

git clone https://github.com/getlantern/proxysetup 
cd proxysetup
gcc -o proxysetup proxysetup.c
 
from https://github.com/getlantern/proxysetup 

No comments:

Post a Comment