Discussion:
git clone over https failure while using socks proxy. any suggestions?thanks.
jelly
2011-07-30 14:56:56 UTC
Permalink
What steps will reproduce the problem?
Step 1. Start socks proxy: plink.exe -N ***@216.194.70.6 -pw pass -D 127.0.0.1:9050
Step 2. Use git with the sock proxy.
Step 3. Clone project: git clone https://code.google.com/p/wiztodoWhat browser (or git/hg/svn client) are you using? On what operatingsystem?
CYGWIN_NT-6.1 jelly-PC2 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin

git version 1.7.5.1

curl 7.20.1 (i686-pc-cygwin) libcurl/7.20.1 OpenSSL/0.9.8r zlib/1.2.5 libidn/1.1
8 libssh2/1.2.5
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s rtsp scp sftp smt
p smtps telnet tftp
Features: IDN IPv6 Largefile NTLM SSL libz

plink
PuTTY Link: command-line connection utility
Development snapshot 2010-08-30:r8981

***@jelly-PC2 ~
$ git config --get http.proxy
/home/jelly/bin/proxy

#!/bin/sh
# Filename: /home/jelly/bin/proxy
exec corkscrew localhost 9050 $*

***@jelly-PC2 ~
$ GIT_CURL_VERBOSE=1 git clone https://code.google.com/p/wiztodo
Cloning into wiztodo...
* About to connect() to proxy port 443 (#0)
* Trying 64.233.183.102... * Establish HTTP proxy tunnel to code.google.com:44
3
* Send failure: Connection reset by peer
* Failed sending CONNECT to proxy
* Expire cleared
* Closing connection #0
* About to connect() to proxy port 443 (#0)
* Trying 64.233.183.102... * Establish HTTP proxy tunnel to code.google.com:44
3
* Send failure: Connection reset by peer
* Failed sending CONNECT to proxy
* Expire cleared
* Closing connection #0
error: Send failure: Connection reset by peer while accessing https://code.googl
e.com/p/wiztodo/info/refs

fatal: HTTP request failed
Daniel Stenberg
2011-07-31 14:25:05 UTC
Permalink
Post by jelly
Step 1. Start socks proxy
Step 2. Use git with the sock proxy.
curl 7.20.1 (i686-pc-cygwin) libcurl/7.20.1
Thanks for your report. Any chance you can try the latest libcurl to see if
this bug is still present or already fixed?
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
jelly
2011-08-01 15:28:55 UTC
Permalink
How to get the latest libcurl for cygwin? Thanks!

--

Contact me:
QQ: 2578717
MSN: ***@msn.cn
ÐÂÀË΢²©£ºhttp://t.sina.com.cn/sinojelly
ÎҵIJ©¿Í£ºhttp://sinojelly.20x.cc
Post by Daniel Stenberg
Post by jelly
Step 1. Start socks proxy
Step 2. Use git with the sock proxy.
curl 7.20.1 (i686-pc-cygwin) libcurl/7.20.1
Thanks for your report. Any chance you can try the latest libcurl to see if
this bug is still present or already fixed?
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
jelly
2011-08-01 17:15:44 UTC
Permalink
I found the curl open source project on github.
But i found something strange.
I use "./configure --with-ssl --with-libssh2"
But it still report:
curl version: 7.21.8-DEV
Host setup: i686-pc-cygwin
Install prefix: /usr/local
Compiler: gcc
SSL support: no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls} )
SSH support: no (--with-libssh2)

And it still print something like this:
configure: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM
and more.
configure: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyass
l, --with-nss or --with-axtls to address this.

How to enable ssl and ssh? thanks!
Post by Daniel Stenberg
Post by jelly
Step 1. Start socks proxy
Step 2. Use git with the sock proxy.
curl 7.20.1 (i686-pc-cygwin) libcurl/7.20.1
Thanks for your report. Any chance you can try the latest libcurl to see if
this bug is still present or already fixed?
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg
2011-08-01 18:32:09 UTC
Permalink
Post by jelly
SSL support: no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls} )
SSH support: no (--with-libssh2)
configure: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM
and more.
configure: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyass
l, --with-nss or --with-axtls to address this.
How to enable ssl and ssh? thanks!
Check out config.log closely to figure out why the detection of the libraries
and their include files failed.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
jelly
2011-08-02 14:55:12 UTC
Permalink
Thank you! I have updated my libcurl to the latest version, but still can not use socks proxy.

If I config http.proxy as localhost:9050, I get error: Proxy CONNECT aborted.
If I config http.proxy using some port forwarding tools, such as corkscrew or connect, I get Send failure: Connection reset by peer.
I don't know the difference of these two configurations, and how to choose the proper one.
Why I can't use socks proxy while using git? Thanks.

$ git config --get http.proxy
localhost:9050

***@jelly-PC2 ~/curl-new
$ GIT_CURL_VERBOSE=1 git clone https://code.google.com/p/wiztodo
Cloning into wiztodo...
* About to connect() to proxy localhost port 9050 (#0)
* Trying ::1... * Connected to localhost (::1) port 9050 (#0)
* Establish HTTP proxy tunnel to code.google.com:443
CONNECT code.google.com:443 HTTP/1.1
Host: code.google.com:443
User-Agent: git/1.7.5.1
Proxy-Connection: Keep-Alive
Pragma: no-cache

* Proxy CONNECT aborted
* Closing connection #0
* About to connect() to proxy localhost port 9050 (#0)
* Trying ::1... * Connected to localhost (::1) port 9050 (#0)
* Establish HTTP proxy tunnel to code.google.com:443
CONNECT code.google.com:443 HTTP/1.1
Host: code.google.com:443
User-Agent: git/1.7.5.1
Proxy-Connection: Keep-Alive
Pragma: no-cache

* Proxy CONNECT aborted
* Closing connection #0
error: Proxy CONNECT aborted while accessing https://code.google.com/p/wiztodo/i
nfo/refs

fatal: HTTP request failed

======================
$ git config --get http.proxy
/home/jelly/bin/proxy

$ cat /home/jelly/bin/proxy
#!/bin/sh
exec corkscrew localhost 9050 $*
#connect -S 127.0.0.1:9050 $*

***@jelly-PC2 ~/curl-new
$ GIT_CURL_VERBOSE=1 git clone https://code.google.com/p/wiztodo
Cloning into wiztodo...
* About to connect() to proxy port 443 (#0)
* Trying 74.125.71.138... * Connected to (nil) (74.125.71.138) port 443 (#0)
* Establish HTTP proxy tunnel to code.google.com:443
* Send failure: Connection reset by peer
* Failed sending CONNECT to proxy
* Closing connection #0
* About to connect() to proxy port 443 (#0)
* Trying 74.125.71.138... * Connected to (nil) (74.125.71.138) port 443 (#0)
* Establish HTTP proxy tunnel to code.google.com:443
* Send failure: Connection reset by peer
* Failed sending CONNECT to proxy
* Closing connection #0
error: Send failure: Connection reset by peer while accessing https://code.googl
e.com/p/wiztodo/info/refs

fatal: HTTP request failed
--

Contact me:
QQ: 2578717
MSN: ***@msn.cn
ÐÂÀË΢²©£ºhttp://t.sina.com.cn/sinojelly
ÎҵIJ©¿Í£ºhttp://sinojelly.20x.cc
Post by jelly
SSL support: no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls} )
SSH support: no (--with-libssh2)
configure: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM
and more.
configure: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyass
l, --with-nss or --with-axtls to address this.
How to enable ssl and ssh? thanks!
Check out config.log closely to figure out why the detection of the libraries
and their include files failed.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg
2011-08-03 21:43:48 UTC
Permalink
Post by jelly
Thank you! I have updated my libcurl to the latest version, but still can
not use socks proxy.
Ok, thanks for trying that out. This is bad news to us then as it seems to be
an actually still existing bug.
Post by jelly
If I config http.proxy as localhost:9050, I get error: Proxy CONNECT aborted.
If I config http.proxy using some port forwarding tools, such as corkscrew
or connect, I get Send failure: Connection reset by peer.
I don't know the difference of these two configurations, and how to choose
the proper one. Why I can't use socks proxy while using git? Thanks.
Isn't http.proxy saying that the proxy is a HTTP proxy, and that's why it
sends a HTTP CONNECT request to it (that fails) ?

If you start out without git in the mix, can you try using the command line
curl tool to go over the SOCKS proxy to download data off a remote HTTPS site?
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg
2011-08-04 14:21:57 UTC
Permalink
On Thu, 4 Aug 2011, jelly wrote:

Please note that we do not appreciate top-posting on this list:
http://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post
$ export http_proxy=localhost:9050
This says you have a HTTP proxy on port 9050, while you previously have
explained that you have a SOCKS proxy there. curl will thus try to speak HTTP
with the SOCKS proxy, which won't work.

With recent curl versions you can set the proxy to be:

"socks4://localhost:9050" (assuming SOCKS4 is what you want)

or just use the proper --socks* option (depending on what SOCKS version you
require).
$ curl https://code.google.com/p/wiztodo -vvv
Note that one -v is enough, adding more -v options won't change anything.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
jelly
2011-08-04 13:34:55 UTC
Permalink
I tested only curl, it reports Proxy CONNECT aborted.

***@jelly-PC2 ~
$ echo $http_proxy


***@jelly-PC2 ~
$ curl https://code.google.com/p/wiztodo
curl: (35) Unknown SSL protocol error in connection to code.google.com:443

***@jelly-PC2 ~
$ export http_proxy=localhost:9050

***@jelly-PC2 ~
$ echo $http_proxy
localhost:9050

***@jelly-PC2 ~
$ export https_proxy=localhost:9050

***@jelly-PC2 ~
$ echo $https_proxy
localhost:9050

***@jelly-PC2 ~
$ curl https://code.google.com/p/wiztodo
curl: (56) Proxy CONNECT aborted

***@jelly-PC2 ~
$ curl https://code.google.com/p/wiztodo -vvv
* About to connect() to proxy localhost port 9050 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 9050 (#0)
* Establish HTTP proxy tunnel to code.google.com:443
CONNECT code.google.com:443 HTTP/1.1
Host: code.google.com:443
User-Agent: curl/7.20.1 (i686-pc-cygwin) libcurl/7.20.1 OpenSSL/0.9.8r zlib/1.
2.5 libidn/1.18 libssh2/1.2.5
Proxy-Connection: Keep-Alive
* Proxy CONNECT aborted
* Closing connection #0
curl: (56) Proxy CONNECT aborted

***@jelly-PC2 ~
$ which curl
/usr/bin/curl

***@jelly-PC2 ~
$ curl https://code.google.com/p/wiztodo -vvv
* About to connect() to proxy localhost port 9050 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 9050 (#0)
* Establish HTTP proxy tunnel to code.google.com:443
CONNECT code.google.com:443 HTTP/1.1
Host: code.google.com:443
User-Agent: curl/7.21.8-DEV (i686-pc-cygwin) libcurl/7.20.1 OpenSSL/0.9.8r zli
b/1.2.5 libidn/1.18 libssh2/1.2.5
Proxy-Connection: Keep-Alive
* Proxy CONNECT aborted
* Closing connection #0
curl: (56) Proxy CONNECT aborted

***@jelly-PC2 ~
$ curl --version
curl 7.21.8-DEV (i686-pc-cygwin) libcurl/7.20.1 OpenSSL/0.9.8r zlib/1.2.5 libidn
/1.18 libssh2/1.2.5
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s rtsp scp sftp smt
p smtps telnet tftp
Features: IDN IPv6 Largefile NTLM SSL libz

***@jelly-PC2 ~
$
Post by jelly
Thank you! I have updated my libcurl to the latest version, but still can
not use socks proxy.
Ok, thanks for trying that out. This is bad news to us then as it seems to be
an actually still existing bug.
Post by jelly
If I config http.proxy as localhost:9050, I get error: Proxy CONNECT aborted.
If I config http.proxy using some port forwarding tools, such as corkscrew
or connect, I get Send failure: Connection reset by peer.
I don't know the difference of these two configurations, and how to choose
the proper one. Why I can't use socks proxy while using git? Thanks.
Isn't http.proxy saying that the proxy is a HTTP proxy, and that's why it
sends a HTTP CONNECT request to it (that fails) ?
If you start out without git in the mix, can you try using the command line
curl tool to go over the SOCKS proxy to download data off a remote HTTPS site?
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
jelly
2011-08-04 17:17:23 UTC
Permalink
I know, thank you!
but, how to set socks5 proxy in enviroment variable? and how to use socks5 proxy with git?


$ curl --socks5 localhost:9050 https://code.google.com/p/wiztodo
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://code.google.com/p/wiztodo/">here</A>.
</BODY></HTML>


***@jelly-PC2 /cygdrive/d/Projects/WizTodo/Code-new/wiztodo
$ https_proxy="socks5://localhost:9050"


***@jelly-PC2 /cygdrive/d/Projects/WizTodo/Code-new/wiztodo
$ curl https://code.google.com/p/wiztodo
curl: (56) Proxy CONNECT aborted
Daniel Stenberg
2011-08-04 22:27:18 UTC
Permalink
Post by jelly
but, how to set socks5 proxy in enviroment variable? and how to use socks5 proxy with git?
It wasn't possible at all until very recently (7.21.7), and you do it by
setting the proxy variable with a socks protocol prefix, just as you tried!

Are you possibly using an older version now in your tests?
Post by jelly
$ curl --socks5 localhost:9050 https://code.google.com/p/wiztodo
$ https_proxy="socks5://localhost:9050"
$ curl https://code.google.com/p/wiztodo
curl: (56) Proxy CONNECT aborted
I just wrote up a test doing this with my curl dev version (to be committed as
test 709) and it worked just fine for me!
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg
2011-08-04 22:39:11 UTC
Permalink
Post by Daniel Stenberg
I just wrote up a test doing this with my curl dev version (to be committed
as test 709) and it worked just fine for me!
Hang on, there's something fishy here. Will commit something soon to make
things better. Stay tuned.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg
2011-08-04 22:48:37 UTC
Permalink
Post by Daniel Stenberg
Hang on, there's something fishy here. Will commit something soon to make
things better. Stay tuned.
Try the current git version and it should work better when the socks proxy is
set with --proxy or an evironment variable.

The exact fix is this:

https://github.com/bagder/curl/commit/17f343290c9888ab5f108b0e4c
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
jelly
2011-08-05 16:43:05 UTC
Permalink
I have updated libcurl to the new version, but i get No URL Set error.

***@jelly-PC2 ~/curl-new
$ https_proxy="socks5://localhost:9050"

***@jelly-PC2 ~/curl-new
$ curl https://code.google.com/p/wiztodo
curl: (3) No URL set!
Segmentation fault (core dumped)

***@jelly-PC2 ~/curl-new
$ https_proxy=

***@jelly-PC2 ~/curl-new
$ curl --socks5 localhost:9050 https://code.google.com/p/wiztodo
curl: (3) No URL set!
Segmentation fault (core dumped)

***@jelly-PC2 ~/curl-new
$ git clone https://code.google.com/p/wiztodo
Cloning into wiztodo...
error: No URL set! while accessing https://code.google.com/p/wiztodo/info/refs

fatal: HTTP request failed

***@jelly-PC2 ~/curl-new
$ GIT_CURL_VERBOSE=1 git clone https://code.google.com/p/wiztodo
Cloning into wiztodo...
* No URL set!
* No URL set!
error: No URL set! while accessing https://code.google.com/p/wiztodo/info/refs

fatal: HTTP request failed
Post by Daniel Stenberg
Post by Daniel Stenberg
Hang on, there's something fishy here. Will commit something soon to make
things better. Stay tuned.
Try the current git version and it should work better when the socks proxy is
set with --proxy or an evironment variable.
https://github.com/bagder/curl/commit/17f343290c9888ab5f108b0e4c
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg
2011-08-05 20:38:16 UTC
Permalink
On Sat, 6 Aug 2011, jelly wrote:

PLEASE stop the top-posting. I've already asked you. It really makes your
mails hard to read and this thread hard to track.

(I trimmed the subject line to feature less rubbish.)
Post by jelly
I have updated libcurl to the new version, but i get No URL Set error.
Did you really rebuild it then as you should've? What if you run the test
suite, does all the tests still run fine? I've done that one two of my
machines and both ran over 620 tests successfully - including test 709 and 710
that perfom the operation you're trying to make.

I also tried to set 'http_proxy' to a local port number where I used openssh
to setup a SOCKS proxy and that too worked fine.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
jelly
2011-08-06 01:11:17 UTC
Permalink
Did you really rebuild it then as you should've? not clean before make.>What if you run the test suite, does all the tests still run fine?
I can't reproduce Url Not Set problem on commit 817b863466fd9812cb7a2305b66a39f2c0c24dbc.using this version, i can run "curl --socks5 localhost:9050 https://code.google.com/p/wiztodo -k" successful.i can use git with socks proxy in http.proxy:$ git config --get http.proxy
socks5://localhost:9050and git clone https://code.google.com/p/wiztodo successful.But i run these commands fail, seems curl and git can not use socks proxy settings in https_proxy:$ echo $https_proxy
socks5://localhost:9050
$ curl https://code.google.com/p/wiztodo
curl: (35) Unknown SSL protocol error in connection to code.google.com:443$ git clone https://code.google.com/p/wiztodo wiztodo3
Cloning into wiztodo3...
error: Unknown SSL protocol error in connection to code.google.com:443 while ac
cessing https://code.google.com/p/wiztodo/info/refsBTW: test result on commit 40597fd942914960b068 (cygwin)TESTDONE: 552 tests out of 556 reported OK: 99%
TESTFAIL: These test cases failed: 504 564 582 1070
Daniel Stenberg
2011-08-06 12:34:05 UTC
Permalink
Post by jelly
i can run "curl --socks5 localhost:9050 https://code.google.com/p/wiztodo
-k" successful.i can use git with socks proxy in http.proxy
...
Post by jelly
But i run these commands fail, seems curl and git can not use
That seems very odd. When libcurl has a proxy to use, it doesn't matter how it
got it, it will stilll use the proxy the same way.

Also, I just tried your exact recipe with the same URL and it works for me!
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
jelly
2011-08-06 14:39:10 UTC
Permalink
Post by Daniel Stenberg
That seems very odd. When libcurl has a proxy to use, it doesn't matter how it
got it, it will stilll use the proxy the same way.
It seems that curl don't know there is proxy setting in https_proxy. ( socks proxy and http proxy are all the same)***@jelly-PC2 ~/test-zip-git-clone
$ echo $https_proxy
socks5://localhost:9050

***@jelly-PC2 ~/test-zip-git-clone
$ curl https://code.google.com/p/wiztodo -v
* About to connect() to code.google.com port 443 (#0)
* Trying 74.125.71.100... connected
* Connected to code.google.com (74.125.71.100) port 443 (#0)
* Unknown SSL protocol error in connection to code.google.com:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to code.google.com:443
Daniel Stenberg
2011-08-07 15:47:39 UTC
Permalink
Post by jelly
It seems that curl don't know there is proxy setting in https_proxy. ( socks
proxy and http proxy are all the same)
Again, this works fine for me. I'll show you my command line below.

Can you set a break-point in lib/url.c:detect_proxy() and see that it finds
the https proxy environment variable there?

$ https_proxy="socks4://localhost:9000" ./src/curl -v
https://code.google.com/p/wiztodo
* About to connect() to proxy localhost port 9000 (#0)
* Trying 127.0.0.1... % Total % Received % Xferd Average Speed Time
Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0connected
* SOCKS4 request granted.
* Connected to localhost (127.0.0.1) port 9000 (#0)
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using RC4-SHA
* Server certificate:
* subject: C=US; ST=California; L=Mountain View; O=Google Inc;
CN=*.google.com
* start date: 2011-07-27 10:11:59 GMT
* expire date: 2012-07-27 10:21:59 GMT
* subjectAltName: code.google.com matched
* issuer: C=US; O=Google Inc; CN=Google Internet Authority
* SSL certificate verify ok.
Post by jelly
GET /p/wiztodo HTTP/1.1
User-Agent: curl/7.21.8-DEV (i686-pc-linux-gnu) libcurl/7.21.8-DEV
OpenSSL/1.0.0d zlib/1.2.3.4 libidn/1.22 libssh2/1.2.9_DEV librtmp/2.2e
Post by jelly
Host: code.google.com
Accept: */*
* additional stuff not fine transfer.c:1033: 0 0
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 301 Moved Permanently
< Location: http://code.google.com/p/wiztodo/
< X-Content-Type-Options: nosniff
< Content-Type: text/html; charset=UTF-8
< Date: Sun, 07 Aug 2011 15:45:14 GMT
< Expires: Tue, 06 Sep 2011 15:45:14 GMT
< Cache-Control: public, max-age=2592000
< Server: codesite
< Content-Length: 230
< X-XSS-Protection: 1; mode=block
<
0 230 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0<HTML><HEAD><meta http-equiv="content-type"
content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://code.google.com/p/wiztodo/">here</A>.
</BODY></HTML>
100 230 100 230 0 0 435 0 --:--:-- --:--:-- --:--:-- 436
* Connection #0 to host code.google.com left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
jelly
2011-08-07 17:41:07 UTC
Permalink
Post by Daniel Stenberg
Can you set a break-point in lib/url.c:detect_proxy() and see that it finds
the https proxy environment variable there?
How to debug it?There is a long time from the last time that i used gdb. It seems break point did not take any effect.Should I run ./configure again, and with some other params? or any other things i must know? such as modify makefile? add -g option? ***@jelly-PC2 ~/curl-new/curl-git
$ gdb --args ./src/curl.exe https://code.google.com/p/wiztodo
GNU gdb (GDB) 7.3.50.20110727-cvs (cygwin-special)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/jelly/curl-new/curl-git/src/curl.exe...(no debugging
symbols found)...done.
(gdb) b detect_proxy
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (detect_proxy) pending.
(gdb) r
Starting program: /home/jelly/curl-new/curl-git/src/curl.exe https://code.google
.com/p/wiztodo
[New Thread 7436.0x20e4]
warning: cYgFFFFFFFF 6117EC60
[New Thread 7436.0x18b8]
warning: cYgstd 22cce5 d 3
[New Thread 7436.0x2678]
curl: (35) Unknown SSL protocol error in connection to code.google.com:443
[Inferior 1 (process 7436) exited with code 043]
(gdb)
Daniel Stenberg
2011-08-07 20:09:54 UTC
Permalink
Post by jelly
Post by Daniel Stenberg
Can you set a break-point in lib/url.c:detect_proxy() and see that it finds
the https proxy environment variable there?
How to debug it?There is a long time from the last time that i used gdb. It
seems break point did not take any effect.
I'm not sure what fun tricks cygwin and libtool play on you, but I personally
tend to build curl staticially to ease debugging:

$ ./configure --disable-shared --enable-debug --enable-maintainer-mode [...]

Then 'src/curl' is built with a static libcurl and there's no funny gdb
problems or anything. But then all my (lib)curl development is done on
Linux...
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
jelly
2011-08-05 17:16:31 UTC
Permalink
I know why curl report No URL Set Error.
There are some bugs in the latest two commits.
If i switch to "40597fd git ignore src/config-win32.h", It works ok.
It seems that i git clone ok while using socks proxy, but I can't find any information about socks proxy.
so i doubet socks proxy was not used?
or the modification of libcurl was so usefull that i can go through the internet without proxy?


***@jelly-PC2 ~/curl-new/curl-git
$ git log --oneline master
817b863 BSD-style lwIP TCP/IP stack support - docs/INSTALL blurb
f6272dd BSD-style lwIP TCP/IP stack support - followup
40597fd git ignore src/config-win32.h
f0fae85 keep a single copy of config-win32.h in version control repository.
e1f3536 RELEASE-NOTES: synced with afe88d85f40e1
afe88d8 test710: verify that --proxy socks5://hostname works
17f3432 create_conn: mark non-HTTP proxies accordingly
75fa3d2 test709: HTTP GET via SOCKS5 set in environment
9812446 TODO-RELEASE: issue #293 is done


$ https_proxy="socks5://localhost:9050"


***@jelly-PC2 ~/curl-new/curl-git
$ GIT_CURL_VERBOSE=1 git clone https://code.google.com/p/wiztodo wiztodo4
Cloning into wiztodo4...
* About to connect() to code.google.com port 443 (#0)
* Trying 74.125.235.105... * Connected to code.google.com (74.125.235.105) por
t 443 (#0)
* SSL connection using RC4-SHA
* Server certificate:
* subject: C=US; ST=California; L=Mountain View; O=Google Inc; CN=*.googl
e.com
* start date: 2011-07-27 10:11:59 GMT
* expire date: 2012-07-27 10:21:59 GMT
* issuer: C=US; O=Google Inc; CN=Google Internet Authority
* SSL certificate verify result: unable to get local issuer certificate (
20), continuing anyway.
GET /p/wiztodo/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.5.1
Host: code.google.com
Accept: */*
Pragma: no-cache


< HTTP/1.1 200 OK
< Content-Type: application/x-git-upload-pack-advertisement
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< X-Content-Type-Options: nosniff
< Date: Fri, 05 Aug 2011 17:04:29 GMT
< Server: git_frontend
< Content-Length: 238
< X-XSS-Protection: 1; mode=block
<


* Connection #0 to host code.google.com left intact
* About to connect() to code.google.com port 443 (#0)
* Trying 74.125.235.105... % Total % Received % Xferd Average Speed Ti
me Time Time Current
Dload Upload Total Spent Left Speed
100 238 0 238 0 0 3625 0 --:--:-- --:--:-- --:--:-- 3625*
--

Contact me:
QQ: 2578717
MSN: ***@msn.cn
ÐÂÀË΢²©£ºhttp://t.sina.com.cn/sinojelly
ÎҵIJ©¿Í£ºhttp://sinojelly.20x.cc
I have updated libcurl to the new version, but i get No URL Set error.
$ https_proxy="socks5://localhost:9050"
$ curl https://code.google.com/p/wiztodo
curl: (3) No URL set!
Segmentation fault (core dumped)
$ https_proxy=
$ curl --socks5 localhost:9050 https://code.google.com/p/wiztodo
curl: (3) No URL set!
Segmentation fault (core dumped)
$ git clone https://code.google.com/p/wiztodo
Cloning into wiztodo...
error: No URL set! while accessing https://code.google.com/p/wiztodo/info/refs
fatal: HTTP request failed
$ GIT_CURL_VERBOSE=1 git clone https://code.google.com/p/wiztodo
Cloning into wiztodo...
* No URL set!
* No URL set!
error: No URL set! while accessing https://code.google.com/p/wiztodo/info/refs
fatal: HTTP request failed
Post by Daniel Stenberg
Post by Daniel Stenberg
Hang on, there's something fishy here. Will commit something soon to make
things better. Stay tuned.
Try the current git version and it should work better when the socks proxy is
set with --proxy or an evironment variable.
https://github.com/bagder/curl/commit/17f343290c9888ab5f108b0e4c
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Loading...