cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: connecting to proxies without specifying remote host

From: eli <netloc_at_gmail.com>
Date: Tue, 1 May 2012 20:40:35 +0200

Hello Daniel, Edgard

Thank you for your responses.

In my situation I don't know ahead the protocol supported by the proxy.

"Proxy judge" is a term used to describe server that was built for the sole
purpose of proxy testing, such a judges return the headers of your
connection request.

I believe I have found a solution with curl, at least the first impression
I'm getting is that it works. Connecting to localhost via proxy will return
an HTML with errors if the proxy supports the specified protocol, and will
fail on handshake level if the protocol isn't supported.

Since its the localhost (of the proxy) the entire operation seem to be much
faster.

Kind regards,

On Tue, May 1, 2012 at 8:04 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Mon, 30 Apr 2012, eli wrote:
>
> I'm trying to test proxies using libcurl, and as it appears I'm forced to
>> go in (at least) 2 stages:
>>
>
> You mean you want to probe the proxies to check what protocol they
> support? It is very unusual that you know of a proxy but don't know what
> protocol to use with it...
>
>
> 1. Connect using SOCKS5 protocol, then SOCKS4, then HTTP in order to find
>> the type of the proxy
>>
>
> 2. Connect to proxy judge in order to find out the anonymity level of the
>> proxy
>>
>> As I understand I don't need to connect to the proxy judge (or any other
>> server for that sake) during the first stage.
>>
>
> "proxy judge" is not a term I'm aware of. Are you meaning the remote site
> that you access through the proxy? If so, I would expect that to be really
> sure of step (1) you better make sure you can reach a site properly.
>
>
> All is need is to connect to the proxy itself and see if handshake works
>> for SOCKS5/SOCKS4/HTTP. Is it possible with libcurl? Or is there a
>> workaround I'm not aware of?
>>
>
> libcurl is not a proxy probe software so no, it probably isn't ideal for
> that purpose.
>
> --
>
> / 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
Received on 2012-05-01