Re: Using Polipo with Privoxy and /etc/hosts

Fabian Keil <[email protected]> Wed, 17 Jul 2013 11:54:37 +0200
Newsgroups gmane.comp.web.polipo.user
Message-ID <[email protected]>
[email protected] wrote:

> First time Polipo user.  I decided to integrate Polipo into my current
> setup, and have run into something I don't know how to solve.
> 
> Spec:
> 
> Debian 7 "Wheezy" (Stable) server on my home LAN, running Privoxy 3.0.19 
> & Polipo 1.0.4.1-1.2.  Upgrading any of the packages mentioned will not be
> contemplated, as it adds undue complexity and fragility.
> 
> Problem:
> 
> One of the things my Privoxy setup does is read from my /etc/hosts file on
> the server to perform a single important change for all the Macs using
> Privoxy:
> 
> [code]
> # Replace Yahoo! Search with DuckDuckGo
> 184.72.115.86   search.yahoo.com
> [/code]
> 
> This redirects all search queries from Yahoo! to DuckDuckGo.  This works
> just fine.

This does not result in Privoxy modifying the request headers, though.
It will only work for some servers.

> However, once I add Polipo into the chain, it breaks.  In the Privoxy config:
> 
> [code]
> forward / localhost:8123
> [/code]
> 
> So, this chains Privoxy to Polipo.  When this is active, all Yahoo!
> searches now go to Yahoo!, which is not what I want.
> 
> So, what's the simplest, least complex and most robust way to fix this? 

Let Privoxy rewrite the request headers instead of (mis)using
/etc/hosts for this:
http://www.privoxy.org/user-manual/actions-file.html#REDIRECT

> If someone could additionally explain why Polipo interferes with Privoxy's
> use of the /etc/host file in the first place, it'd be welcomed.

If Privoxy is chained to Polipo the DNS resolution for search.yahoo.com
is done by Polipo which defaults to not using libc for DNS resolution.

Fabian

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

_______________________________________________
Polipo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/polipo-users
signature.asc (application/pgp-signature, 196 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iEYEARECAAYFAlHmad0ACgkQBYqIVf93VJ3u0ACffW3N/wsV3spHmSI8Q6FqwJv+
nvIAoJhTD0JWCwPVuQyNUeoB0ZXEBjIa
=OSlR
-----END PGP SIGNATURE-----