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