There has been a patch by Dominique Leuenberger adding libproxy support to wget in the OpenSuse bugtracker, also proposed upstream on bug-wget@gnu.org in the past. I re-submitted an improved version of his patch upstream to the mailing list: http://lists.gnu.org/archive/html/bug-wget/2012-04/msg00083.html The benefit of it would be that if libproxy was built with pacrunner support (for example with webkit, see bug 412573), one can explicitely specify a PAC file location in the environment variables http_proxy, https__proxy or ftp_proxy in the form of pac+http://server/path/to/proxy.pac and then wget is automatically given the "right" proxy for the specified URL, according to the PAC script. Reproducible: Always
Created attachment 309471 [details, diff] patch adding optional libproxy support to wget This patch was originally published by Dominique Leuenberger, I adapted it to properly work with PAC retrieval in wget: _PX_DEBUG=1 ftp_proxy=pac+http://elitebook8730w-lan/proxy.pac wget -d ftp://ftp.mozilla.org/pub/ls-lR.gz DEBUG output created by Wget on linux-gnu. retr.c, getproxy: asking libproxy which proxy to use for url 'ftp://ftp.mozilla.org/pub/ls-lR.gz' Using config: 23envvar_config_extension Using ignore: Config is: pac+http://elitebook8730w-lan/proxy.pac PAC received! Using pacrunner: 26webkit_pacrunner_extension Pacrunner returned: PROXY ftp-proxy.t-online.de retr.c, getproxy: libproxy suggests to use 'http://ftp-proxy.t-online.de' --2012-04-18 23:54:22-- ftp://ftp.mozilla.org/pub/ls-lR.gz Resolving ftp-proxy.t-online.de... 217.237.149.205, 217.237.148.70, 217.237.151.142, ... Caching ftp-proxy.t-online.de => 217.237.149.205 217.237.148.70 217.237.151.142 217.237.150.115 217.237.151.205 217.237.148.102 217.237.151.115 217.237.151.51 217.237.150.188 217.237.150.51 217.237.148.22 217.237.150.205 217.237.149.142 2003:45:c002:2::80 2003:40:8002:2::80 2003:61:6002:2::80 2003:5b:c002:2::80 2003:41:a002:2::80 2003:57:4002:2::80 2003:56:a002:2::80 2003:40:2:2::80 2003:4c:c002:2::80 2003:4c:2002:2::80 2003:5f:2:2::80 2003:41:6002:2::80 2003:65:8002:2::80 Connecting to ftp-proxy.t-online.de|217.237.149.205|:80... connected. Created socket 5. Releasing 0x08a49fd0 (new refcount 1). ---request begin--- GET ftp://ftp.mozilla.org/pub/ls-lR.gz HTTP/1.1 User-Agent: Wget/ (linux-gnu) Accept: */* Host: ftp.mozilla.org Connection: Close Proxy-Connection: Keep-Alive ---request end--- Proxy request sent, awaiting response... ---response begin--- HTTP/1.0 200 OK Server: squid Mime-Version: 1.0 Date: Wed, 18 Apr 2012 13:05:26 GMT Content-Type: text/plain Content-Length: 169159 Last-Modified: Wed, 17 Sep 2003 16:10:03 GMT Content-Encoding: gzip Age: 31737 X-Cache: HIT from l-lb-a01.isp.t-ipnet.de X-Cache-Lookup: HIT from l-lb-a01.isp.t-ipnet.de:80 X-Cache: MISS from l-lb-a01.isp.t-ipnet.de X-Cache-Lookup: MISS from l-lb-a01.isp.t-ipnet.de:80 Via: 1.0 l-cw-a02.isp.t-ipnet.de (squid), 1.0 l-cw-a01.isp.t-ipnet.de (squid) Connection: keep-alive ---response end--- 200 OK Registered socket 5 for persistent reuse. Length: 169159 (165K) [text/plain] Saving to: `ls-lR.gz' 100%[=====================================================================================================================================================================>] 169,159 302K/s in 0.5s 2012-04-18 23:54:23 (302 KB/s) - `ls-lR.gz' saved [169159/169159]
Created attachment 309473 [details, diff] ebuild patch to wget-1.13.4-r1 to enable libproxy
Created attachment 309587 [details, diff] patch adding optional libproxy support to wget http://lists.gnu.org/archive/html/bug-wget/2012-04/msg00093.html
i'd like to see this progress a bit more upstream, especially since i have no interest in maintaining this if upstream isn't responsive, i can merge it, but i'd just drop it when new versions came out rather than trying to figure it out myself also, wrt the patch, there are a few style issues you should prob fix. like missing spaces before the parens with func arguments.
https://gitlab.com/gnuwget/wget/-/commit/8e8900613ca98ad3accb8158548e4a3290a306f3
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2302c9517de175f338b83e76a3163d14ab399d89 commit 2302c9517de175f338b83e76a3163d14ab399d89 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-04-15 06:01:35 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-04-15 06:10:45 +0000 net-misc/wget: add 1.24.5 Bug: https://bugs.gentoo.org/930041 Closes: https://bugs.gentoo.org/412579 Closes: https://bugs.gentoo.org/929732 Signed-off-by: Sam James <sam@gentoo.org> net-misc/wget/Manifest | 2 + net-misc/wget/metadata.xml | 1 + net-misc/wget/wget-1.24.5.ebuild | 115 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+)