> A second thing, I have successfully applied my tunneling patches to this
> version of polipo. Works perfectly - any chance to integrate this to
> polipo?

Yes, this is definitely a feature I want to include.

> +//

???

> +tunnelIsMatched(char *url, int lurl, char *hostname, int lhost)
> +{
> +  DomainPtr *domain, *domains;
> +
> +  domains=forbiddenTunnelsDomains;
> +  if (domains) {
> +    domain = domains;
> +    while(*domain) {
> +      if (memcmp(hostname, (*domain)->domain, (*domain)->length)==0)
> +     return 1;
> +      domain++;
> +    }
> +  }
> +  if(forbiddenTunnelsRegex) {
> +    if(!regexec(forbiddenTunnelsRegex, url, 0, NULL, 0))
> +      return 1;
> +  }
> +  return 0;
> +}

There's a buffer overflow in this function -- you need to test that
lurl >= domain->domain.

Oh, and please use four spaces for indenting.  If you're using Emacs, add
the following to your .emacs, and make sure to ``M-x polipo-c-mode''
whenever you visit my code:

    (defun polipo-c-mode ()
      "C mode adjust for Juliusz's silly taste."
      (interactive)
      (c-mode)
      (setq c-basic-offset 4))

(Yep, I use 4 spaces for C, but just 2 spaces for Lisp.)

The rest of the patch I oppose -- I don't think that keeping a list in
memory is a good way to implement logging.  It uselessly bloats Polipo and
uses extra memory even when people don't need this functionality.  Remember
that people are using Polipo on OpenWRT systems with 16MB of memory.

Please define a new log level, say LOG_TUNNEL, and log every tunnel using
do_log(LOG_TUNNEL, ...).  Grep for ``L_UNCACHABLE'' for an example.

Could you please add a patch to the texinfo manual?

Oh, and any chance you could send Darcs patches?  Trust me, you'll find it
*much* easier than working with diff/patch by hand.

                                        Juliusz

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Polipo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/polipo-users

Reply via email to