cURL / Mailing Lists / curl-library / Single Mail

curl-library

unable to connect to proxy using libcurl with --enable-proxy

From: Chris Ghormley <chris_at_set-point.com>
Date: Fri, 24 May 2013 16:11:01 -0700

I have been using a cross-compiled libcurl for some time and recently
have been trying to enable my application to work through proxy servers,
but have been having no success whatsoever. My configure command line is
listed below.

./configure CFLAGS='-Os' \
    --target=powerpc-linux \
    --host=powerpc-linux \
    --build=i686-pc-linux-gnu \
    --prefix=/opt/sixnet/usr/local \
    --enable-proxy \
    --disable-debug \
    --disable-crypto-auth \
    --disable-ares \
    --disable-dependency-tracking \
    --disable-largefile \
    --disable-libtool-lock \
    --disable-ftp \
    --disable-file \
    --disable-gopher \
    --disable-ldap \
    --disable-ldaps \
    --disable-rtsp \
    --disable-dict \
    --disable-telnet \
    --disable-tftp \
    --disable-pop3 \
    --disable-imap \
    --disable-smtp \
    --disable-manual \
    --disable-ipv6 \
    --disable-nonblocking \
    --disable-verbose \
    --disable-sspi \
    --enable-hidden-symbols \
    --with-axtls=/opt/sixnet/usr/local \
    --without-ssl \
    --without-gnutls \
    --without-nss \
    --without-libidn \
    --without-libssh2

This results in a curl with the following features enabled:

# /usr/bin/curl -V
curl 7.30.0 (powerpc-unknown-linux-gnu) libcurl/7.30.0 axTLS/1.4.9
zlib/1.2.3
Protocols: http https
Features: SSL libz

Is there a configuration option that I must also enable to get proxy
support working? When I use curl with a libcurl built with this
configuration, the HTTP call goes through without attempting to connect
to the proxy. For example, here is a command line I have tried:

# /usr/bin/curl --proxy example.net:3128 -v https://google.com

With the libcurl I built, I get
> GET / HTTP/1.1
> User-Agent: curl/7.30.0
> Host: google.com
> Accept: */*
> ....

With the curl installed on my PC from the repository, I get
* About to connect() to proxy example.net port 3128 (#0)
* Trying 67.18.89.13... connected
* Establish HTTP proxy tunnel to google.com:443
> CONNECT google.com:443 HTTP/1.1

Admittedly the one on my PC is much older...

curl 7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1
zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3
pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP

What am I missing?

Thanks,

Chris
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-25