Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 412579 - net-misc/wget: add libproxy support
Summary: net-misc/wget: add libproxy support
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2012-04-18 21:51 UTC by Lucian Muresan
Modified: 2024-04-15 06:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

patch adding optional libproxy support to wget (wget-libproxy.patch,3.87 KB, patch)
2012-04-18 21:55 UTC, Lucian Muresan
Details | Diff
ebuild patch to wget-1.13.4-r1 to enable libproxy (wget-1.13.4-r1_libproxy.ebuild.diff,1.26 KB, patch)
2012-04-18 21:56 UTC, Lucian Muresan
Details | Diff
patch adding optional libproxy support to wget (wget-libproxy.patch,9.52 KB, patch)
2012-04-20 06:53 UTC, Lucian Muresan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lucian Muresan 2012-04-18 21:51:01 UTC
There has been a patch by Dominique Leuenberger adding libproxy support to wget in the OpenSuse bugtracker, also proposed upstream on in the past. I re-submitted an improved version of his patch upstream to the mailing list:

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
Comment 1 Lucian Muresan 2012-04-18 21:55:51 UTC
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
DEBUG output created by Wget  on linux-gnu.

retr.c, getproxy: asking libproxy which proxy to use for url ''
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
retr.c, getproxy: libproxy suggests to use ''
--2012-04-18 23:54:22--
Resolving,,, ...
Caching => 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||:80... connected.
Created socket 5.
Releasing 0x08a49fd0 (new refcount 1).

---request begin---
User-Agent: Wget/ (linux-gnu)
Accept: */*
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
X-Cache-Lookup: HIT from
X-Cache: MISS from
X-Cache-Lookup: MISS from
Via: 1.0 (squid), 1.0 (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]
Comment 2 Lucian Muresan 2012-04-18 21:56:50 UTC
Created attachment 309473 [details, diff]
ebuild patch to wget-1.13.4-r1 to enable libproxy
Comment 3 Lucian Muresan 2012-04-20 06:53:28 UTC
Created attachment 309587 [details, diff]
patch adding optional libproxy support to wget
Comment 4 SpanKY gentoo-dev 2012-04-21 05:34:30 UTC
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.
Comment 6 Larry the Git Cow gentoo-dev 2024-04-15 06:12:00 UTC
The bug has been closed via the following commit(s):

commit 2302c9517de175f338b83e76a3163d14ab399d89
Author:     Sam James <>
AuthorDate: 2024-04-15 06:01:35 +0000
Commit:     Sam James <>
CommitDate: 2024-04-15 06:10:45 +0000

    net-misc/wget: add 1.24.5
    Signed-off-by: Sam James <>

 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(+)