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