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