Regenerate HTML docs with recent changes
[privoxy.git] / doc / webserver / faq / configuration.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5   <title>Configuration</title>
6   <meta name="GENERATOR" content=
7   "Modular DocBook HTML Stylesheet Version 1.79">
8   <link rel="HOME" title="Privoxy Frequently Asked Questions" href=
9   "index.html">
10   <link rel="PREVIOUS" title="Installation" href="installation.html">
11   <link rel="NEXT" title="Miscellaneous" href="misc.html">
12   <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
13   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
14 </head>
15 <body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink=
16 "#840084" alink="#0000FF">
17   <div class="NAVHEADER">
18     <table summary="Header navigation table" width="100%" border="0"
19     cellpadding="0" cellspacing="0">
20       <tr>
21         <th colspan="3" align="center">Privoxy Frequently Asked
22         Questions</th>
23       </tr>
24       <tr>
25         <td width="10%" align="left" valign="bottom"><a href=
26         "installation.html" accesskey="P">Prev</a></td>
27         <td width="80%" align="center" valign="bottom"></td>
28         <td width="10%" align="right" valign="bottom"><a href="misc.html"
29         accesskey="N">Next</a></td>
30       </tr>
31     </table>
32     <hr align="left" width="100%">
33   </div>
34   <div class="SECT1">
35     <h1 class="SECT1"><a name="CONFIGURATION" id="CONFIGURATION">3.
36     Configuration</a></h1>
37     <div class="SECT2">
38       <h3 class="SECT2"><a name="ACTIONSFILE" id="ACTIONSFILE">3.1. What
39       exactly is an <span class="QUOTE">"actions"</span> file?</a></h3>
40       <p><span class="APPLICATION">Privoxy</span> utilizes the concept of
41       <span class="QUOTE">" <a href=
42       "../user-manual/actions-file.html#ACTIONS" target=
43       "_top">actions</a>"</span> that are used to manipulate and control web
44       page data. <a href="../user-manual/actions-file.html" target=
45       "_top">Actions files</a> are where these <a href=
46       "../user-manual/actions-file.html#ACTIONS" target="_top">actions</a>
47       that <span class="APPLICATION">Privoxy</span> could take while
48       processing a certain request, are configured. Typically, you would
49       define a set of default actions that apply globally to all URLs, then
50       add exceptions to these defaults where needed. There is a wide array of
51       actions available that give the user a high degree of control and
52       flexibility on how to process each and every web page.</p>
53       <p>Actions can be defined on a <a href=
54       "../user-manual/actions-file.html#AF-PATTERNS" target="_top">URL
55       pattern</a> basis, i.e. for single URLs, whole web sites, groups or
56       parts thereof etc. Actions can also be grouped together and then
57       applied to requests matching one or more patterns. There are many
58       possible actions that might apply to any given site. As an example, if
59       you are blocking <a href="http://en.wikipedia.org/wiki/Browser_cookie"
60       target="_top">cookies</a> as one of your default actions, but need to
61       accept cookies from a given site, you would need to define an exception
62       for this site in one of your actions files, preferably in <tt class=
63       "FILENAME">user.action</tt>.</p>
64     </div>
65     <div class="SECT2">
66       <h3 class="SECT2"><a name="ACTIONSS" id="ACTIONSS">3.2. The
67       <span class="QUOTE">"actions"</span> concept confuses me. Please list
68       some of these <span class="QUOTE">"actions"</span>.</a></h3>
69       <p>For a comprehensive discussion of the actions concept, please refer
70       to the <a href="../user-manual/actions-file.html" target="_top">actions
71       file chapter</a> in the <a href="../user-manual/index.html" target=
72       "_top">User Manual</a>. It includes a <a href=
73       "../user-manual/actions-file.html#ACTIONS" target="_top">list of all
74       actions</a> and an <a href=
75       "../user-manual/actions-file.html#ACT-EXAMPLES" target="_top">actions
76       file tutorial</a> to get you started.</p>
77     </div>
78     <div class="SECT2">
79       <h3 class="SECT2"><a name="ACTCONFIG" id="ACTCONFIG">3.3. How are
80       actions files configured? What is the easiest way to do this?</a></h3>
81       <p>Actions files are just text files in a special syntax and can be
82       edited with a text editor. But probably the easiest way is to access
83       <span class="APPLICATION">Privoxy</span>'s user interface with your web
84       browser at <a href="http://config.privoxy.org/" target=
85       "_top">http://config.privoxy.org/</a> (Shortcut: <a href="http://p.p/"
86       target="_top">http://p.p/</a>) and then select <span class=
87       "QUOTE">"<a href="http://config.privoxy.org/show-status" target=
88       "_top">View &amp; change the current configuration</a>"</span> from the
89       menu. Note that this feature must be explicitly enabled in the main
90       config file (see <a href=
91       "../user-manual/config.html#ENABLE-EDIT-ACTIONS" target=
92       "_top">enable-edit-actions</a>).</p>
93     </div>
94     <div class="SECT2">
95       <h3 class="SECT2"><a name="AEN418" id="AEN418">3.4. There are several
96       different <span class="QUOTE">"actions"</span> files. What are the
97       differences?</a></h3>
98       <p>Please have a look at the <a href="../user-manual/actions-file.html"
99       target="_top">the actions chapter</a> in the <a href=
100       "../user-manual/index.html" target="_top">User Manual</a> for a
101       detailed explanation.</p>
102     </div>
103     <div class="SECT2">
104       <h3 class="SECT2"><a name="GETUPDATES" id="GETUPDATES">3.5. Where can I
105       get updated Actions Files?</a></h3>
106       <p>Based on your feedback and the continuing development, updates of
107       <tt class="FILENAME">default.action</tt> will be made available from
108       time to time on the <a href=
109       "https://sourceforge.net/project/showfiles.php?group_id=11118" target=
110       "_top">files section</a> of our <a href=
111       "https://sourceforge.net/projects/ijbswa/" target="_top">project
112       page</a>.</p>
113       <p>If you wish to receive an email notification whenever we release
114       updates of <span class="APPLICATION">Privoxy</span> or the actions
115       file, <a href=
116       "https://lists.privoxy.org/mailman/listinfo/privoxy-announce" target=
117       "_top">subscribe to our announce mailing list</a>,
118       privoxy-announce@lists.privoxy.org.</p>
119     </div>
120     <div class="SECT2">
121       <h3 class="SECT2"><a name="NEWCONFIG" id="NEWCONFIG">3.6. Can I use my
122       old config files?</a></h3>
123       <p>The syntax and purpose of configuration files has remained roughly
124       the same throughout the 3.x series, but backwards compatibility is not
125       guaranteed. Also each release contains updated, <span class=
126       "QUOTE">"improved"</span> versions and it is therefore strongly
127       recommended to install the newer configuration files and merge back
128       your modifications.</p>
129     </div>
130     <div class="SECT2">
131       <h3 class="SECT2"><a name="DIFFICULT" id="DIFFICULT">3.7. Why is the
132       configuration so complicated?</a></h3>
133       <p><span class="QUOTE">"Complicated"</span> is in the eye of the
134       beholder.</p>
135       <p>Privoxy is currently mainly written by and for people who are
136       already familiar with the underlying concepts like regular expressions,
137       HTTP and HTML, or are willing to become familiar with them to be able
138       to get the most out of a powerful and flexible tool such as
139       Privoxy.</p>
140       <p>While everybody is expected to be able to get a Privoxy default
141       installation up and running, fine-tuning requires a certain amount of
142       background information and Privoxy's documentation mainly concentrates
143       on the Privoxy-specific parts while only providing references to the
144       rest.</p>
145       <p>If you or anyone you know has the skills, time and energy to reduce
146       the barrier of entry, please <a href="general.html#PARTICIPATE">get
147       involved</a>.</p>
148     </div>
149     <div class="SECT2">
150       <h3 class="SECT2"><a name="YAHOO" id="YAHOO">3.8. How can I make my
151       Yahoo/Hotmail/Gmail account work?</a></h3>
152       <p>The default configuration shouldn't impact the usability of any of
153       these services. It may, however, make all <a href=
154       "http://en.wikipedia.org/wiki/Browser_cookie" target="_top">cookies</a>
155       temporary, so that your browser will forget your login credentials in
156       between browser sessions. If you would like not to have to log in
157       manually each time you access those websites, simply turn off all
158       cookie handling for them in the <tt class="FILENAME">user.action</tt>
159       file. An example for yahoo might look like:</p>
160       <table border="0" bgcolor="#E0E0E0" width="100%">
161         <tr>
162           <td>
163             <pre class="SCREEN"># Allow all cookies for Yahoo login:
164 #
165 { -<a href="../user-manual/actions-file.html#CRUNCH-INCOMING-COOKIES" target=
166 "_top">crunch-incoming-cookies</a> -<a href=
167 "../user-manual/actions-file.html#CRUNCH-OUTGOING-COOKIES" target=
168 "_top">crunch-outgoing-cookies</a> -<a href=
169 "../user-manual/actions-file.html#SESSION-COOKIES-ONLY" target=
170 "_top">session-cookies-only</a> }
171 .login.yahoo.com</pre>
172           </td>
173         </tr>
174       </table>
175       <p>These kinds of sites are often quite complex and heavy with <a href=
176       "http://en.wikipedia.org/wiki/Javascript" target="_top">Javascript</a>
177       and thus <span class="QUOTE">"fragile"</span>. So if <span class=
178       "emphasis"><i class="EMPHASIS">still</i></span> a problem, we have an
179       <a href="../user-manual/actions-file.html#ALIASES" target=
180       "_top">alias</a> just for such sticky situations:</p>
181       <table border="0" bgcolor="#E0E0E0" width="100%">
182         <tr>
183           <td>
184             <pre class="SCREEN"># Gmail is a _fragile_ site:
185 #
186 { <tt class="LITERAL">fragile</tt> }
187  # Gmail is ...
188  mail.google.com</pre>
189           </td>
190         </tr>
191       </table>
192       <p>Be sure to flush your browser's caches whenever making these kinds
193       of changes, just to make sure the changes <span class=
194       "QUOTE">"take"</span>.</p>
195       <p>Make sure the domain, host and path are appropriate as well. Your
196       browser can tell you where you are specifically and you should use that
197       information for your configuration settings. Note that above it is not
198       referenced as <tt class="LITERAL">gmail.com</tt>, which is a valid
199       domain name.</p>
200     </div>
201     <div class="SECT2">
202       <h3 class="SECT2"><a name="CONFIGFILES" id="CONFIGFILES">3.9. What's
203       the difference between the <span class="QUOTE">"Cautious"</span>,
204       <span class="QUOTE">"Medium"</span> and <span class=
205       "QUOTE">"Advanced"</span> defaults?</a></h3>
206       <p>Configuring <span class="APPLICATION">Privoxy</span> is not entirely
207       trivial. To help you get started, we provide you with three different
208       default action <span class="QUOTE">"profiles"</span> in the web based
209       actions file editor at <a href="http://config.privoxy.org/show-status"
210       target="_top">http://config.privoxy.org/show-status</a>. See the
211       <a href="../user-manual/actions-file.html" target="_top"><i class=
212       "CITETITLE">User Manual</i></a> for a list of actions, and how the
213       default profiles are set.</p>
214       <p>Where the defaults are likely to break some sites, exceptions for
215       known popular <span class="QUOTE">"problem"</span> sites are included,
216       but in general, the more aggressive your default settings are, the more
217       exceptions you will have to make later. New users are best to start off
218       in <span class="QUOTE">"Cautious"</span> setting. This is safest and
219       will have the fewest problems. See the <a href=
220       "../user-manual/index.html" target="_top"><i class="CITETITLE">User
221       Manual</i></a> for a more detailed discussion.</p>
222       <p>It should be noted that the <span class="QUOTE">"Advanced"</span>
223       profile (formerly known as the <span class=
224       "QUOTE">"Adventuresome"</span> profile) is more aggressive, and will
225       make use of some of <span class="APPLICATION">Privoxy's</span> advanced
226       features. Use at your own risk!</p>
227     </div>
228     <div class="SECT2">
229       <h3 class="SECT2"><a name="BROWSECONFIG" id="BROWSECONFIG">3.10. Why
230       can I change the configuration with a browser? Does that not raise
231       security issues?</a></h3>
232       <p>It may seem strange that regular users can edit the config files
233       with their browsers, although the whole <tt class=
234       "FILENAME">/etc/privoxy</tt> hierarchy belongs to the user <span class=
235       "QUOTE">"privoxy"</span>, with only 644 permissions.</p>
236       <p>When you use the browser-based editor, <span class=
237       "APPLICATION">Privoxy</span> itself is writing to the config files.
238       Because <span class="APPLICATION">Privoxy</span> is running as the user
239       <span class="QUOTE">"privoxy"</span>, it can update its own config
240       files.</p>
241       <p>If you run <span class="APPLICATION">Privoxy</span> for multiple
242       untrusted users (e.g. in a LAN) or aren't entirely in control of your
243       own browser, you will probably want to make sure that the web-based
244       editor and remote toggle features are <span class="QUOTE">"off"</span>
245       by setting <span class="QUOTE">"<tt class="LITERAL"><a href=
246       "../user-manual/config.html#ENABLE-EDIT-ACTIONS" target=
247       "_top">enable-edit-actions</a> 0</tt>"</span> and <span class=
248       "QUOTE">"<tt class="LITERAL"><a href=
249       "../user-manual/config.html#ENABLE-REMOTE-TOGGLE" target=
250       "_top">enable-remote-toggle</a> 0</tt>"</span> in the <a href=
251       "../user-manual/config.html" target="_top">main configuration
252       file</a>.</p>
253       <p>As of <span class="APPLICATION">Privoxy</span> 3.0.7 these options
254       are disabled by default.</p>
255     </div>
256     <div class="SECT2">
257       <h3 class="SECT2"><a name="FILTERFILE" id="FILTERFILE">3.11. What is
258       the <tt class="FILENAME">default.filter</tt> file? What is a
259       <span class="QUOTE">"filter"</span>?</a></h3>
260       <p>The <a href="../user-manual/filter-file.html" target=
261       "_top"><tt class="FILENAME">default.filter</tt></a> file is where
262       <span class="emphasis"><i class="EMPHASIS">filters</i></span> as
263       supplied by the developers are defined. Filters are a special subset of
264       actions that can be used to modify or remove web page content or
265       headers on the fly. Content filters can be applied to <span class=
266       "emphasis"><i class="EMPHASIS">anything</i></span> in the page source,
267       header filters can be applied to either server or client headers.
268       Regular expressions are used to accomplish this.</p>
269       <p>There are a number of pre-defined filters to deal with common
270       annoyances. The filters are only defined here, to invoke them, you need
271       to use the <a href="../user-manual/actions-file.html#FILTER" target=
272       "_top"><tt class="LITERAL">filter</tt> action</a> in one of the actions
273       files. Content filtering is automatically disabled for inappropriate
274       MIME types, but if you know better than Privoxy what should or should
275       not be filtered you can filter any content you like.</p>
276       <p>Filters should <span class="emphasis"><i class=
277       "EMPHASIS">not</i></span> be confused with <a href=
278       "../user-manual/actions-file.html#BLOCK" target="_top"><tt class=
279       "LITERAL">blocks</tt></a>, which is a completely different action, and
280       is more typically used to block ads and unwanted sites.</p>
281       <p>If you are familiar with regular expressions, and HTML, you can look
282       at the provided <tt class="FILENAME">default.filter</tt> with a text
283       editor and define your own filters. This is potentially a very powerful
284       feature, but requires some expertise in both regular expressions and
285       HTML/HTTP. You should place any modifications to the default filters,
286       or any new ones you create in a separate file, such as <tt class=
287       "FILENAME">user.filter</tt>, so they won't be overwritten during
288       upgrades. The ability to define multiple filter files in <tt class=
289       "FILENAME">config</tt> is a new feature as of v. 3.0.5.</p>
290       <p>There is no GUI editor option for this part of the configuration,
291       but you can disable/enable the various pre-defined filters of the
292       included <tt class="FILENAME">default.filter</tt> file with the
293       <a href="http://config.privoxy.org/show-status" target="_top">web-based
294       actions file editor</a>. Note that the custom actions editor must be
295       explicitly enabled in the main config file (see <a href=
296       "../user-manual/config.html#ENABLE-EDIT-ACTIONS" target=
297       "_top">enable-edit-actions</a>).</p>
298       <p>If you intend to develop your own filters, you might want to have a
299       look at <a href="https://www.fabiankeil.de/sourcecode/pft/" target=
300       "_top">Privoxy-Filter-Test</a>.</p>
301     </div>
302     <div class="SECT2">
303       <h3 class="SECT2"><a name="LANCONFIG" id="LANCONFIG">3.12. How can I
304       set up Privoxy to act as a proxy for my LAN?</a></h3>
305       <p>By default, <span class="APPLICATION">Privoxy</span> only responds
306       to requests from <tt class="LITERAL">127.0.0.1</tt> (localhost). To
307       have it act as a server for a network, this needs to be changed in the
308       <a href="../user-manual/config.html" target="_top">main configuration
309       file</a>. Look for the <tt class="LITERAL"><a href=
310       "../user-manual/config.html#LISTEN-ADDRESS" target=
311       "_top">listen-address</a></tt> option, which may be commented out with
312       a <span class="QUOTE">"#"</span> symbol. Make sure it is uncommented,
313       and assign it the address of the LAN gateway interface, and port number
314       to use. Assuming your LAN address is 192.168.1.1 and you wish to run
315       <span class="APPLICATION">Privoxy</span> on port 8118, this line should
316       look like:</p>
317       <table border="0" bgcolor="#E0E0E0" width="100%">
318         <tr>
319           <td>
320             <pre class="SCREEN">  listen-address  192.168.1.1:8118</pre>
321           </td>
322         </tr>
323       </table>
324       <p>Save the file, and restart <span class="APPLICATION">Privoxy</span>.
325       Configure all browsers on the network then to use this address and port
326       number.</p>
327       <p>Alternately, you can have <span class="APPLICATION">Privoxy</span>
328       listen on all available interfaces:</p>
329       <table border="0" bgcolor="#E0E0E0" width="100%">
330         <tr>
331           <td>
332             <pre class="SCREEN">  listen-address    :8118</pre>
333           </td>
334         </tr>
335       </table>
336       <p>And then use <span class="APPLICATION">Privoxy's</span> <a href=
337       "../user-manual/config.html#PERMIT-ACCESS" target=
338       "_top">permit-access</a> feature to limit connections. A firewall in
339       this situation is recommended as well.</p>
340       <p>The above steps should be the same for any TCP network, regardless
341       of operating system.</p>
342       <p>If you run <span class="APPLICATION">Privoxy</span> on a LAN with
343       untrusted users, we recommend that you double-check the <a href=
344       "../user-manual/config.html#ACCESS-CONTROL" target="_top">access
345       control and security</a> options!</p>
346     </div>
347     <div class="SECT2">
348       <h3 class="SECT2"><a name="NOSEEUM" id="NOSEEUM">3.13. Instead of ads,
349       now I get a checkerboard pattern. I don't want to see
350       anything.</a></h3>
351       <p>The replacement for blocked images can be controlled with the
352       <a href="../user-manual/actions-file.html#SET-IMAGE-BLOCKER" target=
353       "_top"><tt class="LITERAL">set-image-blocker</tt> action</a>. You have
354       the choice of a checkerboard pattern, a transparent 1x1 GIF image (aka
355       <span class="QUOTE">"blank"</span>), or a redirect to a custom image of
356       your choice. Note that this choice only has effect for images which are
357       blocked as images, i.e. whose URLs match both a <tt class=
358       "LITERAL"><a href="../user-manual/actions-file.html#HANDLE-AS-IMAGE"
359       target="_top">handle-as-image</a></tt> <span class="emphasis"><i class=
360       "EMPHASIS">and</i></span> <tt class="LITERAL"><a href=
361       "../user-manual/actions-file.html#BLOCK" target="_top">block</a></tt>
362       action.</p>
363       <p>If you want to see nothing, then change the <a href=
364       "../user-manual/actions-file.html#SET-IMAGE-BLOCKER" target=
365       "_top"><tt class="LITERAL">set-image-blocker</tt> action</a> to
366       <span class="QUOTE">"blank"</span>. This can be done by editing the
367       <tt class="FILENAME">user.action</tt> file, or through the <a href=
368       "http://config.privoxy.org/show-status" target="_top">web-based actions
369       file editor</a>.</p>
370     </div>
371     <div class="SECT2">
372       <h3 class="SECT2"><a name="WHYSEEUM" id="WHYSEEUM">3.14. Why would
373       anybody want to see a checkerboard pattern?</a></h3>
374       <p>Remember that <a href="general.html#WHATSANAD">telling which image
375       is an ad and which isn't</a>, is an educated guess. While we hope that
376       the standard configuration is rather smart, it will make occasional
377       mistakes. The checkerboard image is visually decent, and it shows you
378       where images have been blocked, which can be very helpful in case some
379       navigation aid or otherwise innocent image was erroneously blocked. It
380       is recommended for new users so they can <span class=
381       "QUOTE">"see"</span> what is happening. Some people might also enjoy
382       seeing how many banners they <span class="emphasis"><i class=
383       "EMPHASIS">don't</i></span> have to see.</p>
384     </div>
385     <div class="SECT2">
386       <h3 class="SECT2"><a name="BLOCKEDBYTEXT" id="BLOCKEDBYTEXT">3.15. I
387       see some images being replaced with text instead of the checkerboard
388       image. Why and how do I get rid of this?</a></h3>
389       <p>This happens when the banners are not embedded in the HTML code of
390       the page itself, but in separate HTML (sub)documents that are loaded
391       into (i)frames or (i)layers, and these external HTML documents are
392       blocked. Being non-images they get replaced by a substitute HTML page
393       rather than a substitute image, which wouldn't work out technically,
394       since the browser expects and accepts only HTML when it has requested
395       an HTML document.</p>
396       <p>The substitute page adapts to the available space and shows itself
397       as a miniature two-liner if loaded into small frames, or full-blown
398       with a large red "BLOCKED" banner if space allows.</p>
399       <p>If you prefer the banners to be blocked by images, you must see to
400       it that the HTML documents in which they are embedded are not blocked.
401       Clicking the <span class="QUOTE">"See why"</span> link offered in the
402       substitute page will show you which rule blocked the page. After
403       changing the rule and un-blocking the HTML documents, the browser will
404       try to load the actual banner images and the usual image blocking will
405       (hopefully!) kick in.</p>
406     </div>
407     <div class="SECT2">
408       <h3 class="SECT2"><a name="SRVANY" id="SRVANY">3.16. Can Privoxy run as
409       a service on Win2K/NT/XP?</a></h3>
410       <p>Yes. Version 3.0.5 introduces full <span class=
411       "APPLICATION">Windows</span> service functionality. See <a href=
412       "../user-manual/installation.html#installation-pack-win" target=
413       "_top">the <i class="CITETITLE">User Manual</i></a> for details on how
414       to install and configure <span class="APPLICATION">Privoxy</span> as a
415       service.</p>
416       <p>Earlier 3.x versions could run as a system service using <b class=
417       "COMMAND">srvany.exe</b>. See the discussion at <a href=
418       "https://sourceforge.net/tracker/?func=detail&amp;atid=361118&amp;aid=485617&amp;group_id=11118"
419       target=
420       "_top">https://sourceforge.net/tracker/?func=detail&amp;atid=361118&amp;aid=485617&amp;group_id=11118</a>,
421       for details, and a sample configuration.</p>
422     </div>
423     <div class="SECT2">
424       <h3 class="SECT2"><a name="OTHERPROXY" id="OTHERPROXY">3.17. How can I
425       make Privoxy work with other proxies?</a></h3>
426       <p>This can be done and is often useful to combine the benefits of
427       <span class="APPLICATION">Privoxy</span> with those of a another proxy,
428       for example to cache content. See the <a href=
429       "../user-manual/config.html#FORWARDING" target="_top">forwarding
430       chapter</a> in the <a href="../user-manual/index.html" target=
431       "_top">User Manual</a> which describes how to do this. If you intend to
432       use Privoxy with Tor, please also have a look at <a href=
433       "misc.html#TOR">How do I use Privoxy together with Tor</a>.</p>
434     </div>
435     <div class="SECT2">
436       <h3 class="SECT2"><a name="PORT-80" id="PORT-80">3.18. Can I just set
437       Privoxy to use port 80 and thus avoid individual browser
438       configuration?</a></h3>
439       <p>No, its more complicated than that. This only works with special
440       kinds of proxies known as <span class="QUOTE">"intercepting"</span>
441       proxies (<a href="configuration.html#INTERCEPTING">see below</a>).</p>
442     </div>
443     <div class="SECT2">
444       <h3 class="SECT2"><a name="TRANSPARENT" id="TRANSPARENT">3.19. Can
445       Privoxy run as a <span class="QUOTE">"transparent"</span>
446       proxy?</a></h3>
447       <p>The whole idea of Privoxy is to modify client requests and server
448       responses in all sorts of ways and therefore it's not a transparent
449       proxy as described in <a href="http://tools.ietf.org/html/rfc2616"
450       target="_top">RFC 2616</a>.</p>
451       <p>However, some people say <span class="QUOTE">"transparent
452       proxy"</span> when they mean <span class="QUOTE">"intercepting
453       proxy"</span>. If you are one of them, please read the <a href=
454       "configuration.html#INTERCEPTING">next entry</a>.</p>
455     </div>
456     <div class="SECT2">
457       <h3 class="SECT2"><a name="INTERCEPTING" id="INTERCEPTING">3.20. Can
458       Privoxy run as a <span class="QUOTE">"intercepting"</span>
459       proxy?</a></h3>
460       <p><span class="APPLICATION">Privoxy</span> can't intercept traffic
461       itself, but it can handle requests that where intercepted and
462       redirected with a packet filter (like <span class=
463       "APPLICATION">PF</span> or <span class="APPLICATION">iptables</span>),
464       as long as the <tt class="LITERAL">Host</tt> header is present.</p>
465       <p>As the <tt class="LITERAL">Host</tt> header is required by HTTP/1.1
466       and as most web sites rely on it anyway, this limitation shouldn't be a
467       problem.</p>
468       <p>Please refer to your packet filter's documentation to learn how to
469       intercept and redirect traffic into <span class=
470       "APPLICATION">Privoxy</span>. Afterward you just have to configure
471       <span class="APPLICATION">Privoxy</span> to <a href=
472       "../user-manual/config.html#ACCEPT-INTERCEPTED-REQUESTS" target=
473       "_top">accept intercepted requests</a>.</p>
474     </div>
475     <div class="SECT2">
476       <h3 class="SECT2"><a name="OUTLOOK" id="OUTLOOK">3.21. How can I
477       configure Privoxy for use with Outlook?</a></h3>
478       <p>Versions of <span class="APPLICATION">Outlook</span> prior to Office
479       2007, use <span class="APPLICATION">Internet Explorer</span> components
480       to both render HTML, and fetch any HTTP requests that may be embedded
481       in an HTML email. So however you have <span class=
482       "APPLICATION">Privoxy</span> configured to work with IE, this
483       configuration should automatically be shared, at least with older
484       version of Internet Explorer.</p>
485       <p>Starting with Office 2007, Microsoft is instead using the MS-Word
486       rendering engine with Outlook. It is unknown whether this can be
487       configured to use a proxy.</p>
488     </div>
489     <div class="SECT2">
490       <h3 class="SECT2"><a name="OUTLOOK-MORE" id="OUTLOOK-MORE">3.22. How
491       can I have separate rules just for HTML mail?</a></h3>
492       <p>The short answer is, you can't. <span class=
493       "APPLICATION">Privoxy</span> has no way of knowing which particular
494       application makes a request, so there is no way to distinguish between
495       web pages and HTML mail. <span class="APPLICATION">Privoxy</span> just
496       blindly proxies all requests. In the case of <span class=
497       "APPLICATION">Outlook Express</span> (see above), OE uses IE anyway,
498       and there is no way for <span class="APPLICATION">Privoxy</span> to
499       ever be able to distinguish between them (nor could any other proxy
500       type application for that matter).</p>
501       <p>For a good discussion of some of the issues involved (including
502       privacy and security issues), see <a href=
503       "https://sourceforge.net/tracker/?func=detail&amp;atid=211118&amp;aid=629518&amp;group_id=11118"
504       target=
505       "_top">https://sourceforge.net/tracker/?func=detail&amp;atid=211118&amp;aid=629518&amp;group_id=11118</a>.</p>
506     </div>
507     <div class="SECT2">
508       <h3 class="SECT2"><a name="SNEAKY-COOKIES" id="SNEAKY-COOKIES">3.23. I
509       sometimes notice cookies sneaking through. How?</a></h3>
510       <p><a href="http://en.wikipedia.org/wiki/Browser_cookie" target=
511       "_top">Cookies</a> can be set in several ways. The classic method is
512       via the <tt class="LITERAL">Set-Cookie</tt> HTTP header. This is
513       straightforward, and an easy one to manipulate, such as the
514       <span class="APPLICATION">Privoxy</span> concept of <a href=
515       "../user-manual/actions-file.html#SESSION-COOKIES-ONLY" target=
516       "_top">session-cookies-only</a>. There is also the possibility of using
517       <a href="http://en.wikipedia.org/wiki/Javascript" target=
518       "_top">Javascript</a> to set cookies (<span class=
519       "APPLICATION">Privoxy</span> calls these <tt class=
520       "LITERAL">content-cookies</tt>). This is trickier because the syntax
521       can vary widely, and thus requires a certain amount of guesswork. It is
522       not realistic to catch all of these short of disabling Javascript,
523       which would break many sites. And lastly, if the cookies are embedded
524       in a HTTPS/SSL secure session via Javascript, they are beyond
525       <span class="APPLICATION">Privoxy's</span> reach.</p>
526       <p>All in all, <span class="APPLICATION">Privoxy</span> can help manage
527       cookies in general, can help minimize the loss of privacy posed by
528       cookies, but can't realistically stop all cookies.</p>
529     </div>
530     <div class="SECT2">
531       <h3 class="SECT2"><a name="EVIL-COOKIES" id="EVIL-COOKIES">3.24. Are
532       all cookies bad? Why?</a></h3>
533       <p>No, in fact there are many beneficial uses of <a href=
534       "http://en.wikipedia.org/wiki/Browser_cookie" target=
535       "_top">cookies</a>. Cookies are just a method that browsers can use to
536       store data between pages, or between browser sessions. Sometimes there
537       is a good reason for this, and the user's life is a bit easier as a
538       result. But there is a long history of some websites taking advantage
539       of this layer of trust, and using the data they glean from you and your
540       browsing habits for their own purposes, and maybe to your potential
541       detriment. Such sites are using you and storing their data on your
542       system. That is why the privacy conscious watch from whom those cookies
543       come, and why they really <span class="emphasis"><i class=
544       "EMPHASIS">need</i></span> to be there.</p>
545       <p>See the <a href="http://en.wikipedia.org/wiki/Browser_cookie"
546       target="_top">Wikipedia cookie definition</a> for more.</p>
547     </div>
548     <div class="SECT2">
549       <h3 class="SECT2"><a name="ALLOW-COOKIES" id="ALLOW-COOKIES">3.25. How
550       can I allow permanent cookies for my trusted sites?</a></h3>
551       <p>There are several actions that relate to cookies. The default
552       behavior is to allow only <span class="QUOTE">"session cookies"</span>,
553       which means the cookies only last for the current browser session. This
554       eliminates most kinds of abuse related to cookies. But there may be
555       cases where you want cookies to last.</p>
556       <p>To disable all cookie actions, so that cookies are allowed
557       unrestricted, both in and out, for <tt class=
558       "LITERAL">example.com</tt>:</p>
559       <table border="0" bgcolor="#E0E0E0" width="100%">
560         <tr>
561           <td>
562             <pre class="SCREEN">
563             { -crunch-incoming-cookies -crunch-outgoing-cookies -session-cookies-only -filter{content-cookies} }
564   .example.com</pre>
565           </td>
566         </tr>
567       </table>
568       <p>Place the above in <tt class="FILENAME">user.action</tt>. Note that
569       some of these may be off by default anyway, so this might be redundant,
570       but there is no harm being explicit in what you want to happen.
571       <tt class="FILENAME">user.action</tt> includes an alias for this
572       situation, called <tt class="LITERAL">allow-all-cookies</tt>.</p>
573     </div>
574     <div class="SECT2">
575       <h3 class="SECT2"><a name="MULTIPLES" id="MULTIPLES">3.26. Can I have
576       separate configurations for different users?</a></h3>
577       <p>Each instance of <span class="APPLICATION">Privoxy</span> has its
578       own configuration, including such attributes as the TCP port that it
579       listens on. What you can do is run multiple instances of <span class=
580       "APPLICATION">Privoxy</span>, each with a unique <a href=
581       "../user-manual/config.html#LISTEN-ADDRESS" target=
582       "_top">listen-address</a> configuration setting, and configuration
583       path, and then each of these can have their own configurations. Think
584       of it as per-port configuration.</p>
585       <p>Simple enough for a few users, but for large installations, consider
586       having groups of users that might share like configurations.</p>
587     </div>
588     <div class="SECT2">
589       <h3 class="SECT2"><a name="WHITELISTS" id="WHITELISTS">3.27. Can I
590       set-up Privoxy as a whitelist of <span class="QUOTE">"good"</span>
591       sites?</a></h3>
592       <p>Sure. There are a couple of things you can do for simple
593       white-listing. Here's one real easy one:</p>
594       <table border="0" bgcolor="#E0E0E0" width="100%">
595         <tr>
596           <td>
597             <pre class="SCREEN">
598             ############################################################
599  # Blacklist
600  ############################################################
601  { <a href="../user-manual/actions-file.html#BLOCK" target=
602 "_top">+block</a> }
603  / # Block *all* URLs
604
605  ############################################################
606  # Whitelist
607  ############################################################
608  { <a href="../user-manual/actions-file.html#BLOCK" target=
609 "_top">-block</a> }
610   kids.example.com
611   toys.example.com
612   games.example.com</pre>
613           </td>
614         </tr>
615       </table>
616       <p>This allows access to only those three sites by first blocking all
617       URLs, and then subsequently allowing three specific exceptions.</p>
618       <p>Another approach is <span class="APPLICATION">Privoxy's</span>
619       <tt class="LITERAL">trustfile</tt> concept, which incorporates the
620       notion of <span class="QUOTE">"trusted referrers"</span>. See the
621       <a href="../user-manual/config.html#TRUSTFILE" target="_top">Trust
622       documentation</a> for details.</p>
623       <p>These are fairly simple approaches and are not completely foolproof.
624       There are various other configuration options that should be disabled
625       (described elsewhere here and in <a href="../user-manual/" target=
626       "_top">the User Manual</a>) so that users can't modify their own
627       configuration and easily circumvent the whitelist.</p>
628     </div>
629     <div class="SECT2">
630       <h3 class="SECT2"><a name="NO-ADBLOCK" id="NO-ADBLOCK">3.28. How can I
631       turn off ad-blocking?</a></h3>
632       <p>Ad blocking is achieved through a complex application of various
633       <span class="APPLICATION">Privoxy</span> <a href=
634       "../user-manual/actions-file.html" target="_top">actions</a>. These
635       actions are deployed against simple images, banners, flash animations,
636       text pages, JavaScript, pop-ups and pop-unders, etc., so its not as
637       simple as just turning one or two actions off. The various actions that
638       make up <span class="APPLICATION">Privoxy</span> ad blocking are
639       hard-coded into the default configuration files. It has been assumed
640       that everyone using <span class="APPLICATION">Privoxy</span> is
641       interested in this particular feature.</p>
642       <p>If you want to do without this, there are several approaches you can
643       take: You can manually undo the many block rules in <tt class=
644       "FILENAME">default.action</tt>. Or even easier, just create your own
645       <tt class="FILENAME">default.action</tt> file from scratch without the
646       many ad blocking rules, and corresponding exceptions. Or lastly, if you
647       are not concerned about the additional blocks that are done for privacy
648       reasons, you can very easily over-ride <span class="emphasis"><i class=
649       "EMPHASIS">all</i></span> blocking with the following very simple rule
650       in your <tt class="FILENAME">user.action</tt>:</p>
651       <table border="0" bgcolor="#E0E0E0" width="100%">
652         <tr>
653           <td>
654             <pre class="SCREEN"> # Unblock everybody, everywhere
655  { <a href="../user-manual/actions-file.html#BLOCK" target=
656 "_top">-block</a> }
657  / # UN-Block *all* URLs</pre>
658           </td>
659         </tr>
660       </table>
661       <p>Or even a more comprehensive reversing of various ad related
662       actions:</p>
663       <table border="0" bgcolor="#E0E0E0" width="100%">
664         <tr>
665           <td>
666             <pre class="SCREEN">
667             # Unblock everybody, everywhere, and turn off appropriate filtering, etc
668  { <a href="../user-manual/actions-file.html#BLOCK" target=
669 "_top">-block</a> \
670   <a href="../user-manual/actions-file.html#FILTER-BANNERS-BY-SIZE" target=
671 "_top">-filter{banners-by-size}</a> \
672   <a href="../user-manual/actions-file.html#FILTER-BANNERS-BY-LINK" target=
673 "_top">-filter{banners-by-link}</a> \
674   <tt class="LITERAL">allow-popups</tt> \
675  }
676  / # UN-Block *all* URLs and allow ads</pre>
677           </td>
678         </tr>
679       </table>
680       <p>This last <span class="QUOTE">"action"</span> in this compound
681       statement, <tt class="LITERAL">allow-popups</tt>, is an <a href=
682       "../user-manual/actions-file.html#ALIASES" target="_top">alias</a> that
683       disables various pop-up blocking features.</p>
684     </div>
685     <div class="SECT2">
686       <h3 class="SECT2"><a name="TEMPLATES" id="TEMPLATES">3.29. How can I
687       have custom template pages, like the <span class="emphasis"><i class=
688       "EMPHASIS">BLOCKED</i></span> page?</a></h3>
689       <p><span class="APPLICATION">Privoxy</span> <span class=
690       "QUOTE">"templates"</span> are specialized text files utilized by
691       <span class="APPLICATION">Privoxy</span> for various purposes and can
692       easily be modified using any text editor. All the template pages are
693       installed in a sub-directory appropriately named: <tt class=
694       "FILENAME">templates</tt>. Knowing something about HTML syntax will of
695       course be helpful.</p>
696       <p>Be forewarned that the default templates are subject to being
697       overwritten during upgrades. You can, however, create completely new
698       templates, place them in another directory and specify the alternate
699       path in the main <tt class="FILENAME">config</tt>. For details, have a
700       look at the <a href="../user-manual/config.html#templdir" target=
701       "_top">templdir</a> option.</p>
702     </div>
703     <div class="SECT2">
704       <h3 class="SECT2"><a name="BLOCKALL" id="BLOCKALL">3.30. How can I
705       remove the <span class="QUOTE">"Go There Anyway"</span> link from the
706       <span class="emphasis"><i class="EMPHASIS">BLOCKED</i></span>
707       page?</a></h3>
708       <p>There is more than one way to do it (although Perl is not
709       involved).</p>
710       <p>Editing the BLOCKED template page (see above) may dissuade some
711       users, but this method is easily circumvented. Where you need this
712       level of control, you might want to build <span class=
713       "APPLICATION">Privoxy</span> from source, and disable various features
714       that are available as compile-time options. You should <b class=
715       "COMMAND">configure</b> the sources as follows:</p>
716       <table border="0" bgcolor="#E0E0E0" width="100%">
717         <tr>
718           <td>
719             <pre class="SCREEN">
720             ./configure  --disable-toggle  --disable-editor  --disable-force</pre>
721           </td>
722         </tr>
723       </table>
724       <p>This will create an executable with hard-coded security features so
725       that <span class="APPLICATION">Privoxy</span> does not allow easy
726       bypassing of blocked sites, or changing the current configuration via
727       any connected user's web browser.</p>
728       <p>Finally, all of these features can also be toggled on/off via
729       options in <span class="APPLICATION">Privoxy's</span> main <a href=
730       "../user-manual/config.html#ACCESS-CONTROL" target="_top">config</a>
731       file which means you don't have to recompile anything.</p>
732     </div>
733   </div>
734   <div class="NAVFOOTER">
735     <hr align="left" width="100%">
736     <table summary="Footer navigation table" width="100%" border="0"
737     cellpadding="0" cellspacing="0">
738       <tr>
739         <td width="33%" align="left" valign="top"><a href="installation.html"
740         accesskey="P">Prev</a></td>
741         <td width="34%" align="center" valign="top"><a href="index.html"
742         accesskey="H">Home</a></td>
743         <td width="33%" align="right" valign="top"><a href="misc.html"
744         accesskey="N">Next</a></td>
745       </tr>
746       <tr>
747         <td width="33%" align="left" valign="top">Installation</td>
748         <td width="34%" align="center" valign="top">&nbsp;</td>
749         <td width="33%" align="right" valign="top">Miscellaneous</td>
750       </tr>
751     </table>
752   </div>
753 </body>
754 </html>