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