how to you toggle on and off a web proxy in os x from the command line

For an unauthenticated proxy (and assuming it’s the Ethernet service you want to configure):

networksetup -setwebproxy Ethernet proxy.example.net 80 off

for authenticated:

networksetup -setwebproxy Ethernet proxy.example.net 80 on proxyuser "p4ssw0rd"

and to turn it off:

networksetup -setwebproxystate Ethernet off

If the network service isn’t named just “Ethernet”, you may need to parse networksetup -listallnetworkservices or -listnetworkserviceorder to get the correct name.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)