How would I add and activate a proxy for my computer via terminal (without going into System Preferences.) Can I do that with scutil --proxy somehow?


You can use networksetup.

See man networksetup for a full list.

Run this command via terminal.app

Example: setting http proxies.

sudo networksetup -setwebproxy Wi-Fi proxy.yourdomain 9090

sudo networksetup -setproxybypassdomains Wi-Fi website1, website2, website3

Replace Wi-Fi with the approiate service name (wifi, ethernet, ..).

  • So this would look like: networksetup -setwebproxy Wi-Fi skyzip.com 9090 and networksetup -setproxybypassdomains Wi-Fi https://www.youtube.com https://www.google.com
    – ALX
    Apr 18 '16 at 20:24
  • If 9090 is the port your using than yes. Also your sites are https, which needs to be enabled under -setsecurewebproxy.
    – tron_jones
    Apr 18 '16 at 20:26
  • So i'd just do networksetup -setsecurewebproxy Wi-Fi skyzip.com 9090 instead?
    – ALX
    Apr 18 '16 at 20:27
  • Depends on your needs really. If you want to proxy both http and https than you would enable both of them. If you just want to send https to a proxy than just enable -setsecurewebproxy and set your bypass domains.
    – tron_jones
    Apr 18 '16 at 20:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .