curl-library
Re: no custom read() write() callbacks
Date: Mon, 18 Jan 2010 21:29:00 +0100
Hi,
>> curl -> curl socks support -> [socks proxy interface to be written but
>> considered overhead] -> libssh2
> Right, but it wasn't clear to my why you need to use libssh2 if all
> you want is socks5. You were speaking of "remote ssh-proxies" but SSH
> isn't proxied really.
Sorry about that, I just called it 'proxy' because I use it in a way I
use normal proxies ;)
> So even though I wouldn't mind adding such callbacks given a patch, I
> don't understand your use-case.
Use case: In some enviroments, for example universities some portes are
blocked or traffic is otherwise manipulated so its a good idea to tunnel
the traffic via remote shells. Maybe only certain pages are blocked so I
dont need a tunnel for my whole system but only for my little
application (that does basic HTTP) which access this blocked sites. This
would be a purpose to use libcurl with libssh2 callbacks.
I just caught a quick look at libcurl's source and I spotted probably
the spots a patch could be applied best:
Curl_read() prefered over Curl_read_plain() since it more highlevel and
also Curl_write() instead of send_plain() for the same reason.
Since we will use real callbacks for the data pushed on tcp session
(normal case) we dont need the internal socket anymore.
Therefore we must avoid setting it up und destroying it when using this
custom callbacks.
This would be my approach, any suggestions?
Regards,
Leon Winter
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-18