Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use wget through a proxy which uses .pac config.

When I googled a bit, I found that .pac is a javascript file and wget cannot parse it based on the following url

http://www.linuxquestions.org/questions/linux-networking-3/i-want-to-use-wget-configured-with-a-wpad-dat-proxy-636922/

Is there any work around?

Thanks in advance

share|improve this question
up vote 1 down vote accepted

If the .pac file does not change too often (in my experience they do not), you can just read the file, and find the right proxy to give to wget.

If the file is too complex or changes a lot, you could write a small script in python using the pacparser library.

share|improve this answer

Quoted from http://www.gnu.org/software/wget/manual/html_node/Proxies.html

Wget supports proxies for both HTTP and FTP retrievals. The standard way to specify proxy location, which Wget recognizes, is using the following environment variables: http_proxy https_proxy

If set, the http_proxy and https_proxy variables should contain the URLs of the proxies for HTTP and HTTPS connections respectively

share|improve this answer

We had to integrate some proxy support in some of our tools (Windows based only) and in order to validate our implementation, we created a "wget" utility (named VVGet) that can use proxies based on WPAD or PAC files (autoproxy).

This tool is currently available for free, here: http://win10wiwi.com/dlfiles/VVGet.exe

If WPAD is enabled or if there is an AutoProxy/PAC file available to a client system configuration in such a way that Internet Explorer or Windows Update can go through a proxy, VVGet should also be able to do it. At least if there is no authentication needed. Basic proxy authentication is supported in VVGet (specifying proxy manually).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.