Issue/bug with wget over https and proxy

Jakub Ledwoń ledwojakub at gmail.com
Wed Jan 23 12:20:56 UTC 2019


I checked the logs, and the difference is:
BusyBox is sending GET request:
*12:54:38.515492 IP my_ip > proxy_ip: Flags [P.], seq 1:151, ack 1, win
229, options [nop,nop,TS val 4062059628 ecr 2056253471], length 150: HTTP:
GET https://raw.githubusercontent.com/mirror/busybox/master/INSTALL
<https://raw.githubusercontent.com/mirror/busybox/master/INSTALL> HTTP/1.1*
which results in 502 Bad Gateway response.
While GNU wget is using CONNECT method:
*12:52:51.203465 IP my_ip > proxy_ip: Flags [P.], seq 1:125, ack 1, win
229, options [nop,nop,TS val 4061952316 ecr 2056146160], length 124: HTTP:
CONNECT raw.githubusercontent.com:443
<http://raw.githubusercontent.com:443> HTTP/1.1*

which seems to be a correct approach, since I'm using http proxy.

Best regards,
Jakub Ledwon

pon., 21 sty 2019 o 16:47 Denys Vlasenko <vda.linux at googlemail.com>
napisał(a):

> On Mon, Jan 21, 2019 at 2:53 PM Jakub Ledwoń <ledwojakub at gmail.com> wrote:
> > I have env variables set up like this:
> > http_proxy=http://proxy_ip:8080
> > https_proxy=http://proxy_ip:8080
> > ftp_proxy=http://proxy_ip:8080
> > When I'm trying to use wget on https link behind this proxy, it fails.
> On http links it works without issues. I'm using v1.30.0 version of busybox.
> >>
> >> ./busybox wget
> https://raw.githubusercontent.com/mirror/busybox/master/INSTALL -O
> test.txt
> >> Connecting to proxy_ip:8080 (proxy_ip:8080)
> >> wget: server returned error: HTTP/1.1 502 Bad Gateway
> >
> > All others standard online console utilities works without issues.
> > GNU wget behaves as expected.
> >>
> >> wget https://raw.githubusercontent.com/mirror/busybox/master/INSTALL
> -O test.txt
> >> --2019-01-21 14:48:42--
> https://raw.githubusercontent.com/mirror/busybox/master/INSTALL
> >> Connecting to proxy_ip:8080... connected.
> >> Proxy request sent, awaiting response... 200 OK
> >> Length: 6116 (6.0K) [text/plain]
> >> Saving to: ‘test.txt’
>
> We need to compare what is being sent to proxy_ip:8080
> bu GNU wget, and by bbox wget. Evidently, there is some difference.
>
> This command should do it:
>
> tcpdump -nl -ieth0 -xX host proxy_ip and port 8080
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20190123/a3acefd8/attachment.html>


More information about the busybox mailing list