Reputation: 31
I am using Mac OS X (Sierra). In my network preferences, the proxies settings are not configured manualy, but configured by turn on the 'Auto Proxy Discovery' checkbox. Screenshot of network preferences
Is there a way to get the address (ip and port) of the current proxy I am working with?
Is it possible to get this information via a command line on the terminal?
(The command 'networksetup -getwebproxy ' not working in this case of Auto Proxy Discovery)
Upvotes: 2
Views: 9023
Reputation: 1935
I use the following command to list all the available auto configured proxy servers on mac osx.
curl -ksSL $(scutil --proxy | grep -m1 -Eioh "http.*") | grep -Eioh "\"PROXY.*:.*\""
Upvotes: 0
Reputation: 171
Run scutil --proxy
in Terminal. You will see the value of ProxyAutoConfigURLString
in the output. Download and examine the content of the file at this URL and find those host:port strings prefixed with PROXY
.
Upvotes: 15