Linux – When using autoproxy, how can you see the proxy configuration

linuxPROXY

I set the global settings of the machine to use an autoproxy configuration script. e.g. http://autoproxy.mycompanydomain.exe:8080, but still there are some network apps that require an explicit proxy setting. I assume that this is because those apps don't know how to access the global proxy settings. How can i see the global proxy settings that were configured automatically so i can copy them to the settings of these troublesome apps?

Best Answer

If you are using explicit URL to the autoproxy script, then just download it and read it (it is a JavaScript script). You will find the proxy URL there and some rules, e.g. what URLs not to use the proxy for. Please note, though, that, as complicated logic may be implemented in JavaScript, sometimes the configuration cannot be precisely entered in any application 'proxy configuration' window (which usually are only 'proxy server URL' field and 'no proxy for' list).

You can see the configuration script with, e.g.:

curl http://autoproxy.mycompanydomain.exe:8080

If you don't use explicit script URL, you may try:

curl http://wpad/wpad.dat

or:

curl http://wpad.yourdomain/wpad.dat

Of course anything else than 'curl' may be used to download the data, though web browsers may try to interpret the script instead of just displaying it.

Many Linux application (including wget or curl) use the $http_proxy/$HTTP_PROXY, $HTTPS_PROXY and $NO_PROXY environment variables for proxy configuration. You may put your 'global settings' there (e.g. via your ~/.profile)