curl-library
Re: tsocks (transparent socks) vs. libcurl
Date: Mon, 25 Jan 2010 11:03:17 -0200
On Mon, Jan 25, 2010 at 9:58 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 25 Jan 2010, Cláudio Sampaio wrote:
>
> I tried with libcurl's socks5 options and it worked fine. So it is libcurl
>> itself that somehow disallows transparent proxying.
>>
>
> I wouldn't characterize the problem like that. I claim that libcurl is just
> using non-blocking sockets exactly as it should and it follows the well-used
> sockets API, so if tsocks has a problem with libcurl I would say that the
> problem isn't in libcurl.
>
> But this said, if you can tell us if there's anything in particular we can
> change to make libcurl more tsocks-friendly then please do.
I don't know, I just know that tsocks works by intercepting the connect()
library call to do its own. So it might be that libcurl is skipping that
somehow.
Anyway, I am not implying anything, I am sorry about my LD_LIBRARY_PATH and
LD_PRELOAD confusion and nevertheless I got a way to work around it by
autodetecting within my program if it is running under tsocks and setting
the appropriate proxy parameters in libcurl. It's just that *I* myself got
confused about that, indeed, even the tsocks example on internet shows it
running curl (maybe an earlier version?).
But your answers were really clear and helped me to solve my problem, thank
you. :)
Best regards,
Cláudio
>
>
> Nevertheless, as my program runs in both Windows and Linux and it
>> traditionally uses transparent socks
>>
>
> libcurl also runs on both Windows and Linux and it supports SOCKS on
> both...
>
>
> it there any way to do transparent socks (the LD_LIBRARY_PATH kind, in
>> Linux) work with libcurl?
>>
>
> Again, this is rather a tsocks issue and not a libcurl issue. libcurl
> doesn't even know what LD_LIBRARY_PATH is nor could it even affect it if we
> would know.
>
> Besides, tsocks uses LD_PRELOAD and not LD_LIBRARY_PATH.
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
-- de nada vale erguer mãos e olhos para um céu tão longe, para um deus tão longe ou, quem sabe? para um céu vazio. (Carlos Drummond de Andrade, "Coisa Miserável") Sent from Campinas, SP, Brazil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-25