cURL / Mailing Lists / curl-library / Single Mail


Socks5 works on Linux but not on Windows?

From: Shmulik Regev <>
Date: Sun, 23 Oct 2005 16:18:17 +0200

I'm trying to use a socks5 proxy with my libcurl (version 7.14.1) based application. The Linux version works great. Windows however is a different story. Normally it fails with error 10057 "Socket is not connected". BUT if I put a breakpoint in the handleSock5Proxy function before calling the first Curl_write (url.c:1812) the code is likely to work! This obviously suggests a timing problem. Putting Ethereal to work I can see the following sequence (my socks proxy runs on port 1080) which suggests that the proxy server is probably ok:

2182 > 1080 [SYN]
1080 > 2182 [SYN, ACK]
2182 > 1080 [ACK]

Any ideas? I suspect it is a (windows related ?) async connect problem but I'm not sure what the solution is.

Received on 2005-10-23