Hey!
I'm pretty new to polipo, but already quite fond of it. Very fast, and
uses almost no resources. It's also *much* better at caching than
firefox (which can sometimes decide it wants to rebuild some index and
sit there churning the disk for about half a minute), so it gave me an
excuse to turn off the firefox cache and just use polipo's instead.
My use case might be a bit unusual:
I own a laptop which sometimes has an open connection to the internet
and sometimes connects via the college proxy server (which requires a
username and password). So, all of my apps have their proxy set to
localhost, which then either proxies to the internet or forwards
upstream to the college proxy (there are some scripts to switch
between configs depending on network settings).
I previously used squid, but it's a bit big and unwieldy especially
for a low-powered laptop. Polipo fits the bill perfectly, except it
doesn't support adding authentication headers to tunneled connections,
which is a big deal for me as I don't want to type in my college
username and password whenever I need an SSL connection in college.
Also, my college username and password is rather valuable, and the
fewer apps I have to type it into, the better (this point may be moot
as it's just HTTP Basic authentication and can be trivially sniffed,
but anyway...).
So, here's a small patch against the 20080907 tarball of polipo to add
this functionality. It's been tested (by me) and hasn't crapped itself
(yet, anyway). So, any chance this could be merged in for the next
release of polipo?
--- polipo-20080907/tunnel.c 2008-09-07 22:21:20.000000000 +0100
+++ polipo-20080907-custom/tunnel.c 2009-04-02 00:51:24.000000000 +0100
@@ -246,11 +246,14 @@
goto fail;
}
- n = snnprintf(tunnel->buf1.buf, tunnel->buf1.tail,
- CHUNK_SIZE - tunnel->buf1.tail,
- "CONNECT %s:%d HTTP/1.1"
- "\r\n\r\n",
+ n = snnprintf(tunnel->buf1.buf, tunnel->buf1.tail, CHUNK_SIZE,
+ "CONNECT %s:%d HTTP/1.1",
tunnel->hostname->string, tunnel->port);
+ if (parentAuthCredentials){
+ n = buildServerAuthHeaders(tunnel->buf1.buf, n, CHUNK_SIZE,
parentAuthCredentials);
+ }
+ n = snnprintf(tunnel->buf1.buf, n, CHUNK_SIZE, "\r\n\r\n");
+
if(n < 0) {
message = "Buffer overflow";
goto fail;
Thanks,
Stephen Dolan
(please CC me at this address on any responses, I'm not on the mailinglist)
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Polipo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/polipo-users