Re: libproxy as external dependency

On Sat, Oct 25, 2008 at 7:38 PM, Nathaniel McCallum
<nathaniel natemccallum com> wrote:
> Ali Sabil wrote:
>> 2008/10/24 Ross Burton <ross burtonini com <mailto:ross burtonini com>>
>>    On Fri, 2008-10-24 at 11:09 +0100, Rui Tiago Cação Matos wrote:
>>    > In this specific library case, since the API is so simple and you
>>    > don't know you need it until you somehow check your app's settings
>>    > it's a no-brainer really.
>>    You could lazy-load the library when you need to access a URL, but the
>>    point is that your app shouldn't have to know how to handle proxies or
>>    check settings: it just asks the library to handle them.
>> From what I understood, libproxy only allows your to know which proxy to
>> connect to for reaching a specific resource, not how to handle the proxy, as
>> you are supposed to handle them yourself.
> This is basically true.  There are three steps to initiating a connection to
> a host through a proxy.
> 1. Load proxy configuration
> 2. Evaluate proxy configuration (ex. WPAD, PAC and ignore lists)
> 3. Establish connection through the proxy
> libproxy covers #1 and #2.  #3 is protocol specific.  Since libproxy can't
> implement every protocol out there, it is up to your protocol layer to do
> step #3.  This is the job of, say, libsoup.  So, if your application uses
> libsoup, you shouldn't need to know anything about proxies.

Why is #3 protocol-specific? You want to connect to host:port, the
proxy configuration says you need to connect to host2:port2, so
somebody will need to create the socket, why not do it in libproxy?

There's also:
4. Do the actual proxified communication

Who is supposed to add the SOCKS 4/5 headers and HTTP proxy stuff? I
don't think libsoup (an HTTP library) is supposed to do that, since
other protocols will need to do the same (IRC, FTP, etc).

It sounds to me that it's the job of libproxy to handle the SOCKS stuff.

The current proposal sounds like a libproxy-conf, not libproxy.

Felipe Contreras

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]