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