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
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2012-04-18 21:51 UTC by Lucian Muresan
Modified: 2016-03-02 05:30 UTC (History)
0 users

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


Attachments
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 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
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 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]
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

http://lists.gnu.org/archive/html/bug-wget/2012-04/msg00093.html
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.