特殊:Badtitle/NS100:Privoxy

来自Ubuntu中文
Oneleaf留言 | 贡献2007年5月24日 (四) 15:16的版本 (新页面: {{From|https://help.ubuntu.com/community/Privoxy}} {{Languages|UbuntuHelp:Privoxy}} This howto explains how to get Privoxy going. Although the config file is 1075 lines, its worth noting ...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航跳到搜索

{{#ifexist: :Privoxy/zh | | {{#ifexist: Privoxy/zh | | {{#ifeq: {{#titleparts:Privoxy|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Privoxy|1|-1|}} | zh | | }}

This howto explains how to get Privoxy going. Although the config file is 1075 lines, its worth noting that 1022 of them are comments, and 38 are blank! (And we only edit 1!!)

Setting up privoxy

Here I'll try and explain how to setup Privoxy as a stand alone proxy on your pc, targeting ads and other junk. On this page I try and show how to set Privoxy to work with Polipo and Dnsmasq for caching and dns magic as well.

Privoxy. First step as ever is to install. Privoxy is in universe, so make sure it is enabled and run these in a terminal

sudo apt-get update
sudo apt-get install privoxy

Having installed privoxy, we need to edit the config file and make our half a dozen changes. To edit, run

sudo vi /etc/privoxy/config

and enter your password.

You can choose to read the ToC and the Introduction (and of course the descriptions of each option), but if you want to skip that and get to a working proxy, we will do some jumping in the config file


So lets jump to line 661, and see what the option here is - our listening IP address. well we know what we want, and in my case its this:

listen-address  192.168.0.1:8118

(Your ip will most likely be different). This is the IP address of the ethernet port the computer is running on. This can also be loopback (127.0.0.1) if you dont want to share your advert freeing proxy goodness :). The other part (after the ":") is the port number to listen on - this can be almost anything, but unless you need it moved, its probably best to leave it where it is.

Thats our big change here! save and exit the editor your using, then restart the daemon, and your finished.

sudo /etc/init.d/privoxy restart

Well, thats it!

You should now have a filtering proxy running on the IP and port you just specified. If you want Firefox or some other browser to run through it, you simply change the settings in the browsers configuration.

Firefox:

Open the browser, click Edit -> Preferences. Click the 'connection settings' button, and click on 'manual proxy configuration'. In the top field add the following:

HTTP Proxy:    192.168.0.1        Port:    8123

PS, if you go and set up Polipo as well, you will get caching to go with your new more-or-less ad free browsing.