From: hal9 Date: Sun, 25 Aug 2002 23:41:33 +0000 (+0000) Subject: Regenerated docs for 3.0.0. X-Git-Tag: v_3_0_0~7 X-Git-Url: http://www.privoxy.org/gitweb/?a=commitdiff_plain;h=062cb15791491306a1249adf77de7ed15ffffdf1;p=privoxy.git Regenerated docs for 3.0.0. --- diff --git a/doc/pdf/privoxy-developer-manual.pdf b/doc/pdf/privoxy-developer-manual.pdf index 2dc392f3..046c8c1d 100644 Binary files a/doc/pdf/privoxy-developer-manual.pdf and b/doc/pdf/privoxy-developer-manual.pdf differ diff --git a/doc/pdf/privoxy-faq.pdf b/doc/pdf/privoxy-faq.pdf index 3d2842bb..c5377791 100644 Binary files a/doc/pdf/privoxy-faq.pdf and b/doc/pdf/privoxy-faq.pdf differ diff --git a/doc/pdf/privoxy-user-manual.pdf b/doc/pdf/privoxy-user-manual.pdf index f7cc0f0c..9db6c01a 100644 Binary files a/doc/pdf/privoxy-user-manual.pdf and b/doc/pdf/privoxy-user-manual.pdf differ diff --git a/doc/text/developer-manual.txt b/doc/text/developer-manual.txt index 49275ae7..0eaee2ea 100644 --- a/doc/text/developer-manual.txt +++ b/doc/text/developer-manual.txt @@ -2,8 +2,7 @@ Privoxy Developer Manual Copyright © 2001, 2002 by Privoxy Developers -$Id: developer-manual.sgml,v 1.46.2.6 2002/08/10 11:40:25 oes Exp $ - +$Id: developer-manual.sgml,v 1.46.2.8 2002/08/17 00:16:10 hal9 Exp $ The developer manual provides guidance on coding, testing, packaging, documentation and other issues of importance to those involved with Privoxy @@ -11,31 +10,34 @@ development. It is mandatory (and helpful!) reading for anyone who wants to join the team. Please note that this document is constantly evolving. This copy represents the -state at the release of version 2.9.20. You can find the latest version of the +state at the release of version 3.0.0. You can find the latest version of the this manual at http://www.privoxy.org/developer-manual/. Please see the Contact section on how to contact the developers. ------------------------------------------------------------------------------- + Table of Contents 1. Introduction - 1.1. Quickstart to Privoxy Development + 1.1. Quickstart to Privoxy Development 2. The CVS Repository + 2.1. Access to CVS 2.2. CVS Commit Guideline 2.3. Discussing Changes First - 3. Documentation Guidelines + 3.1. Quickstart to Docbook and SGML 3.2. Privoxy Documentation Style 3.3. Privoxy Custom Entities - 4. Coding Guidelines + 4.1. Introduction 4.2. Using Comments + 4.2.1. Comment, Comment, Comment 4.2.2. Use blocks for comments 4.2.3. Keep Comments on their own line @@ -44,16 +46,16 @@ Table of Contents 4.2.6. Comment at the end of braces if the content is more than one screen length - 4.3. Naming Conventions + 4.3.1. Variable Names 4.3.2. Function Names 4.3.3. Header file prototypes 4.3.4. Enumerations, and #defines 4.3.5. Constants - 4.4. Using Space + 4.4.1. Put braces on a line by themselves. 4.4.2. ALL control statements should have a block 4.4.3. Do not belabor/blow-up boolean expressions @@ -62,12 +64,12 @@ Table of Contents 4.4.6. Make the last brace of a function stand out 4.4.7. Use 3 character indentions - 4.5. Initializing - 4.5.1. Initialize all variables + 4.5.1. Initialize all variables 4.6. Functions + 4.6.1. Name functions that return a boolean as a question. 4.6.2. Always specify a return type for a function. 4.6.3. Minimize function calls when iterating by using variables @@ -79,8 +81,8 @@ Table of Contents 4.6.9. Where Possible, Use Forward Struct Declaration Instead of Includes - 4.7. General Coding Practices + 4.7.1. Turn on warnings 4.7.2. Provide a default case for all switch statements 4.7.3. Try to avoid falling through cases in a switch statement. @@ -93,19 +95,19 @@ Table of Contents 4.7.9. Add loaders to the `file_list' structure and in order 4.7.10. "Uncertain" new code and/or changes to existing code, use FIXME - 4.8. Addendum: Template for files and function comment blocks: - 5. Testing Guidelines + 5.1. Testplan for releases 5.2. Test reports - 6. Releasing a New Version + 6.1. Version numbers 6.2. Before the Release: Freeze 6.3. Building and Releasing the Packages + 6.3.1. Note on Privoxy Packaging 6.3.2. Source Tarball 6.3.3. SuSE, Conectiva or Red Hat RPM @@ -119,25 +121,23 @@ Table of Contents 6.3.11. Amiga OS 6.3.12. AIX - 6.4. Uploading and Releasing Your Package 6.5. After the Release - 7. Update the Webserver 8. Contacting the developers, Bug Reporting and Feature Requests + 8.1. Get Support 8.2. Report Bugs 8.3. Request New Features 8.4. Report Ads or Other Actions-Related Problems 8.5. Other - 9. Privoxy Copyright, License and History + 9.1. License 9.2. History - 10. See also 1. Introduction @@ -150,6 +150,7 @@ wide an audience as possible. One does not have to be a programmer to contribute. Packaging, testing, and porting, are all important jobs as well. + ------------------------------------------------------------------------------- 1.1. Quickstart to Privoxy Development @@ -159,6 +160,7 @@ to the list and wait until a project manager has added you. For the time being (read, this section is under construction), please refer to the extensive comments in the source code. + ------------------------------------------------------------------------------- 2. The CVS Repository @@ -166,6 +168,7 @@ the extensive comments in the source code. If you intend to help us with programming, documentation or packaging you will need write access to our holy grail, the CVS repository. Please read this chapter completely before accessing via CVS. + ------------------------------------------------------------------------------- 2.1. Access to CVS @@ -175,6 +178,7 @@ chapters 6 and 7 in SF's site documentation for the technical access details for your operating system. For historical reasons, the CVS server is called cvs.ijbswa.sourceforge.net, the repository is called ijbswa, and the source tree module is called current. + ------------------------------------------------------------------------------- 2.2. CVS Commit Guideline @@ -184,31 +188,31 @@ made to ensure that it is readable, compilable and consistent at all times. We therefore ask anyone with CVS access to strictly adhere to the following guidelines: -  * Never (read: never, ever) be tempted to commit that small change without + * Never (read: never, ever) be tempted to commit that small change without testing it thoroughly first. When we're close to a public release, ask a fellow developer to review your changes. -  * Your commit message should give a concise overview of what you changed (no + * Your commit message should give a concise overview of what you changed (no big details) and why you changed it Just check previous messages for good examples. -  * Don't use the same message on multiple files, unless it equally applies to + * Don't use the same message on multiple files, unless it equally applies to all those files. -  * If your changes span multiple files, and the code won't recompile unless + * If your changes span multiple files, and the code won't recompile unless all changes are committed (e.g. when changing the signature of a function), then commit all files one after another, without long delays in between. If necessary, prepare the commit messages in advance. -  * Before changing things on CVS, make sure that your changes are in line with + * Before changing things on CVS, make sure that your changes are in line with the team's general consensus on what should be done (see below). -  * Don't commit into the stable branch, unless immediately before a new + * Don't commit into the stable branch, unless immediately before a new release. (See Version Numbers below for details.) Collect your changes on the patches tracker instead. - ------------------------------------------------------------------------------- + 2.3. Discussing Changes First We don't have a too formal policy on this, just use common sense. Hints: If it @@ -224,10 +228,10 @@ is.. 5. ..a major redesign of some part of the code: ask the list - Note that near a major public release, we get a bit more cautious - if unsure, it doesn't hurt to ask first. There is always the possibility to submit a patch to the patches tracker instead. + ------------------------------------------------------------------------------- 3. Documentation Guidelines @@ -242,7 +246,7 @@ as Docbook SGML. These files, when built, in the top-level source directory are generated files! Also, the Privoxy index.html (and a variation on this file, privoxy-index.html, meant for inclusion with doc packages), are maintained as SGML as well. DO NOT edit these directly. Edit the SGML source, or contact -someone involved in the documentation (at present Stefan and Hal). +someone involved in the documentation (at present Hal). config requires some special handling. The reason it is maintained this way is so that the extensive comments in the file mirror those in user-manual. But the @@ -271,16 +275,17 @@ before committing to CVS, if possible. How do you update the webserver (i.e. the pages on privoxy.org)? 1. First, build the docs by running make dok (or alternately make redhat-dok). + For PDF docs, do make dok-pdf. 2. Run make webserver which copies all files from doc/webserver to the sourceforge webserver via scp. - Finished docs should be occasionally submitted to CVS (doc/webserver/*/*.html) so that those without the ability to build them locally, have access to them if needed. This is especially important just prior to a new release! Please do this after the $VERSION and other release specific data in configure.in has been updated (this is done just prior to a new release). + ------------------------------------------------------------------------------- 3.1. Quickstart to Docbook and SGML @@ -326,6 +331,7 @@ Look at any of the existing docs for examples of all these and more. You might also find "Writing Documentation Using DocBook - A Crash Course" useful. + ------------------------------------------------------------------------------- 3.2. Privoxy Documentation Style @@ -336,53 +342,56 @@ fashion. Here it is: -  * All tags should be lower case. + * All tags should be lower case. -  * Tags delimiting a block of text (even small blocks) should be on their own + * Tags delimiting a block of text (even small blocks) should be on their own line. Like: -   -   Some text goes here. -   -         + + Some text goes here. + + + Tags marking individual words, or few words, should be in-line: -   Just to emphasize, some text goes here. -         + Just to emphasize, some text goes here. + -  * Tags should be nested and step indented for block text like: (except + * Tags should be nested and step indented for block text like: (except in-line tags) -   -    -     -      -       Some text goes here in our list example. -       -     -    -   -         + + + + + Some text goes here in our list example. + + + + + + This makes it easier to find the text amongst the tags ;-) -  * Use white space to separate logical divisions within a document, like + + * Use white space to separate logical divisions within a document, like between sections. Running everything together consistently makes it harder to read and work on. -  * Do not hesitate to make comments. Comments can either use the + * Do not hesitate to make comments. Comments can either use the element, or the style comment familiar from HTML. (Note in Docbook v4.x is replaced by .) -  * We have an international audience. Refrain from slang, or English + * We have an international audience. Refrain from slang, or English idiosyncrasies (too many to list :). Humor also does not translate well sometimes. -  * Try to keep overall line lengths in source files to 80 characters or less + * Try to keep overall line lengths in source files to 80 characters or less for obvious reasons. This is not always possible, with lengthy URLs for instance. -  * Our documents are available in differing formats. Right now, they are just - plain text, and HTML, but PDF, and others is always a future possibility. - Be careful with URLs (), and avoid this mistake: + * Our documents are available in differing formats. Right now, they are just + plain text, TML, and PDF, but others are always a future possibility. Be + careful with URLs (), and avoid this mistake: My favorite site is here. @@ -391,11 +400,11 @@ Here it is: My favorite site is example.com. -  * All documents should be spell checked occasionally. aspell can check SGML + * All documents should be spell checked occasionally. aspell can check SGML with the -H option. (ispell I think too.) - ------------------------------------------------------------------------------- + 3.3. Privoxy Custom Entities Privoxy documentation is using a number of customized "entities" to facilitate @@ -414,7 +423,7 @@ encouraged to use these where possible. Some of these obviously require re-setting with each release (done by the Makefile). A sampling of custom entities are listed below. See any of the main docs for examples. -  * Re- "boilerplate" text entities are defined like: + * Re- "boilerplate" text entities are defined like: @@ -424,19 +433,18 @@ entities are listed below. See any of the main docs for examples. semi-colon), and the contents will be dumped into the finished doc at that point. -  * Commonly used "internal entities": + * Commonly used "internal entities": - p-version: the Privoxy version string, e.g. "2.9.20". + p-version: the Privoxy version string, e.g. "3.0.0". p-status: the project status, either "alpha", "beta", or "stable". p-not-stable: use to conditionally include text in "not stable" releases (e.g. "beta"). p-stable: just the opposite. p-text: this doc is only generated as text. - - There are others in various places that are defined for a specific purpose. Read the source! + ------------------------------------------------------------------------------- 4. Coding Guidelines @@ -451,6 +459,7 @@ of success of the project. And that of course comes back to us as individuals. If we can increase our development and product efficiencies then we can solve more of the request for changes/improvements and in general feel good about ourselves. ;-> + ------------------------------------------------------------------------------- 4.2. Using Comments @@ -471,6 +480,7 @@ describes something different than what the code is doing then maybe a programming error is occurring. Example: + /* if page size greater than 1k ... */ if ( PageLength() > 1024 ) { @@ -486,6 +496,7 @@ if ( PageLength() > 1024 ) This demonstrates 2 cases of "what not to do". The first is a "syntax comment". The second is a comment that does not fit what is actually being done. + ------------------------------------------------------------------------------- 4.2.2. Use blocks for comments @@ -498,6 +509,7 @@ separation between the comment and the code. Block identifiers do, by surrounding the code with a clear, definable pattern. Example: + /********************************************************************* * This will stand out clearly in your code! *********************************************************************/ @@ -524,6 +536,7 @@ Exception: If you are trying to add a small logic comment and do not wish to "disrupt" the flow of the code, feel free to use a 1 line comment which is NOT on the same line as the code. + ------------------------------------------------------------------------------- 4.2.3. Keep Comments on their own line @@ -538,6 +551,7 @@ often: during the definition of variables, at the end of closing braces, when used to comment parameters. Example: + /********************************************************************* * This will stand out clearly in your code, * But the second example won't. @@ -572,6 +586,7 @@ short DoSomethingVeryImportant( ...code here... } /* -END- DoSomethingVeryImportant */ + ------------------------------------------------------------------------------- 4.2.4. Comment each logical step @@ -586,6 +601,7 @@ into it to see where you forgot to put one. Most "for", "while", "do", etc... loops _probably_ need a comment. After all, these are usually major logic containers. + ------------------------------------------------------------------------------- 4.2.5. Comment All Functions Thoroughly @@ -602,6 +618,7 @@ code reuse by allowing a user to determine the safety and applicability of any function for the problem at hand. As a result of such benefits, all functions should contain the information presented in the addendum section of this document. + ------------------------------------------------------------------------------- 4.2.6. Comment at the end of braces if the content is more than one screen @@ -620,6 +637,7 @@ more readable: use following a closing brace: } /* -END- if() or while () or etc... */ Example: + if ( 1 == X ) { DoSomethingVeryImportant(); @@ -633,6 +651,7 @@ if ( 1 == X ) DoSomethingVeryImportant(); ...some long list of commands... } /* -END- if ( 1 == X ) */ + ------------------------------------------------------------------------------- 4.3. Naming Conventions @@ -648,11 +667,13 @@ and system headers.) Do not use identifiers which are reserved in ANSI C++. port Privoxy to C++. Example: + int ms_iis5_hack = 0; Instead of: int msiis5hack = 0; int msIis5Hack = 0; + ------------------------------------------------------------------------------- 4.3.2. Function Names @@ -666,12 +687,14 @@ and system headers.) Do not use identifiers which are reserved in ANSI C++. port Privoxy to C++. Example: + int load_some_file( struct client_state *csp ) Instead of: int loadsomefile( struct client_state *csp ) int loadSomeFile( struct client_state *csp ) + ------------------------------------------------------------------------------- 4.3.3. Header file prototypes @@ -682,13 +705,16 @@ Use a descriptive parameter name in the function prototype in header files. Use the same parameter name in the header file that you use in the c file. Example: + (.h) extern int load_aclfile( struct client_state *csp ); (.c) int load_aclfile( struct client_state *csp ) Instead of: + (.h) extern int load_aclfile( struct client_state * ); or (.h) extern int load_aclfile(); (.c) int load_aclfile( struct client_state *csp ) + ------------------------------------------------------------------------------- 4.3.4. Enumerations, and #defines @@ -700,6 +726,7 @@ identifier with an underscore. (ANSI C reserves these for use by the compiler and system headers.) Example: + (enumeration) : enum Boolean { FALSE, TRUE }; (#define) : #define DEFAULT_SIZE 100; @@ -708,11 +735,13 @@ the preprocessor: FEATURE_>, where > is a short (preferably 1 or 2 word) description. Example: + #define FEATURE_FORCE 1 #ifdef FEATURE_FORCE #define FORCE_PREFIX blah #endif /* def FEATURE_FORCE */ + ------------------------------------------------------------------------------- 4.3.5. Constants @@ -728,6 +757,7 @@ Use underscore (_) to separate adjacent acronyms and abbreviations. Never terminate a name with an underscore. Example: + #define USE_IMAGE_LIST 1 Instead of: @@ -737,6 +767,7 @@ Instead of: #define USE_IMAGE_LIST_ 1 or #define use_image_list 1 or #define UseImageList 1 + ------------------------------------------------------------------------------- 4.4. Using Space @@ -751,6 +782,7 @@ This practice makes it easier to identify the opening and closing braces for a block. Example: + if ( this == that ) { ... @@ -772,6 +804,7 @@ it easier to read. Status: developer-discretion. Example exception: + while ( more lines are read ) { /* Please document what is/is not a comment line here */ @@ -779,6 +812,7 @@ while ( more lines are read ) do_something( line ); } + ------------------------------------------------------------------------------- 4.4.2. ALL control statements should have a block @@ -789,6 +823,7 @@ Using braces to make a block will make your code more readable and less prone to error. All control statements should have a block defined. Example: + if ( this == that ) { DoSomething(); @@ -807,11 +842,13 @@ Note: The first example in "Instead of" will execute in a manner other than that which the developer desired (per indentation). Using code braces would have prevented this "feature". The "explanation" and "exception" from the point above also applies. + ------------------------------------------------------------------------------- 4.4.3. Do not belabor/blow-up boolean expressions Example: + structure->flag = ( condition ); Instead of: @@ -821,6 +858,7 @@ if ( condition ) { structure->flag = 1; } else { structure->flag = 0; } Note: The former is readable and concise. The later is wordy and inefficient. Please assume that any developer new to the project has at least a "good" knowledge of C/C++. (Hope I do not offend by that last comment ... 8-) + ------------------------------------------------------------------------------- 4.4.4. Use white space freely because it is free @@ -831,6 +869,7 @@ Make it readable. The notable exception to using white space freely is listed in the next guideline. Example: + int firstValue = 0; int someValue = 0; int anotherValue = 0; @@ -839,6 +878,7 @@ int thisVariable = 0; if ( thisVariable == thatVariable ) firstValue = oldValue + ( ( someValue - anotherValue ) - whatever ) + ------------------------------------------------------------------------------- 4.4.5. Don't use white space around structure operators @@ -853,16 +893,19 @@ parentheses next to names. With spaces, the connection between the object and variable/function name is not as clear. Example: + aStruct->aMember; aStruct.aMember; FunctionName(); Instead of: aStruct -> aMember; aStruct . aMember; FunctionName (); + ------------------------------------------------------------------------------- 4.4.6. Make the last brace of a function stand out Example: + int function1( ... ) { ...code... @@ -887,6 +930,7 @@ long if {} statements too. After all whitespace is free! Status: developer-discretion on the number of blank lines. Enforced is the end of function comments. + ------------------------------------------------------------------------------- 4.4.7. Use 3 character indentions @@ -898,6 +942,7 @@ very* ragged. So use 3 character indentions only. If you like to use TABs, pass your code through a filter such as "expand -t3" before checking in your code. Example: + static const char * const url_code_map[256] = { NULL, ... @@ -918,6 +963,7 @@ int function1( ... ) return( NEVER_GETS_HERE ); } + ------------------------------------------------------------------------------- 4.5. Initializing @@ -931,6 +977,7 @@ have been assigned a value somewhere else in the code. Remove the chance of accidentally using an unassigned variable. Example: + short anShort = 0; float aFloat = 0; struct *ptr = NULL; @@ -941,6 +988,7 @@ SIGSEV vs. arrayPtr[0]. Status: developer-discretion if and only if the variable is assigned a value "shortly after" declaration. + ------------------------------------------------------------------------------- 4.6. Functions @@ -953,9 +1001,11 @@ Value should be phrased as a question that would logically be answered as a true or false statement Example: + ShouldWeBlockThis(); ContainsAnImage(); IsWebPageBlank(); + ------------------------------------------------------------------------------- 4.6.2. Always specify a return type for a function. @@ -965,6 +1015,7 @@ Explanation: The default return for a function is an int. To avoid ambiguity, create a return for a function when the return has a purpose, and create a void return type if the function does not need to return anything. + ------------------------------------------------------------------------------- 4.6.3. Minimize function calls when iterating by using variables @@ -975,6 +1026,7 @@ It is easy to write the following code, and a clear argument can be made that the code is easy to understand: Example: + for ( size_t cnt = 0; cnt < blockListLength(); cnt ++ ) { .... @@ -992,6 +1044,7 @@ Instead of using a function call during the iterations, assign the value to a variable, and evaluate using the variable. Example: + size_t len = blockListLength(); for ( size_t cnt = 0; cnt < len; cnt ++ ) @@ -1002,6 +1055,7 @@ for ( size_t cnt = 0; cnt < len; cnt ++ ) Exceptions: if the value of blockListLength() *may* change or could * potentially* change, then you must code the function call in the for/while loop. + ------------------------------------------------------------------------------- 4.6.4. Pass and Return by Const Reference @@ -1018,6 +1072,7 @@ char *argv[] ) { strcmp( argv[0], "privoxy" ); } Both these pointers are *const*! If the c runtime library maintainers do it, we should too. + ------------------------------------------------------------------------------- 4.6.5. Pass and Return by Value @@ -1030,6 +1085,7 @@ client_state csp ) would not work. So, to be consistent, we should declare all prototypes with "pass by value": int load_aclfile( struct client_state *csp ) + ------------------------------------------------------------------------------- 4.6.6. Names of include files @@ -1043,6 +1099,7 @@ that utilizes a partial path to distinguish their header files from system or other header files. Example: + #include /* This is not a local include */ #include "config.h" /* This IS a local include */ @@ -1053,6 +1110,7 @@ Exception: Note: Please! do not add "-I." to the Makefile without a _very_ good reason. This duplicates the #include "file.h" behavior. + ------------------------------------------------------------------------------- 4.6.7. Provide multiple inclusion protection @@ -1066,10 +1124,12 @@ of the file. Of course, replace PROJECT_H with your file name, with "." Changed to "_", and make it uppercase. Example: + #ifndef PROJECT_H_INCLUDED #define PROJECT_H_INCLUDED ... #endif /* ndef PROJECT_H_INCLUDED */ + ------------------------------------------------------------------------------- 4.6.8. Use `extern "C"` when appropriate @@ -1081,6 +1141,7 @@ If our headers are included from C++, they must declare our functions as of our code. Example: + #ifdef __cplusplus extern "C" { @@ -1091,6 +1152,7 @@ extern "C" #ifdef __cplusplus } #endif /* def __cplusplus */ + ------------------------------------------------------------------------------- 4.6.9. Where Possible, Use Forward Struct Declaration Instead of Includes @@ -1101,6 +1163,7 @@ Useful in headers that include pointers to other struct's. Modifications to excess header files may cause needless compiles. Example: + /********************************************************************* * We're avoiding an include statement here! *********************************************************************/ @@ -1112,6 +1175,7 @@ proper header file is necessary. If you only want to prototype a pointer, however, the header file is unnecessary. Status: Use with discretion. + ------------------------------------------------------------------------------- 4.7. General Coding Practices @@ -1123,6 +1187,7 @@ Explanation Compiler warnings are meant to help you find bugs. You should turn on as many as possible. With GCC, the switch is "-Wall". Try and fix as many warnings as possible. + ------------------------------------------------------------------------------- 4.7.2. Provide a default case for all switch statements @@ -1135,6 +1200,7 @@ protect yourself from the unknown, always have a default step in a switch statement. Example: + switch( hash_string( cmd ) ) { case hash_actions_file : @@ -1161,6 +1227,7 @@ issue. The "anomaly code goes here" may be no more than a print to the STDERR stream (as in load_config). Or it may really be an ABEND condition. Status: Programmer discretion is advised. + ------------------------------------------------------------------------------- 4.7.3. Try to avoid falling through cases in a switch statement. @@ -1179,6 +1246,7 @@ use a break statement for each case statement. If you choose to allow fall through, you should comment both the fact of the fall through and reason why you felt it was necessary. + ------------------------------------------------------------------------------- 4.7.4. Use 'long' or 'short' Instead of 'int' @@ -1192,6 +1260,7 @@ Status: open-to-debate. In the case of most FSF projects (including X/ GNU-Emacs), there are typedefs to int4, int8, int16, (or equivalence ... I forget the exact typedefs now). Should we add these to IJB now that we have a "configure" script? + ------------------------------------------------------------------------------- 4.7.5. Don't mix size_t and other types @@ -1203,6 +1272,7 @@ whether it is signed or unsigned, or about how long it is. Do not compare a size_t against another variable of a different type (or even against a constant) without casting one of the values. Try to avoid using size_t if you can. + ------------------------------------------------------------------------------- 4.7.6. Declare each variable and struct on its own line. @@ -1212,6 +1282,7 @@ Explanation: It can be tempting to declare a series of variables all on one line. Don't. Example: + long a = 0; long b = 0; long c = 0; @@ -1230,6 +1301,7 @@ variables; feel free to declare them on 1 line. You should, although, provide a good comment on their functions. Status: developer-discretion. + ------------------------------------------------------------------------------- 4.7.7. Use malloc/zalloc sparingly @@ -1243,8 +1315,10 @@ Only "malloc" a struct (on the heap) if the variable's life will extend beyond the context of one function call. Example: + If a function creates a struct and stores a pointer to it in a list, then it should definitely be allocated via `malloc'. + ------------------------------------------------------------------------------- 4.7.8. The Programmer Who Uses 'malloc' is Responsible for Ensuring 'free' @@ -1259,6 +1333,7 @@ is a "good thing (tm)". You may need to offer a free/unload/destructor type function to accommodate this. Example: + int load_re_filterfile( struct client_state *csp ) { ... } static void unload_re_filterfile( void *f ) { ... } @@ -1269,6 +1344,7 @@ library functions ... such as `strdup'. Status: developer-discretion. The "main" use of this standard is for allocating and freeing data structures (complex or nested). + ------------------------------------------------------------------------------- 4.7.9. Add loaders to the `file_list' structure and in order @@ -1281,6 +1357,7 @@ easier to add/read new blockers when you expect a certain order. Note: It may appear that the alpha order is broken in places by POPUP tests coming before PCRS tests. But since POPUPs can also be referred to as KILLPOPUPs, it is clear that it should come first. + ------------------------------------------------------------------------------- 4.7.10. "Uncertain" new code and/or changes to existing code, use FIXME @@ -1305,54 +1382,56 @@ or: Note: If you make it clear that this may or may not be a "good thing (tm)", it will be easier to identify and include in the project (or conversely exclude from the project). + ------------------------------------------------------------------------------- 4.8. Addendum: Template for files and function comment blocks: Example for file comments: -const char FILENAME_rcs[] = "$Id: developer-manual.sgml,v 1.46.2.6 2002/08/10 11:40:25 oes Exp $"; -/********************************************************************* - * - * File : $Source$ - * - * Purpose : (Fill me in with a good description!) - * - * Copyright : Written by and Copyright (C) 2001 the SourceForge - * Privoxy team. http://www.privoxy.org/ - * - * Based on the Internet Junkbuster originally written - * by and Copyright (C) 1997 Anonymous Coders and - * Junkbusters Corporation. http://www.junkbusters.com - * - * This program is free software; you can redistribute it - * and/or modify it under the terms of the GNU General - * Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will - * be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * The GNU General Public License should be included with - * this file. If not, you can view it at - * http://www.gnu.org/copyleft/gpl.html - * or write to the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Revisions : - * $Log$ - * - *********************************************************************/ - - -#include "config.h" - - ...necessary include files for us to do our work... - -const char FILENAME_h_rcs[] = FILENAME_H_VERSION; + +const char FILENAME_rcs[] = "$Id: developer-manual.sgml,v 1.46.2.8 2002/08/17 00:16:10 hal9 Exp $"; +/********************************************************************* + * + * File : $Source$ + * + * Purpose : (Fill me in with a good description!) + * + * Copyright : Written by and Copyright (C) 2001 the SourceForge + * Privoxy team. http://www.privoxy.org/ + * + * Based on the Internet Junkbuster originally written + * by and Copyright (C) 1997 Anonymous Coders and + * Junkbusters Corporation. http://www.junkbusters.com + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU General + * Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will + * be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public + * License for more details. + * + * The GNU General Public License should be included with + * this file. If not, you can view it at + * http://www.gnu.org/copyleft/gpl.html + * or write to the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Revisions : + * $Log$ + * + *********************************************************************/ + + +#include "config.h" + + ...necessary include files for us to do our work... + +const char FILENAME_h_rcs[] = FILENAME_H_VERSION; Note: This declares the rcs variables that should be added to the "show-proxy-args" page. If this is a brand new creation by you, you are free to @@ -1364,73 +1443,75 @@ the code (via `forward-page' and `backward-page'). Please include it if you can. Example for file header comments: -#ifndef _FILENAME_H -#define _FILENAME_H -#define FILENAME_H_VERSION "$Id: developer-manual.sgml,v 1.46.2.6 2002/08/10 11:40:25 oes Exp $" -/********************************************************************* - * - * File : $Source$ - * - * Purpose : (Fill me in with a good description!) - * - * Copyright : Written by and Copyright (C) 2001 the SourceForge - * Privoxy team. http://www.privoxy.org/ - * - * Based on the Internet Junkbuster originally written - * by and Copyright (C) 1997 Anonymous Coders and - * Junkbusters Corporation. http://www.junkbusters.com - * - * This program is free software; you can redistribute it - * and/or modify it under the terms of the GNU General - * Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will - * be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * The GNU General Public License should be included with - * this file. If not, you can view it at - * http://www.gnu.org/copyleft/gpl.html - * or write to the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Revisions : - * $Log$ - * - *********************************************************************/ - - -#include "project.h" - -#ifdef __cplusplus -extern "C" { -#endif - - ... function headers here ... - - -/* Revision control strings from this header and associated .c file */ -extern const char FILENAME_rcs[]; -extern const char FILENAME_h_rcs[]; - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* ndef _FILENAME_H */ - -/* - Local Variables: - tab-width: 3 - end: -*/ + +#ifndef _FILENAME_H +#define _FILENAME_H +#define FILENAME_H_VERSION "$Id: developer-manual.sgml,v 1.46.2.8 2002/08/17 00:16:10 hal9 Exp $" +/********************************************************************* + * + * File : $Source$ + * + * Purpose : (Fill me in with a good description!) + * + * Copyright : Written by and Copyright (C) 2001 the SourceForge + * Privoxy team. http://www.privoxy.org/ + * + * Based on the Internet Junkbuster originally written + * by and Copyright (C) 1997 Anonymous Coders and + * Junkbusters Corporation. http://www.junkbusters.com + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU General + * Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will + * be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public + * License for more details. + * + * The GNU General Public License should be included with + * this file. If not, you can view it at + * http://www.gnu.org/copyleft/gpl.html + * or write to the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Revisions : + * $Log$ + * + *********************************************************************/ + + +#include "project.h" + +#ifdef __cplusplus +extern "C" { +#endif + + ... function headers here ... + + +/* Revision control strings from this header and associated .c file */ +extern const char FILENAME_rcs[]; +extern const char FILENAME_h_rcs[]; + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* ndef _FILENAME_H */ + +/* + Local Variables: + tab-width: 3 + end: +*/ Example for function comments: + /********************************************************************* * * Function : FUNCTION_NAME @@ -1453,11 +1534,13 @@ int FUNCTION_NAME( void *param1, const char *x ) Note: If we all follow this practice, we should be able to parse our code to create a "self-documenting" web page. + ------------------------------------------------------------------------------- 5. Testing Guidelines To be filled. + ------------------------------------------------------------------------------- 5.1. Testplan for releases @@ -1468,17 +1551,16 @@ Explain release numbers. major, minor. developer releases. etc. 2. Remove any file that was left over. This includes (but is not limited to) -   + /var/log/privoxy + + /var/log/privoxy -   + /etc/privoxy + + /etc/privoxy -   + /usr/sbin/privoxy + + /usr/sbin/privoxy -   + /etc/init.d/privoxy + + /etc/init.d/privoxy -   + /usr/doc/privoxy* + + /usr/doc/privoxy* - 3. Install the rpm. Any error messages? 4. start,stop,status Privoxy with the specific script (e.g. /etc/rc.d/init/ @@ -1488,22 +1570,22 @@ Explain release numbers. major, minor. developer releases. etc. 6. Remove the rpm. Any error messages? All files removed? - ------------------------------------------------------------------------------- + 5.2. Test reports Please submit test reports only with the test form at sourceforge. Three simple steps: -  * Select category: the distribution you test on. + * Select category: the distribution you test on. -  * Select group: the version of Privoxy that we are about to release. + * Select group: the version of Privoxy that we are about to release. -  * Fill the Summary and Detailed Description with something intelligent (keep + * Fill the Summary and Detailed Description with something intelligent (keep it short and precise). - Do not mail to the mailing list (we cannot keep track on issues there). + ------------------------------------------------------------------------------- 6. Releasing a New Version @@ -1518,6 +1600,7 @@ outlined in this chapter. The following programs are required to follow this process: ncftpput (ncftp), scp, ssh (ssh), gmake (GNU's version of make), autoconf, cvs. + ------------------------------------------------------------------------------- 6.1. Version numbers @@ -1526,12 +1609,12 @@ First you need to determine which version number the release will have. Privoxy version numbers consist of three numbers, separated by dots, like in X.Y.Z, where: -  * X, the version major, is rarely ever changed. It is increased by one if + * X, the version major, is rarely ever changed. It is increased by one if turning a development branch into stable substantially changes the - functionality, user interface or configuration syntax. Majors 1 and 2 were + functionality, user interface or configuration syntax. Majors 1 and 2 were Junkbuster, and 3 will be the first stable Privoxy release. -  * Y, the version minor, represents the branch within the major version. At + * Y, the version minor, represents the branch within the major version. At any point in time, there are two branches being maintained: The stable branch, with an even minor, say, 2N, in which no functionality is being added and only bug-fixes are made, and 2N+1, the development branch, in @@ -1543,7 +1626,7 @@ where: up (i.e. no longer maintained), the former development branch 2N+1 becomes the new stable branch 2N+2, and a new development branch 2N+3 is opened. -  * Z, the point or sub version, represents a release of the software within a + * Z, the point or sub version, represents a release of the software within a branch. It is therefore incremented immediately before each code freeze. In development branches, only the even point versions correspond to actual releases, while the odd ones denote the evolving state of the sources on @@ -1554,22 +1637,22 @@ where: distinguished from released versions. The point version is reset to zero when the minor changes. - ------------------------------------------------------------------------------- + 6.2. Before the Release: Freeze The following must be done by one of the developers prior to each new release. -  * Make sure that everybody who has worked on the code in the last couple of + * Make sure that everybody who has worked on the code in the last couple of days has had a chance to yell "no!" in case they have pending changes/fixes in their pipelines. Announce the freeze so that nobody will interfere with last minute changes. -  * Increment the version number (point from odd to even in development + * Increment the version number (point from odd to even in development branches!) in configure.in. (RPM spec files will need to be incremented as well.) -  * If default.action has changed since last release (i.e. software release or + * If default.action has changed since last release (i.e. software release or standalone actions file release), bump up its version info to A.B in this line: @@ -1578,34 +1661,43 @@ The following must be done by one of the developers prior to each new release. Then change the version info in doc/webserver/actions/index.php, line: '$required_actions_file_version = "A.B";' -  * All documentation should be rebuild after the version bump. Finished docs + * All documentation should be rebuild after the version bump. Finished docs should be then be committed to CVS (for those without the ability to build these). Some docs may require rather obscure processing tools. config, the man page (and the html version of the man page), and the PDF docs fall in this category. REAMDE, the man page, AUTHORS, and config should all also be - committed to CVS for other packageers. The formal docs should be uploaded - to the webserver. See the Section "Updating the webserver" in this manual - for details. - -  * All developers should look at the ChangeLog and make sure noteworthy + committed to CVS for other packagers. The formal docs should be uploaded to + the webserver. See the Section "Updating the webserver" in this manual for + details. + + * The User Manual is also used for context sensitive help for the CGI editor. + This is version sensitive, so that the user will get appropriate help for + his/her release. So with each release a fresh version should be uploaded to + the webserver (this is in addition to the main User Manual link from the + main page since we need to keep manuals for various versions available). + The CGI pages will link to something like http://privoxy.org/$(VERSION)/ + user-manual/. This will need to be updated for each new release. There is + no Makefile target for this at this time!!! It needs to be done manually. + + * All developers should look at the ChangeLog and make sure noteworthy changes are referenced. -  * Commit all files that were changed in the above steps! + * Commit all files that were changed in the above steps! -  * Tag all files in CVS with the version number with "cvs tag v_X_Y_Z". Don't + * Tag all files in CVS with the version number with "cvs tag v_X_Y_Z". Don't use vX_Y_Z, ver_X_Y_Z, v_X.Y.Z (won't work) etc. -  * If the release was in a development branch, increase the point version from + * If the release was in a development branch, increase the point version from even to odd (X.Y.(Z+1)) again in configure.in and commit your change. -  * On the webserver, copy the user manual to a new top-level directory called + * On the webserver, copy the user manual to a new top-level directory called X.Y.Z. This ensures that help links from the CGI pages, which have the version as a prefix, will go into the right version of the manual. If this is a development branch release, also symlink X.Y.(Z-1) to X.Y.Z and X.Y. (Z+1) to . (i.e. dot). - ------------------------------------------------------------------------------- + 6.3. Building and Releasing the Packages Now the individual packages can be built and released. Note that for GPL @@ -1627,6 +1719,7 @@ them, all future bug reports, are based on exactly the same code. Please find additional instructions for the source tarball and the individual platform dependent binary packages below. And details on the Sourceforge release process below that. + ------------------------------------------------------------------------------- 6.3.1. Note on Privoxy Packaging @@ -1634,11 +1727,11 @@ release process below that. Please keep these general guidelines in mind when putting together your package. These apply to all platforms! -  * Privoxy requires write access to: all *.action files, all logfiles, and the + * Privoxy requires write access to: all *.action files, all logfiles, and the trust file. You will need to determine the best way to do this for your platform. -  * Please include up to date documentation. At a bare minimum: + * Please include up to date documentation. At a bare minimum: LICENSE (top-level directory) @@ -1669,25 +1762,25 @@ package. These apply to all platforms! directory with privoxy-index.html, (i.e. one level up from the manual directories). -  * user.action is designed for local preferences. Make sure this does not get + * user.action is designed for local preferences. Make sure this does not get overwritten! -  * Other configuration files should be installed as the new defaults, but all + * Other configuration files should be installed as the new defaults, but all previously installed configuration files should be preserved as backups. This is just good manners :-) -  * Please check platform specific notes in this doc, if you haven't done + * Please check platform specific notes in this doc, if you haven't done "Privoxy" packaging before for other platform specific issues. Conversely, please add any notes that you know are important for your platform (or contact one of the doc maintainers to do this if you can't). -  * Packagers should do a "clean" install of their package after building it. + * Packagers should do a "clean" install of their package after building it. So any previous installs should be removed first to ensure the integrity of the newly built package. Then run the package for a while to make sure there are no obvious problems, before uploading. - ------------------------------------------------------------------------------- + 6.3.2. Source Tarball First, make sure that you have freshly exported the right version into an empty @@ -1706,6 +1799,7 @@ To upload the package to Sourceforge, simply issue Go to the displayed URL and release the file publicly on Sourceforge. For the change log field, use the relevant section of the ChangeLog file. + ------------------------------------------------------------------------------- 6.3.3. SuSE, Conectiva or Red Hat RPM @@ -1740,6 +1834,7 @@ To upload the package to Sourceforge, simply issue where rpm_packagerev is the RPM release number as determined above. Go to the displayed URL and release the file publicly on Sourceforge. Use the release notes and change log from the source tarball package. + ------------------------------------------------------------------------------- 6.3.4. OS/2 @@ -1774,6 +1869,7 @@ You will find the WarpIN-installable executable in the ./files directory. Upload this anonymously to uploads.sourceforge.net/incoming, create a release for it, and you're done. Use the release notes and Change Log from the source tarball package. + ------------------------------------------------------------------------------- 6.3.5. Solaris @@ -1797,6 +1893,7 @@ which creates a gzip'ed tar archive. Sadly, you cannot use make solaris-upload on the Sourceforge machine (no ncftpput). You now have to manually upload the archive to Sourceforge's ftp server and release the file publicly. Use the release notes and Change Log from the source tarball package. + ------------------------------------------------------------------------------- 6.3.6. Windows @@ -1819,6 +1916,7 @@ winsetup/GNUmakefile. All you need to do is: Now you can manually rename privoxy_setup.exe to privoxy_setup_X_Y_Z.exe, and upload it to SourceForge. When releasing the package on SourceForge, use the release notes and Change Log from the source tarball package. + ------------------------------------------------------------------------------- 6.3.7. Debian @@ -1827,16 +1925,17 @@ First, make sure that you have freshly exported the right version into an empty directory. (See "Building and releasing packages" above). Then add a log entry to debian/changelog, if it is not already there, for example by running: - debchange -v 2.9.20-beta-1 "New upstream version" + debchange -v 3.0.0-stable-1 "New upstream version" Then, run: dpkg-buildpackage -rfakeroot -us -uc -b -This will create ../privoxy_2.9.20-beta-1_i386.deb which can be uploaded. To +This will create ../privoxy_3.0.0-stable-1_i386.deb which can be uploaded. To upload the package to Sourceforge, simply issue make debian-upload + ------------------------------------------------------------------------------- 6.3.8. Mac OSX @@ -1866,6 +1965,7 @@ distributable zip file with the command: You can then upload privoxyosx_setup_x.y.z.zip anonymously to uploads.sourceforge.net/incoming, create a release for it, and you're done. Use the release notes and Change Log from the source tarball package. + ------------------------------------------------------------------------------- 6.3.9. FreeBSD @@ -1889,6 +1989,7 @@ which creates a gzip'ed tar archive. Sadly, you cannot use make freebsd-upload on the Sourceforge machine (no ncftpput). You now have to manually upload the archive to Sourceforge's ftp server and release the file publicly. Use the release notes and Change Log from the source tarball package. + ------------------------------------------------------------------------------- 6.3.10. HP-UX 11 @@ -1900,6 +2001,7 @@ directory. (See "Building and releasing packages" above). Then run: autoheader && autoconf && ./configure Then do FIXME. + ------------------------------------------------------------------------------- 6.3.11. Amiga OS @@ -1911,6 +2013,7 @@ directory. (See "Building and releasing packages" above). Then run: autoheader && autoconf && ./configure Then do FIXME. + ------------------------------------------------------------------------------- 6.3.12. AIX @@ -1934,6 +2037,7 @@ which creates a gzip'ed tar archive. Sadly, you cannot use make aix-upload on the Sourceforge machine (no ncftpput). You now have to manually upload the archive to Sourceforge's ftp server and release the file publicly. Use the release notes and Change Log from the source tarball package. + ------------------------------------------------------------------------------- 6.4. Uploading and Releasing Your Package @@ -1941,24 +2045,23 @@ release notes and Change Log from the source tarball package. After the package is ready, it is time to upload it to SourceForge, and go through the release steps. The upload is done via FTP: -  * Upload to: ftp://upload.sourceforge.net/incoming + * Upload to: ftp://upload.sourceforge.net/incoming -  * user: anonymous + * user: anonymous -  * password: ijbswa-developers@lists.sourceforge.net + * password: ijbswa-developers@lists.sourceforge.net - Or use the make targets as described above. Once this done go to http://sourceforge.net/project/admin/editpackages.php? group_id=11118, making sure you are logged in. Find your target platform in the second column, and click Add Release. You will then need to create a new release for your package, using the format of $VERSION ($CODE_STATUS), e.g. -2.9.20 (beta). +3.0.0 (beta). Now just follow the prompts. Be sure to add any appropriate Release notes. You should see your freshly uploaded packages in "Step 2. Add Files To This -Release". Check the appropriate box(es). Remember at each step to hit the +Release". Check the appropriate box(es). Remember at each step to hit the "Refresh/Submit" buttons! You should now see your file(s) listed in Step 3. Fill out the forms with the appropriate information for your platform, being sure to hit "Update" for each file. If anyone is monitoring your platform, @@ -1967,6 +2070,7 @@ This should do it! If you have made errors, or need to make changes, you can go through essentially the same steps, but select Edit Release, instead of Add Release. + ------------------------------------------------------------------------------- 6.5. After the Release @@ -1974,29 +2078,36 @@ essentially the same steps, but select Edit Release, instead of Add Release. When all (or: most of the) packages have been uploaded and made available, send an email to the announce mailing list, Subject: "Version X.Y.Z available for download". Be sure to include the download location, the release notes and the -change log. +Changelog. Also, post an updated News item on the project page Sourceforge, and +update the Home page and docs linked from the Home page (see below). + ------------------------------------------------------------------------------- 7. Update the Webserver -When updating the webserver, please follow these steps to make sure that no -broken links, inconsistent contents or permission problems will occur: +The webserver should be updated at least with each stable release. When +updating, please follow these steps to make sure that no broken links, +inconsistent contents or permission problems will occur (as it has many times +in the past!): -If you have changed anything in the documentation source SGML files, do: +If you have changed anything in the stable-branch documentation source SGML +files, do: - make dok # (or make redhat-dok if make dok doesn't work for you) + make dok dok-pdf # (or 'make redhat-dok dok-pdf' if 'make dok' doesn't work for you) That will generate doc/webserver/user-manual, doc/webserver/developer-manual, -doc/webserver/faq and doc/webserver/index.html automatically. +doc/webserver/faq, doc/pdf/*.pdf and doc/webserver/index.html automatically. -If you changed the manual page source, generate doc/webserver/man-page/ +If you changed the manual page sources, generate doc/webserver/man-page/ privoxy-man-page.html by running "make man". (This is a separate target due to -dependencies on some obscure perl scripts. See comments in GNUmakefile.) +dependencies on some obscure perl scripts [now in CVS, but not well tested]. +See comments in GNUmakefile.) If you want to add new files to the webserver, create them locally in the doc/ webserver/* directory (or create new directories under doc/webserver). -Next, commit any changes from the above steps to CVS. All set? Then do +Next, commit any changes from the above steps to CVS. All set? If these are +docs in the stable branch, then do: make webserver @@ -2004,7 +2115,10 @@ This will do the upload to the webserver (www.privoxy.org) and ensure all files and directories there are group writable. Please do NOT use any other means of transferring files to the webserver to -avoid permission problems. +avoid permission problems. Also, please do not upload docs from development +branches or versions. The publicly posted docs should be in sync with the last +official release. + ------------------------------------------------------------------------------- 8. Contacting the developers, Bug Reporting and Feature Requests @@ -2012,6 +2126,7 @@ avoid permission problems. We value your feedback. In fact, we rely on it to improve Privoxy and its configuration. However, please note the following hints, so we can provide you with the best support: + ------------------------------------------------------------------------------- 8.1. Get Support @@ -2021,6 +2136,7 @@ http://sourceforge.net/tracker/?group_id=11118&atid=211118 All users are of course welcome to discuss their issues on the users mailing list, where the developers also hang around. + ------------------------------------------------------------------------------- 8.2. Report Bugs @@ -2041,6 +2157,7 @@ If not using the latest version, chances are that the bug has been found and fixed in the meantime. We would appreciate if you could take the time to upgrade to the latest version (or even the latest CVS snapshot) and verify your bug, but this is not required for reporting. + ------------------------------------------------------------------------------- 8.3. Request New Features @@ -2048,6 +2165,7 @@ bug, but this is not required for reporting. You are welcome to submit ideas on new features or other proposals for improvement through our feature request tracker at http://sourceforge.net/ tracker/?atid=361118&group_id=11118. + ------------------------------------------------------------------------------- 8.4. Report Ads or Other Actions-Related Problems @@ -2061,6 +2179,7 @@ troubled site and even pre-fill the form! New, improved default.action files will occasionally be made available based on your feedback. These will be announced on the ijbswa-announce list and available from our the files section of our project page. + ------------------------------------------------------------------------------- 8.5. Other @@ -2070,6 +2189,7 @@ interested users and people who wish to contribute to the project are also welcome on the developers list! You can find an overview of all Privoxy-related mailing lists, including list archives, at: http://sourceforge.net/mail/? group_id=11118. + ------------------------------------------------------------------------------- 9. Privoxy Copyright, License and History @@ -2078,6 +2198,7 @@ Copyright Some source code is based on code Copyright © 1997 by Anonymous Coders and Junkbusters, Inc. and licensed under the GNU General Public License. + ------------------------------------------------------------------------------- 9.1. License @@ -2095,10 +2216,11 @@ is available from the Free Software Foundation, Inc, 59 Temple Place - Suite You should have received a copy of the GNU General Public License along with this program; if not, write to the - Free Software - Foundation, Inc. 59 Temple Place - Suite 330 - Boston, MA 02111-1307 - USA  + Free Software + Foundation, Inc. 59 Temple Place - Suite 330 + Boston, MA 02111-1307 + USA + ------------------------------------------------------------------------------- 9.2. History @@ -2126,8 +2248,9 @@ Then, some developers picked up the thread, and started turning the software inside out, upside down, and then reassembled it, adding many new features along the way. -The result of this is Privoxy, whose first stable release, 3.0, is due late -summer or early fall 2002. +The result of this is Privoxy, whose first stable release, 3.0, was released +August, 2002. + ------------------------------------------------------------------------------- 10. See also @@ -2146,6 +2269,9 @@ running for this to work. Shortcut: http://p.p/ http://www.privoxy.org/actions/, to submit "misses" to the developers. +http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ijbswa/contrib/, cool and fun +ideas from Privoxy users. + http://www.junkbusters.com/ht/en/cookies.html, an explanation how cookies are used to track web users. diff --git a/doc/text/faq.txt b/doc/text/faq.txt index e082ee57..185b97a6 100644 --- a/doc/text/faq.txt +++ b/doc/text/faq.txt @@ -2,8 +2,7 @@ Privoxy Frequently Asked Questions Copyright © 2001, 2002 by Privoxy Developers -$Id: faq.sgml,v 1.61.2.15 2002/08/10 11:34:22 oes Exp $ - +$Id: faq.sgml,v 1.61.2.18 2002/08/14 16:39:37 hal9 Exp $ This FAQ gives quick answers to frequently asked questions about Privoxy. It can't and doesn't replace the User Manual. @@ -18,13 +17,15 @@ networks. Privoxy is based on Internet Junkbuster (tm). Please note that this document is constantly evolving. This copy represents the -state at the release of version 2.9.20. You can find the latest version of the +state at the release of version 3.0.0. You can find the latest version of the document at http://www.privoxy.org/faq/. Please see the Contact section if you want to contact the developers. ------------------------------------------------------------------------------- + Table of Contents 1. General Information + 1.1. What is this new version of Privoxy? 1.2. Why "Privoxy"? Why a name change at all? 1.3. How does Privoxy differ from the old Junkbuster? @@ -35,14 +36,13 @@ Table of Contents at all? 1.8. Is there is a license or fee? What about a warranty? Registration? 1.9. I would like to help you, what do I do? + 1.9.1. Money Money Money 1.9.2. Software 1.9.3. You want to work with us? - - - 2. Installation + 2.1. Which browsers are supported by Privoxy? 2.2. Which operating systems are supported? 2.3. Can I install Privoxy over Junkbuster? @@ -51,13 +51,13 @@ Table of Contents 2.6. I just installed Privoxy, and nothing is happening. All the ads are there. What's wrong? - 3. Configuration + 3.1. Where can I get updated Actions Files? 3.2. Can I use my old config files? 3.3. What is an "actions" file? - 3.4. The "actions" concept confuses me. Please list some of these "actions" - . + 3.4. The "actions" concept confuses me. Please list some of these + "actions". 3.5. How are actions files configured? What is the easiest way to do this? 3.6. There are several different "actions" files. What are the differences? 3.7. How can I make my Yahoo/Hotmail/GMX account work? @@ -74,10 +74,12 @@ Table of Contents checkerboard image. Why and how do I get rid of this? 3.15. Can Privoxy run as a service on Win2K/NT? 3.16. How can I make Privoxy work with other proxies like Squid? - 3.17. Can Privoxy run as a "transparent" proxy? - + 3.17. Can I just set Privoxy to use port 80 and thus avoid individual + browser configuration? + 3.18. Can Privoxy run as a "transparent" proxy? 4. Miscellaneous + 4.1. How much does Privoxy slow my browsing down? This has to add extra time to browsing. 4.2. I noticed considerable delays in page requests compared to the old @@ -98,10 +100,14 @@ Table of Contents special precautions? 4.14. How can I temporarily disable Privoxy? 4.15. When "disabled" is Privoxy totally out of the picture? - 4.16. Where can I find more information about Privoxy and related issues? - + 4.16. My logs show Privoxy "crunches" ads, but also its own CGI pages. What + is a "crunch"? + 4.17. Can Privoxy effect files that I download from a webserver? FTP + server? + 4.18. Where can I find more information about Privoxy and related issues? 5. Troubleshooting + 5.1. I just upgraded and am getting "connection refused" with every web page? 5.2. I just added a new rule, but the steenkin ad is still getting through. @@ -110,27 +116,27 @@ Table of Contents 5.4. After installing Privoxy, I have to log in every time I start IE. What gives? 5.5. I cannot connect to any FTP sites. Privoxy seems to be blocking me. - 5.6. In Mac OSX, I can't configure Microsoft Internet Explorer to use + 5.6. In Mac OSX, I can't configure Microsoft Internet Explorer to use Privoxy as the HTTP proxy. 5.7. In Mac OSX, I dragged the Privoxy folder to the trash in order to uninstall it. Now the finder tells me I don't have sufficient privileges to empty the trash. - + 5.8. I get a completely blank page at one site. "View Source" shows only: + . 6. Contacting the developers, Bug Reporting and Feature Requests + 6.1. Get Support 6.2. Report Bugs 6.3. Request New Features 6.4. Report Ads or Other Actions-Related Problems 6.5. Other - 7. Privoxy Copyright, License and History + 7.1. License 7.2. History - - 1. General Information 1.1. What is this new version of Privoxy? @@ -158,8 +164,9 @@ Then, some developers picked up the thread, and started turning the software inside out, upside down, and then reassembled it, adding many new features along the way. -The result of this is Privoxy, whose first stable release, 3.0, is due late -summer or early fall 2002. +The result of this is Privoxy, whose first stable release, 3.0, was released +August, 2002. + ------------------------------------------------------------------------------- 1.2. Why "Privoxy"? Why a name change at all? @@ -167,18 +174,19 @@ summer or early fall 2002. Privoxy is the "Privacy Enhancing Proxy". Also, its content modification and junk suppression allow you to browse your "private edition" of the web. -Junkbusters Corporation continues to offer their original version of the +Junkbusters Corporation continues to offer their original version of the Internet Junkbuster, so publishing our Junkbuster-derived software under the same name led to confusion. -There are also potential legal complications from the continued use of the +There are also potential legal complications from the continued use of the Junkbuster name, which is a registered trademark of Junkbusters Corporation. There are, however, no objections from Junkbusters Corporation to the Privoxy project itself, and they, in fact, still share our ideals and goals. The developers also believed that there are so many changes from the original code, that it was time to make a clean break from the past and make a name in -their own right, especially now with the pending release of version 3.0. +their own right. + ------------------------------------------------------------------------------- 1.3. How does Privoxy differ from the old Junkbuster? @@ -189,53 +197,53 @@ helps protect your privacy. But, these are all enhanced, and many new features have been added, all in the same vein. The configuration has changed significantly as well. This is something that -users will notice right off the bat if upgrading from Junkbuster 2.0.x. The -"blocklist" "cookielist", "imagelist" and much more has been combined into the +users will notice right off the bat if upgrading from Junkbuster 2.0.x. The +"blocklist" "cookielist", "imagelist" and much more has been combined into the "actions" files, with a completely different syntax. See the note to upgraders for details. Privoxy's new features include: -  * Integrated browser based configuration and control utility at http:// + * Integrated browser based configuration and control utility at http:// config.privoxy.org/ (shortcut: http://p.p/). Browser-based tracing of rule and filter effects. Remote toggling. -  * Web page content filtering (removes banners based on size, invisible + * Web page content filtering (removes banners based on size, invisible "web-bugs", JavaScript and HTML annoyances, pop-up windows, etc.) -  * Modularized configuration that allows for standard settings and user + * Modularized configuration that allows for standard settings and user settings to reside in separate files, so that installing updated actions files won't overwrite individual user settings. -  * HTTP/1.1 compliant (but not all optional 1.1 features are supported). + * HTTP/1.1 compliant (but not all optional 1.1 features are supported). -  * Support for Perl Compatible Regular Expressions in the configuration files, + * Support for Perl Compatible Regular Expressions in the configuration files, and generally a more sophisticated and flexible configuration syntax over previous versions. -  * Improved cookie management features (e.g. session based cookies). + * Improved cookie management features (e.g. session based cookies). -  * GIF de-animation. + * GIF de-animation. -  * Bypass many click-tracking scripts (avoids script redirection). + * Bypass many click-tracking scripts (avoids script redirection). -  * Multi-threaded (POSIX and native threads). + * Multi-threaded (POSIX and native threads). -  * User-customizable HTML templates for all proxy-generated pages (e.g. + * User-customizable HTML templates for all proxy-generated pages (e.g. "blocked" page). -  * Auto-detection and re-reading of config file changes. + * Auto-detection and re-reading of config file changes. -  * Improved signal handling, and a true daemon mode (Unix). + * Improved signal handling, and a true daemon mode (Unix). -  * Every feature now controllable on a per-site or per-location basis, + * Every feature now controllable on a per-site or per-location basis, configuration more powerful and versatile over-all. -  * Many smaller new features added, limitations and bugs removed, and security + * Many smaller new features added, limitations and bugs removed, and security holes fixed. - ------------------------------------------------------------------------------- + 1.4. What is a "proxy"? How does Privoxy work? A web proxy is a service, based on a software such as Privoxy, that clients @@ -254,6 +262,7 @@ perfect position to filter outbound personal information that your browser is leaking, as well as inbound junk. It uses a variety of techniques to do this, all of which are under your control via the various configuration files and options. + ------------------------------------------------------------------------------- 1.5. How does Privoxy know what is an ad, and what is not? @@ -276,6 +285,7 @@ the first place. Both of this involves a certain amount of guesswork and is, of course, freely configurable. + ------------------------------------------------------------------------------- 1.6. Can Privoxy make mistakes? This does not sound very scientific. @@ -289,6 +299,7 @@ But this should not be a big concern since the Privoxy configuration is very flexible, and includes tools to help identify these types of situations so they can be addressed as needed, allowing you to customize your installation. (See the Troubleshooting section below.) + ------------------------------------------------------------------------------- 1.7. My browser does the same things as Privoxy. Why should I use Privoxy at @@ -301,6 +312,7 @@ can do a number of things that browsers just can't. In addition, a proxy is good choice if you use multiple browsers, or have a LAN with multiple computers. This way all the configuration is in one place, and you don't have to maintain a similar configuration for possibly many browsers. + ------------------------------------------------------------------------------- 1.8. Is there is a license or fee? What about a warranty? Registration? @@ -311,8 +323,9 @@ Please see the Copyright section for more information on the license and copyright. Or the LICENSE file that should be included. There is no warranty of any kind, expressed, implied or otherwise. That is -something that would cost real money ;-) There is no registration either. +something that would cost real money ;-) There is no registration either. Privoxy really is free in every respect! + ------------------------------------------------------------------------------- 1.9. I would like to help you, what do I do? @@ -323,6 +336,7 @@ We, of course, welcome donations and could use money for domain registering, buying software to test Privoxy with, and, of course, for regular world-wide get-togethers (hahaha). If you enjoy the software and feel like helping us with a donation, just drop us a note. + ------------------------------------------------------------------------------- 1.9.2. Software @@ -332,6 +346,7 @@ proxy, and would like us to ensure that Privoxy runs smoothly with your product, you might consider supplying us with a copy or license. We can't, however, guarantee that we will fix all potential compatibility issues as a result. + ------------------------------------------------------------------------------- 1.9.3. You want to work with us? @@ -343,6 +358,7 @@ Developer's Manual. Once we have added you to the team, you'll have write access to the CVS repository, and together we'll find a suitable task for you. + ------------------------------------------------------------------------------- 2. Installation @@ -353,6 +369,7 @@ Any browser that can be configured to use a proxy, which should be virtually all browsers. Direct browser support is not necessary since Privoxy runs as a separate application and talks to the browser in the standardized HTTP protocol, just like a web server does. + ------------------------------------------------------------------------------- 2.2. Which operating systems are supported? @@ -361,13 +378,14 @@ At present, Privoxy is known to run on Windows(95, 98, ME, 2000, XP), Linux (RedHat, SuSE, Debian, Conectiva, Gentoo), Mac OSX, OS/2, AmigaOS, BeOS, FreeBSD, NetBSD, Solaris, and many more flavors of Unix. -But any operating system that runs TCP/IP, can conceivably take advantage of +But any operating system that runs TCP/IP, can conceivably take advantage of Privoxy in a networked situation where Privoxy would run as a server on a LAN gateway. Then only the "gateway" needs to be running one of the above operating systems. Source code is freely available, so porting to other operating systems is always a possibility. + ------------------------------------------------------------------------------- 2.3. Can I install Privoxy over Junkbuster? @@ -379,6 +397,7 @@ you will need to manually port your old patterns. See the note to upgraders and installation chapter in the user manual for details. Note: Some installers may automatically un-install Junkbuster, if present! + ------------------------------------------------------------------------------- 2.4. I just installed Privoxy. Is there anything special I have to do now? @@ -387,6 +406,7 @@ All browsers must be told to use Privoxy as a proxy by specifying the correct proxy address and port number in the appropriate configuration area for the browser. See below. You should also flush your browser's memory and disk cache to get rid of any cached junk items. + ------------------------------------------------------------------------------- 2.5. What is the proxy address of Privoxy? @@ -398,18 +418,19 @@ by every computer on the Internet to refer to itself) and the port will be 8118 (unless you have Privoxy to run on a different port with the listen-address config option). -When configuring your browser's proxy settings you typically enter the word -"localhost" or the IP address "127.0.0.1" in the boxes next to "HTTP" and +When configuring your browser's proxy settings you typically enter the word +"localhost" or the IP address "127.0.0.1" in the boxes next to "HTTP" and "Secure" (HTTPS) and then the number "8118" for "port". This tells your browser to send all web requests to Privoxy instead of directly to the Internet. Privoxy can also be used to proxy for a Local Area Network. In this case, your would enter either the IP address of the LAN host where Privoxy is running, or -the equivalent hostname. Port assignment would be same as above. Note that +the equivalent hostname. Port assignment would be same as above. Note that Privoxy doesn't listen on any LAN interfaces by default. Privoxy does not currently handle protocols such as FTP, SMTP, IM, IRC, ICQ, or other Internet protocols. + ------------------------------------------------------------------------------- 2.6. I just installed Privoxy, and nothing is happening. All the ads are there. @@ -425,6 +446,7 @@ good to go. If you receive a page saying "Privoxy is not running", then the browser is not set up to use your Privoxy installation. If you receive anything else (probably nothing at all), it could either be that the browser is not set up correctly, or that Privoxy is not running at all. Check the log file. + ------------------------------------------------------------------------------- 3. Configuration @@ -434,9 +456,10 @@ up correctly, or that Privoxy is not running at all. Check the log file. Based on your feedback and the continuing development, updated actions files will be made available on the files section of our project page. -If you wish to receive an email notification whenever we release updates of +If you wish to receive an email notification whenever we release updates of Privoxy or the actions file, subscribe to our announce mailing list, ijbswa-announce@lists.sourceforge.net. + ------------------------------------------------------------------------------- 3.2. Can I use my old config files? @@ -448,6 +471,7 @@ will need to port your configuration data to the new format. Note that even the pattern syntax has changed! Even configuration files from the 2.9.x versions will need to be adapted, as configuration syntax has been very much in flow in the 2.9.x series. + ------------------------------------------------------------------------------- 3.3. What is an "actions" file? @@ -464,6 +488,7 @@ actions that might apply to any given site. As an example, if you are blocking cookies as one of your default actions, but need to accept cookies from a given site, you would need to define an exception for this site in one of your actions files, preferably in user.action + ------------------------------------------------------------------------------- 3.4. The "actions" concept confuses me. Please list some of these "actions". @@ -471,14 +496,16 @@ actions files, preferably in user.action For a comprehensive discussion of the actions concept, please refer to the actions file chapter in the user manual. It includes a list of all actions and an actions file tutorial to get you started. + ------------------------------------------------------------------------------- 3.5. How are actions files configured? What is the easiest way to do this? Actions files are just text files in a special syntax and can be edited with a -text editor. The probably easiest way is to access Privoxy's user interface +text editor. But probably the easiest way is to access Privoxy's user interface with your web browser at http://config.privoxy.org/ (Shortcut: http://p.p/) and then select "View & change the current configuration" from the menu. + ------------------------------------------------------------------------------- 3.6. There are several different "actions" files. What are the differences? @@ -493,6 +520,7 @@ manual for a more detailed explanation. Earlier versions included three different versions of the default.action file. The new scheme allows for greater flexibility of local configuration, and for browser based selection of pre-defined "aggressiveness" levels. + ------------------------------------------------------------------------------- 3.7. How can I make my Yahoo/Hotmail/GMX account work? @@ -508,6 +536,7 @@ yahoo might look like: # { -crunch-incoming-cookies -crunch-outgoing-cookies -session-cookies-only } .login.yahoo.com + ------------------------------------------------------------------------------- 3.8. What's the difference between the "Cautious", "Medium" and "Advanced" @@ -520,51 +549,53 @@ table shows you, which of the most important features are enabled in each configuration: Table 1. Default Configurations -+-------------------+------------------+-------------------+------------------+ + ++-----------------------------------------------------------------------------+ |Feature |Cautious |Intermadiate |Advanced | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |Ad-blocking by URL |yes |yes |yes | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |Ad-filtering by |yes |yes |yes | |size | | | | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |GIF de-animation |no |yes |yes | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |Referer forging |no |yes |yes | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |Cookie handling |none |session-only |kill | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |Pop-up killing |no |yes |yes | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |Fast redirects |no |no |yes | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |HTML taming |yes |yes |yes | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |JavaScript taming |yes |yes |yes | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |Web-bug killing |yes |yes |yes | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |Fun text |no |no |yes | |replacements | | | | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |Image tag |no |no |yes | |reordering | | | | -+-------------------+------------------+-------------------+------------------+ +|-------------------+------------------+-------------------+------------------| |Ad-filtering by |no |no |yes | |link | | | | -+-------------------+------------------+-------------------+------------------+ ++-----------------------------------------------------------------------------+ Where the defaults are likely to break some sites, exceptions for known popular "problem" sites are included, but in general, the more aggressive your default settings are, the more exceptions you will have to make later. See the user manual for a more deatiled discussion. + ------------------------------------------------------------------------------- 3.9. Why can I change the configuration with a browser? Does that not raise security issues? It may seem strange that regular users can edit the config files with their -browsers, although the whole /etc/privoxy hierarchy belongs to the user +browsers, although the whole /etc/privoxy hierarchy belongs to the user "privoxy", with only 644 permissions. When you use the browser-based editor, Privoxy itself is writing to the config @@ -576,9 +607,10 @@ probably want to turn the web-based editor and remote toggle features off by setting "enable-edit-actions 0" and "enable-remote-toggle 0" in the main configuration file. -Note that in the default configuration, only local users (i.e. those on +Note that in the default configuration, only local users (i.e. those on "localhost") can connect to Privoxy, so this is not (normally) a security problem. + ------------------------------------------------------------------------------- 3.10. What is the default.filter file? What is a "filter"? @@ -599,6 +631,7 @@ regular expressions and HTML/HTTP. Presently, there is no GUI editor option for this part of the configuration, but you can disable/enable the various pre-defined filters of the included default.filter file with the web-based actions file editor. + ------------------------------------------------------------------------------- 3.11. How can I set up Privoxy to act as a proxy for my LAN? @@ -618,6 +651,7 @@ to use this address and port number. If you run Privoxy on a LAN with untrusted users, we recommend that you double-check the access control and security options! + ------------------------------------------------------------------------------- 3.12. Instead of ads, now I get a checkerboard pattern. I don't want to see @@ -629,9 +663,10 @@ image (aka "blank"), or a redirect to a custom image of your choice. Note that this choice only has effect for images which are blocked as images, i.e. whose URLs match both a handle-as-image and block action. -If you want to see nothing, then change the set-image-blocker action to "blank" -. This can be done by editing the default.action file, or trough the web-based -actions file editor. +If you want to see nothing, then change the set-image-blocker action to +"blank". This can be done by editing the default.action file, or trough the +web-based actions file editor. + ------------------------------------------------------------------------------- 3.13. Why would anybody want to see a checkerboard pattern? @@ -642,6 +677,7 @@ can and will make errors. The checkerboard image is visually decent, but it shows you that and where images were blocked, which can be very helpful in case some navigation aid or otherwise innocent image was erraneously blocked. Some people might also enjoy seeing how many banners they don't have to see.. + ------------------------------------------------------------------------------- 3.14. I see some images being replaced by a text instead of the checkerboard @@ -664,6 +700,7 @@ why" link offered in the substitute page will show you which rule blocked the page. After changing the rule and un-blocking the HTML documents, the browser will try to load the actual banner images and the usual image blocking will (hopefully!) kick in. + ------------------------------------------------------------------------------- 3.15. Can Privoxy run as a service on Win2K/NT? @@ -675,6 +712,7 @@ You can have one or the other, but not both at this time :( There is a pending feature request for this functionality. See the discussion at http://sourceforge.net/tracker/?func=detail&atid=361118&aid=485617&group_id= 11118, for details, and a sample configuration. + ------------------------------------------------------------------------------- 3.16. How can I make Privoxy work with other proxies like Squid? @@ -682,9 +720,18 @@ at http://sourceforge.net/tracker/?func=detail&atid=361118&aid=485617&group_id= This can be done and is often useful to combine the benefits of Privoxy with those of a caching proxy. See the forwarding chapter in the user manual which describes how to do this. + ------------------------------------------------------------------------------- -3.17. Can Privoxy run as a "transparent" proxy? +3.17. Can I just set Privoxy to use port 80 and thus avoid individual browser +configuration? + +No, its more complicated than that. This only works with special kinds of +proxies known as "transparent" proxies (see below). + +------------------------------------------------------------------------------- + +3.18. Can Privoxy run as a "transparent" proxy? No, Privoxy currently does not have this ability, though it is planned for a future release. Transparent proxies require special handling of the request @@ -693,6 +740,7 @@ headers beyond what Privoxy is now capable of. Chaining Privoxy behind another proxy that has this ability should work though. See the forwarding chapter in the user manual. As a transparent proxy to be used for chaining we recommend Transproxy (http://www.transproxy.nlc.net.au/). + ------------------------------------------------------------------------------- 4. Miscellaneous @@ -709,6 +757,7 @@ more than offset by time saved not downloading and rendering ad images. "Filtering" content via the filter or deanimate-gifs actions may cause a perceived slowdown, since the entire document needs to be buffered before displaying. See below. + ------------------------------------------------------------------------------- 4.2. I noticed considerable delays in page requests compared to the old @@ -725,6 +774,7 @@ content, giving the user a feeling of "it works". This effect is especially noticeable on slow dialup connections. Filtering is automatically disabled for inappropriate MIME types. + ------------------------------------------------------------------------------- 4.3. What are "http://config.privoxy.org/" and "http://p.p/"? @@ -749,19 +799,22 @@ built-in editor for the actions files. Note that the built-in URLs from earlier versions of Junkbuster / Privoxy, http://example.com/show-proxy-args and http://i.j.b/, are no longer supported. If you still use such an old version, you should really consider upgrading to -2.9.20. +3.0.0. + ------------------------------------------------------------------------------- 4.4. Do you still maintain the blocklists? No. The patterns for blocking now reside (among other things) in the actions files, which are actively maintained instead. See next question ... + ------------------------------------------------------------------------------- 4.5. How can I submit new ads? Yes, absolutely! Please see the Contact section for how to do that. Please note that you (technically) need the latest Privoxy version for this to work. + ------------------------------------------------------------------------------- 4.6. How can I hide my IP address? @@ -788,6 +841,7 @@ index_en.html. There is, however, even in the single-machine case the possibility to make the server believe that your machine is in fact a shared proxy serving a whole big LAN, and we are looking into that. + ------------------------------------------------------------------------------- 4.7. Can Privoxy guarantee I am anonymous? @@ -812,6 +866,7 @@ agreement. It's impossible to anticipate and prevent every breach of privacy that might occur. The professionally paranoid prefer browsers available as source code, because anticipating their behavior is easier. Trust the source, Luke! + ------------------------------------------------------------------------------- 4.8. Might some things break because header information or content is being @@ -843,6 +898,7 @@ elements. If you have problems with a site, you will have to adjust your configuration accordingly. Cookies are probably the most likely adjustment that may be required, but by no means the only one. + ------------------------------------------------------------------------------- 4.9. Can Privoxy act as a "caching" proxy to speed up web browsing? @@ -850,6 +906,7 @@ required, but by no means the only one. No, it does not have this ability at all. You want something like Squid for this. And, yes, before you ask, Privoxy can co-exist with other kinds of proxies like Squid. See the forwarding chapter in the user manual for details. + ------------------------------------------------------------------------------- 4.10. What about as a firewall? Can Privoxy protect me? @@ -857,6 +914,7 @@ proxies like Squid. See the forwarding chapter in the user manual for details. Not in the way you mean, or in the way a true firewall can. Privoxy can help protect your privacy, but not protect you from intrusion attempts. It is, of course, perfectly possible and recommended to use both. + ------------------------------------------------------------------------------- 4.11. I have large empty spaces / a checkerboard pattern now where ads used to @@ -876,12 +934,13 @@ visual trace complicates troubleshooting. So we won't support this in the default configuration, but you can of course define appropriate filters yourself. + ------------------------------------------------------------------------------- 4.12. How can Privoxy filter Secure (HTTPS) URLs? Since secure HTTP connections are encrypted SSL sessions between your browser -and the secure site, and are meant to be reliably secure, there is little that +and the secure site, and are meant to be reliably secure, there is little that Privoxy can do but hand the raw gibberish data though from one end to the other unprocessed. @@ -895,12 +954,13 @@ seem, since ad sources are often identifiable by the host name, and often the banners to be placed in an encrypted page come unencrypted nonetheless for efficiency reasons, which exposes them to the full power of Privoxy's ad blocking. + ------------------------------------------------------------------------------- 4.13. Privoxy runs as a "server". How secure is it? Do I need to take any special precautions? -There are no known exploits that might affect Privoxy. On Unix-like systems, +There are no known exploits that might affect Privoxy. On Unix-like systems, Privoxy can run as a non-privileged user, which is how we recommend it be run. Also, by default Privoxy only listens to requests from "localhost" only. The server aspect of Privoxy is not itself directly exposed to the Internet in this @@ -912,6 +972,7 @@ hosts can then use this as their proxy address in the browser proxy configuration, but Privoxy will not listen on any external interfaces. ACLs can be defined in addition, and using a firewall is always good too. Better safe than sorry. + ------------------------------------------------------------------------------- 4.14. How can I temporarily disable Privoxy? @@ -919,6 +980,7 @@ than sorry. The easiest way is to access Privoxy with your browser by using the remote toggle URL: http://config.privoxy.org/toggle. See the Bookmarklets section of the User Manual for an easy way to access this feature. + ------------------------------------------------------------------------------- 4.15. When "disabled" is Privoxy totally out of the picture? @@ -927,9 +989,43 @@ No, this just means all filtering and actions are disabled. Privoxy is still acting as a proxy, but just not doing any of the things that Privoxy would normally be expected to do. It is still a "middle-man" in the interaction between your browser and web sites. + +------------------------------------------------------------------------------- + +4.16. My logs show Privoxy "crunches" ads, but also its own CGI pages. What is +a "crunch"? + +A "crunch" simply means Privoxy intercepted something, nothing more. Often this +is indeed ads or banners, but Privoxy uses the same mechanism for trapping +requests for its own internal pages. For instance, a request for Privoxy's +configuration page at: http://config.privoxy.org, is intercepted (i.e. it does +not go out to the 'net), and the familiar CGI configuration is returned to the +browser, and the log consequently will show a "crunch". + +------------------------------------------------------------------------------- + +4.17. Can Privoxy effect files that I download from a webserver? FTP server? + +From the webserver's perspective, there is no difference between viewing a +document (i.e. a page), and downloading a file. The same is true of Privoxy. If +there is a match for a block pattern, it will still be blocked, and of course +this is obvious. Filtering is potentially more of a concern since the results +are not always so obvious. + +Privoxy knows the differences in files according to the "Document Type" as +reported by the webserver. If this is reported accurately (e.g. "application/ +zip" for a zip archive), then Privoxy knows to ignore these where appropriate. +It is possible, however, that documents that are of an unknown type (generally +assumed to be "text/plain") will be filtered, as will those that might be +incorrectly reported by the webserver. If such a file is a downloaded file that +is intended to be saved to disk, then any content that might have been altered +by filtering, will be saved too, for these (probably very rare) cases. + +Privoxy does not do FTP at all, only HTTP protocols. + ------------------------------------------------------------------------------- -4.16. Where can I find more information about Privoxy and related issues? +4.18. Where can I find more information about Privoxy and related issues? Other references and sites of interest to Privoxy users: @@ -945,6 +1041,9 @@ running for this to work. Shortcut: http://p.p/ http://www.privoxy.org/actions/, to submit "misses" to the developers. +http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ijbswa/contrib/, cool and fun +ideas from Privoxy users. + http://www.junkbusters.com/ht/en/cookies.html, an explanation how cookies are used to track web users. @@ -962,6 +1061,7 @@ together with Privoxy. http://www.privoxy.org/developer-manual/, the Privoxy developer manual. ------------------------------------------------------------------------------- + 5. Troubleshooting 5.1. I just upgraded and am getting "connection refused" with every web page? @@ -974,6 +1074,7 @@ changed to port 8118 now, due to a conflict with NAS (Network Audio Service), which uses port 8000. If you haven't, you need to change your browser to the new port number, or alternately change the listen-address option in Privoxy's main configuration file. + ------------------------------------------------------------------------------- 5.2. I just added a new rule, but the steenkin ad is still getting through. @@ -987,6 +1088,7 @@ thing to do is try flushing the browser's caches. And then try again. If this doesn't help, you probably have an error in the rule you applied. Try pasting the full URL of the offending ad into http://config.privoxy.org/ show-url-info and see if it really matches your new rule. + ------------------------------------------------------------------------------- 5.3. One of my favorite sites does not work with Privoxy. What can I do? @@ -1019,6 +1121,7 @@ lower your privacy and protection more than necessary, Troubleshooting actions is discussed in more detail in the user-manual appendix . There is also an actions tutorial. + ------------------------------------------------------------------------------- 5.4. After installing Privoxy, I have to log in every time I start IE. What @@ -1054,6 +1157,7 @@ your system it may not perform as you expect, and prompt you for the password. Just set and save the password again and all should be OK. [Thanks to Ray Griffith for this submission.] + ------------------------------------------------------------------------------- 5.5. I cannot connect to any FTP sites. Privoxy seems to be blocking me. @@ -1061,6 +1165,7 @@ Just set and save the password again and all should be OK. Privoxy cannot act as a proxy for FTP traffic, so do not configure your browser to use Privoxy as an FTP proxy. The same is true for any protocol other than HTTP or HTTPS. + ------------------------------------------------------------------------------- 5.6. In Mac OSX, I can't configure Microsoft Internet Explorer to use Privoxy @@ -1072,13 +1177,14 @@ on the Network icon. In the settings pane that comes up, click on the Proxies tab. Ensure the "Web Proxy (HTTP)" checkbox is checked and enter 127.0.0.1 in the entry field. Enter 8118 in the Port field. The next time you start IE, it should reflect these values. + ------------------------------------------------------------------------------- 5.7. In Mac OSX, I dragged the Privoxy folder to the trash in order to uninstall it. Now the finder tells me I don't have sufficient privileges to empty the trash. -Just dragging the Privoxy folder to the trash is not enough to delete it. +Just dragging the Privoxy folder to the trash is not enough to delete it. Privoxy supplies an uninstall.command file that takes care of these details. Open the trash, drag the uninstall.command file out of the trash and double-click on it. You will be prompted for confirmation and the @@ -1086,6 +1192,26 @@ administration password. The trash may still appear full after this command; emptying the trash from the desktop should make it appear empty again. + +------------------------------------------------------------------------------- + +5.8. I get a completely blank page at one site. "View Source" shows only: +. + +This is often the result of a webserver using PHP that mishandles the request +Privoxy sends to not compress the content (a PHP bug). + +In a default configuration, Privoxy requests all data be sent "uncompressed". +This is required for the page filtering and other magic to work. In some rare +cases, the browser and webserver miscommunicate and the result is a totally +blank page. The suggested work around is to selectively turn off this feature +for sites that exhibit such behavior. Example section for user.action: + + # Make exceptions for ill-behaved sites: + # + {-prevent-compression} + .example.com + ------------------------------------------------------------------------------- 6. Contacting the developers, Bug Reporting and Feature Requests @@ -1093,6 +1219,7 @@ desktop should make it appear empty again. We value your feedback. In fact, we rely on it to improve Privoxy and its configuration. However, please note the following hints, so we can provide you with the best support: + ------------------------------------------------------------------------------- 6.1. Get Support @@ -1102,6 +1229,7 @@ http://sourceforge.net/tracker/?group_id=11118&atid=211118 All users are of course welcome to discuss their issues on the users mailing list, where the developers also hang around. + ------------------------------------------------------------------------------- 6.2. Report Bugs @@ -1122,6 +1250,7 @@ If not using the latest version, chances are that the bug has been found and fixed in the meantime. We would appreciate if you could take the time to upgrade to the latest version (or even the latest CVS snapshot) and verify your bug, but this is not required for reporting. + ------------------------------------------------------------------------------- 6.3. Request New Features @@ -1129,6 +1258,7 @@ bug, but this is not required for reporting. You are welcome to submit ideas on new features or other proposals for improvement through our feature request tracker at http://sourceforge.net/ tracker/?atid=361118&group_id=11118. + ------------------------------------------------------------------------------- 6.4. Report Ads or Other Actions-Related Problems @@ -1142,6 +1272,7 @@ troubled site and even pre-fill the form! New, improved default.action files will occasionally be made available based on your feedback. These will be announced on the ijbswa-announce list and available from our the files section of our project page. + ------------------------------------------------------------------------------- 6.5. Other @@ -1151,6 +1282,7 @@ interested users and people who wish to contribute to the project are also welcome on the developers list! You can find an overview of all Privoxy-related mailing lists, including list archives, at: http://sourceforge.net/mail/? group_id=11118. + ------------------------------------------------------------------------------- 7. Privoxy Copyright, License and History @@ -1162,6 +1294,7 @@ Junkbusters, Inc. and licensed under the GNU General Public License. Portions of this document are "borrowed" from the original Junkbuster (tm) FAQ, and modified as appropriate for Privoxy. + ------------------------------------------------------------------------------- 7.1. License @@ -1179,10 +1312,11 @@ is available from the Free Software Foundation, Inc, 59 Temple Place - Suite You should have received a copy of the GNU General Public License along with this program; if not, write to the - Free Software - Foundation, Inc. 59 Temple Place - Suite 330 - Boston, MA 02111-1307 - USA  + Free Software + Foundation, Inc. 59 Temple Place - Suite 330 + Boston, MA 02111-1307 + USA + ------------------------------------------------------------------------------- 7.2. History @@ -1210,5 +1344,6 @@ Then, some developers picked up the thread, and started turning the software inside out, upside down, and then reassembled it, adding many new features along the way. -The result of this is Privoxy, whose first stable release, 3.0, is due late -summer or early fall 2002. +The result of this is Privoxy, whose first stable release, 3.0, was released +August, 2002. + diff --git a/doc/text/user-manual.txt b/doc/text/user-manual.txt index add13530..cb60c2bb 100644 --- a/doc/text/user-manual.txt +++ b/doc/text/user-manual.txt @@ -1,9 +1,8 @@ -Privoxy 2.9.20 User Manual +Privoxy 3.0.0 User Manual Copyright © 2001, 2002 by Privoxy Developers -$Id: user-manual.sgml,v 1.123.2.16 2002/08/09 19:20:54 david__schmidt Exp $ - +$Id: user-manual.sgml,v 1.123.2.18 2002/08/22 23:47:58 hal9 Exp $ The User Manual gives users information on how to install, configure and use Privoxy. @@ -21,13 +20,16 @@ You can find the latest version of the User Manual at http://www.privoxy.org/ user-manual/. Please see the Contact section on how to contact the developers. ------------------------------------------------------------------------------- + Table of Contents 1. Introduction - 1.1. Features + 1.1. Features 2. Installation + 2.1. Binary Packages + 2.1.1. Red Hat, SuSE and Conectiva RPMs 2.1.2. Debian 2.1.3. Windows @@ -37,17 +39,16 @@ Table of Contents 2.1.7. AmigaOS 2.1.8. Gentoo - 2.2. Building from Source 2.3. Keeping your Installation Up-to-Date - 3. Note to Upgraders 4. Quickstart to Using Privoxy - 4.1. Quickstart to Ad Blocking + 4.1. Quickstart to Ad Blocking 5. Starting Privoxy + 5.1. Red Hat and Conectiva 5.2. Debian 5.3. SuSE @@ -59,14 +60,15 @@ Table of Contents 5.9. Gentoo 5.10. Command Line Options - 6. Privoxy Configuration + 6.1. Controlling Privoxy with Your Web Browser 6.2. Configuration Files Overview - 7. The Main Configuration File + 7.1. Configuration and Log File Locations + 7.1.1. confdir 7.1.2. logdir 7.1.3. actionsfile @@ -75,20 +77,20 @@ Table of Contents 7.1.6. jarfile 7.1.7. trustfile - 7.2. Local Set-up Documentation + 7.2.1. user-manual 7.2.2. trust-info-url 7.2.3. admin-address 7.2.4. proxy-info-url - 7.3. Debugging + 7.3.1. debug 7.3.2. single-threaded - 7.4. Access Control and Security + 7.4.1. listen-address 7.4.2. toggle 7.4.3. enable-remote-toggle @@ -96,27 +98,26 @@ Table of Contents 7.4.5. ACLs: permit-access and deny-access 7.4.6. buffer-limit - 7.5. Forwarding + 7.5.1. forward 7.5.2. forward-socks4 and forward-socks4a 7.5.3. Advanced Forwarding Examples - 7.6. Windows GUI Options - 8. Actions Files + 8.1. Finding the Right Mix 8.2. How to Edit 8.3. How Actions are Applied to URLs 8.4. Patterns - 22  + 8.4.1. The Domain Pattern 8.4.2. The Path Pattern - 8.5. Actions + 8.5.1. add-header 8.5.2. block 8.5.3. crunch-incoming-cookies @@ -139,106 +140,94 @@ Table of Contents 8.5.20. set-image-blocker 8.5.21. Summary - 8.6. Aliases 8.7. Actions Files Tutorial + 8.7.1. default.action 8.7.2. user.action - - - 9. The Filter File - 9.1. Filter File Tutorial + 9.1. Filter File Tutorial 10. Templates 11. Contacting the Developers, Bug Reporting and Feature Requests + 11.1. Get Support 11.2. Report Bugs 11.3. Request New Features 11.4. Report Ads or Other Actions-Related Problems 11.5. Other - 12. Privoxy Copyright, License and History + 12.1. License 12.2. History 12.3. Authors - 13. See Also 14. Appendix + 14.1. Regular Expressions 14.2. Privoxy's Internal Pages - 14.2.1. Bookmarklets + 14.2.1. Bookmarklets 14.3. Chain of Events 14.4. Anatomy of an Action - - 1. Introduction -This documentation is included with the current beta version of Privoxy, -v.2.9.20, and is mostly complete at this point. The most up to date reference -for the time being is still the comments in the source files and in the -individual configuration files. Development of version 3.0 is currently nearing -completion, and includes many significant changes and enhancements over earlier -versions. The target release date for stable v3.0 is "soon" ;-). +This documentation is included with the current stable version of Privoxy, +v.3.0.0. -Since this is a beta version, not all new features are well tested. This -documentation may be slightly out of sync as a result (especially with CVS -sources). And there may be bugs, though hopefully not many! ------------------------------------------------------------------------------- 1.1. Features In addition to Internet Junkbuster's traditional features of ad and banner -blocking and cookie management, Privoxy provides new features, some of them -currently under development: +blocking and cookie management, Privoxy provides new features: -  * Integrated browser based configuration and control utility at http:// + * Integrated browser based configuration and control utility at http:// config.privoxy.org/ (shortcut: http://p.p/). Browser-based tracing of rule and filter effects. Remote toggling. -  * Web page content filtering (removes banners based on size, invisible + * Web page content filtering (removes banners based on size, invisible "web-bugs", JavaScript and HTML annoyances, pop-up windows, etc.) -  * Modularized configuration that allows for standard settings and user + * Modularized configuration that allows for standard settings and user settings to reside in separate files, so that installing updated actions files won't overwrite individual user settings. -  * HTTP/1.1 compliant (but not all optional 1.1 features are supported). + * HTTP/1.1 compliant (but not all optional 1.1 features are supported). -  * Support for Perl Compatible Regular Expressions in the configuration files, + * Support for Perl Compatible Regular Expressions in the configuration files, and generally a more sophisticated and flexible configuration syntax over previous versions. -  * Improved cookie management features (e.g. session based cookies). + * Improved cookie management features (e.g. session based cookies). -  * GIF de-animation. + * GIF de-animation. -  * Bypass many click-tracking scripts (avoids script redirection). + * Bypass many click-tracking scripts (avoids script redirection). -  * Multi-threaded (POSIX and native threads). + * Multi-threaded (POSIX and native threads). -  * User-customizable HTML templates for all proxy-generated pages (e.g. + * User-customizable HTML templates for all proxy-generated pages (e.g. "blocked" page). -  * Auto-detection and re-reading of config file changes. + * Auto-detection and re-reading of config file changes. -  * Improved signal handling, and a true daemon mode (Unix). + * Improved signal handling, and a true daemon mode (Unix). -  * Every feature now controllable on a per-site or per-location basis, + * Every feature now controllable on a per-site or per-location basis, configuration more powerful and versatile over-all. -  * Many smaller new features added, limitations and bugs removed, and security + * Many smaller new features added, limitations and bugs removed, and security holes fixed. - ------------------------------------------------------------------------------- + 2. Installation Privoxy is available both in convenient pre-compiled packages for a wide range @@ -250,16 +239,18 @@ you will need to remove it. On some platforms, this may be done for you as part of their installation procedure. (See below for your platform). In any case be sure to backup your old configuration if it is valuable to you. See the note to upgraders section below. + ------------------------------------------------------------------------------- 2.1. Binary Packages How to install the binary packages depends on your operating system: + ------------------------------------------------------------------------------- 2.1.1. Red Hat, SuSE and Conectiva RPMs -RPMs can be installed with rpm -Uvh privoxy-2.9.20-1.rpm, and will use /etc/ +RPMs can be installed with rpm -Uvh privoxy-3.0.0-1.rpm, and will use /etc/ privoxy for the location of configuration files. Note that on Red Hat, Privoxy will not be automatically started on system boot. @@ -267,18 +258,20 @@ You will need to enable that using chkconfig, ntsysv, or similar methods. Note that SuSE will automatically start Privoxy in the boot process. If you have problems with failed dependencies, try rebuilding the SRC RPM: rpm ---rebuild privoxy-2.9.20-1.src.rpm. This will use your locally installed +--rebuild privoxy-3.0.0-1.src.rpm. This will use your locally installed libraries and RPM version. Also note that if you have a Junkbuster RPM installed on your system, you need to remove it first, because the packages conflict. Otherwise, RPM will try to remove Junkbuster automatically, before installing Privoxy. + ------------------------------------------------------------------------------- 2.1.2. Debian -DEBs can be installed with dpkg -i privoxy_2.9.20-1.deb, and will use /etc/ +DEBs can be installed with dpkg -i privoxy_3.0.0-1.deb, and will use /etc/ privoxy for the location of configuration files. + ------------------------------------------------------------------------------- 2.1.3. Windows @@ -286,12 +279,14 @@ privoxy for the location of configuration files. Just double-click the installer, which will guide you through the installation process. You will find the configuration files in the same directory as you installed Privoxy in. We do not use the registry of Windows. + ------------------------------------------------------------------------------- 2.1.4. Solaris, NetBSD, FreeBSD, HP-UX Create a new directory, cd to it, then unzip and untar the archive. For the most part, you'll have to figure out where things go. + ------------------------------------------------------------------------------- 2.1.5. OS/2 @@ -307,6 +302,7 @@ starts. The directory you choose to install Privoxy into will contain all of the configuration files. + ------------------------------------------------------------------------------- 2.1.6. Mac OSX @@ -325,6 +321,7 @@ Privoxy folder. Or, type this command in the Terminal: You will be prompted for the administrator password. + ------------------------------------------------------------------------------- 2.1.7. AmigaOS @@ -332,6 +329,7 @@ You will be prompted for the administrator password. Copy and then unpack the lha archive to a suitable location. All necessary files will be installed into Privoxy directory, including all configuration and log files. To uninstall, just remove this directory. + ------------------------------------------------------------------------------- 2.1.8. Gentoo @@ -345,7 +343,8 @@ latest changes from the Portage tree. With emerge privoxy you install the latest version. Configuration files are in /etc/privoxy, the documentation is in /usr/share/doc -/privoxy-2.9.20 and the Log directory is in /var/log/privoxy. +/privoxy-3.0.0 and the Log directory is in /var/log/privoxy. + ------------------------------------------------------------------------------- 2.2. Building from Source @@ -363,8 +362,8 @@ compiler like gcc are required. When building from a source tarball (either release version or nightly CVS tarball), first unpack the source: - tar xzvf privoxy-2.9.20-beta-src* [.tgz or .tar.gz] - cd privoxy-2.9.20-beta + tar xzvf privoxy-3.0.0-src* [.tgz or .tar.gz] + cd privoxy-3.0.0 For retrieving the current CVS sources, you'll need CVS installed. Note that sources from CVS are development quality, and may not be stable, or well @@ -387,6 +386,14 @@ Then, in either case, to build from unpacked tarball or CVS source: make -n install # (to see where all the files will go) make install # (to really install) ++-----------------------------------------------------------------------------+ +| Warning | +|-----------------------------------------------------------------------------| +|The "make install" target is temporary quite broken! It is recommended to use| +|a binary package, or do a source build, and manually install the components. | +|Sorry. | ++-----------------------------------------------------------------------------+ + If you have gnu make, you can have the first four steps automatically done for you by just typing: @@ -397,6 +404,7 @@ in the freshly downloaded or unpacked source directory. For more detailed instructions on how to build Redhat and SuSE RPMs, Windows self-extracting installers, building on platforms with special requirements etc, please consult the developer manual. + ------------------------------------------------------------------------------- 2.3. Keeping your Installation Up-to-Date @@ -405,7 +413,7 @@ As user feedback comes in and development continues, we will make updated versions of both the main actions file (as a separate package) and the software itself (including the actions file) available for download. -If you wish to receive an email notification whenever we release updates of +If you wish to receive an email notification whenever we release updates of Privoxy or the actions file, subscribe to our announce mailing list, ijbswa-announce@lists.sourceforge.net. @@ -413,6 +421,7 @@ In order not to loose your personal changes and adjustments when updating to the latest default.action file we strongly recommend that you use user.action for your customization of Privoxy. See the Chapter on actions files for details. + ------------------------------------------------------------------------------- 3. Note to Upgraders @@ -438,50 +447,50 @@ files. A quick list of things to be aware of before upgrading: -  * The default listening port is now 8118 due to a conflict with another + * The default listening port is now 8118 due to a conflict with another service (NAS). -  * Some installers may remove earlier versions completely. Save any important + * Some installers may remove earlier versions completely. Save any important configuration files! -  * Privoxy is controllable with a web browser at the special URL: http:// + * Privoxy is controllable with a web browser at the special URL: http:// config.privoxy.org/ (Shortcut: http://p.p/). Many aspects of configuration can be done here, including temporarily disabling Privoxy. -  * The primary configuration files for cookie management, ad and banner + * The primary configuration files for cookie management, ad and banner blocking, and many other aspects of Privoxy configuration are the actions files. It is strongly recommended to become familiar with the new actions concept below, before modifying these files. Locally defined rules should go into user.action. -  * Some installers may not automatically start Privoxy after installation. + * Some installers may not automatically start Privoxy after installation. - ------------------------------------------------------------------------------- + 4. Quickstart to Using Privoxy -  * If upgrading, from versions before 2.9.16, please back up any configuration + * If upgrading, from versions before 2.9.16, please back up any configuration files. See the Note to Upgraders Section. -  * Install Privoxy. See the Installation Section below for platform specific + * Install Privoxy. See the Installation Section below for platform specific information. -  * Advanced users and those who want to offer Privoxy service to more than + * Advanced users and those who want to offer Privoxy service to more than just their local machine should check the main config file, especially the security-relevant options. These are off by default. -  * Start Privoxy, if the installation program has not done this already (may + * Start Privoxy, if the installation program has not done this already (may vary according to platform). See the section Starting Privoxy. -  * Set your browser to use Privoxy as HTTP and HTTPS proxy by setting the + * Set your browser to use Privoxy as HTTP and HTTPS proxy by setting the proxy configuration for address of 127.0.0.1 and port 8118. (Junkbuster and - earlier versions of Privoxy used port 8000.) See the section Starting + earlier versions of Privoxy used port 8000.) See the section Starting Privoxy below for more details on this. -  * Flush your browser's disk and memory caches, to remove any cached ad + * Flush your browser's disk and memory caches, to remove any cached ad images. -  * A default installation should provide a reasonable starting point for most. + * A default installation should provide a reasonable starting point for most. There will undoubtedly be occasions where you will want to adjust the configuration, but that can be dealt with as the need arises. Little to no initial configuration is required in most cases. @@ -489,20 +498,20 @@ A quick list of things to be aware of before upgrading: See the Configuration section for more configuration options, and how to customize your installation. -  * If you experience ads that slipped through, innocent images that are + * If you experience ads that slipped through, innocent images that are blocked, or otherwise feel the need to fine-tune Privoxy's behaviour, take a look at the actions files. As a quick start, you might find the richly commented examples helpful. You can also view and edit the actions files through the web-based user interface. The Appendix "Anatomy of an Action" has hints how to debug actions that "misbehave". -  * Please see the section Contacting the Developers on how to report bugs or + * Please see the section Contacting the Developers on how to report bugs or problems with websites or to get help. -  * Now enjoy surfing with enhanced comfort and privacy! + * Now enjoy surfing with enhanced comfort and privacy! - ------------------------------------------------------------------------------- + 4.1. Quickstart to Ad Blocking Ad blocking is but one of Privoxy's array of features. Many of these features @@ -547,14 +556,14 @@ URLs. The actions we need to know about for ad blocking are: block, handle-as-image, and set-image-blocker: -  * block - this action stops any contact between your browser and any URL + * block - this action stops any contact between your browser and any URL patterns that match this action's configuration. It can be used for blocking ads, but also anything that is determined to be unwanted. By - itself, it simply stops any communication with the remote server and sends + itself, it simply stops any communication with the remote server and sends Privoxy's own built-in BLOCKED page instead to let you now what has happened. -  * handle-as-image - tells Privoxy to treat this URL as an image. Privoxy's + * handle-as-image - tells Privoxy to treat this URL as an image. Privoxy's default configuration already does this for all common image types (e.g. GIF), but there are many situations where this is not so easy to determine. So we'll force it in these cases. This is particularly important for ad @@ -564,24 +573,22 @@ and set-image-blocker: limitations to this though. For instance, you can't just brute-force an image substitution for an entire HTML page in most situations. -  * set-image-blocker - tells Privoxy what to display in place of an ad image + * set-image-blocker - tells Privoxy what to display in place of an ad image that has hit a block rule. For this to come into play, the URL must match a block action somewhere in the configuration, and, it must also match an handle-as-image action. The configuration options on what to display instead of the ad are: -    pattern - a checkerboard pattern, so that an ad replacement is obvious. + pattern - a checkerboard pattern, so that an ad replacement is obvious. This is the default. -    blank - A very small empty GIF image is displayed. This is the so-called + blank - A very small empty GIF image is displayed. This is the so-called "invisible" configuration option. -    http:// - A redirect to any image anywhere of the user's choosing + http:// - A redirect to any image anywhere of the user's choosing (advanced usage). - - The quickest way to adjust any of these settings is with your browser through the special Privoxy editor at http://config.privoxy.org/show-status (shortcut: http://p.p/show-status). This is an internal page, and does not require @@ -594,31 +601,30 @@ detect these changes automatically. A quick and simple step by step example: -  * Right click on the ad image to be blocked, then select "Copy Link Location" + * Right click on the ad image to be blocked, then select "Copy Link Location" from the pop-up menu. -  * Set your browser to http://config.privoxy.org/show-status + * Set your browser to http://config.privoxy.org/show-status -  * Find user.action in the top section, and click on "Edit": + * Find user.action in the top section, and click on "Edit": Figure 1. Actions Files in Use - [ Screenshot of Actions Files in Use ] + [files-in-u] -  * You should have a section with only block listed under "Actions:". If not, + * You should have a section with only block listed under "Actions:". If not, click a "Insert new section below" button, and in the new section that just appeared, click the Edit button right under the word "Actions:". This will - bring up a list of all actions. Find block near the top, and click in the + bring up a list of all actions. Find block near the top, and click in the "Enabled" column, then "Submit" just below the list. -  * Now, in the block actions section, click the "Add" button, and paste the + * Now, in the block actions section, click the "Add" button, and paste the URL the browser got from "Copy Link Location". Remove the http:// at the beginning of the URL. Then, click "Submit" (or "OK" if in a pop-up window). -  * Now go back to the original page, and press SHIFT-Reload (or flush all + * Now go back to the original page, and press SHIFT-Reload (or flush all browser caches). The image should be gone now. - This is a very crude and simple example. There might be good reasons to use a wildcard pattern match to include potentially similar images from the same site. For a more extensive explanation of "patterns", and the entire actions @@ -627,6 +633,7 @@ concept, see the Actions section. For advanced users who want to hand edit their config files, you might want to now go to the Actions Files Tutorial. The ideas explained therein also apply to the web-based editor. + ------------------------------------------------------------------------------- 5. Starting Privoxy @@ -641,29 +648,29 @@ work with FTP or other protocols. Figure 2. Proxy Configuration (Mozilla) -[ Screenshot of Mozilla Proxy Configuration ] +[proxy_setu] With Netscape (and Mozilla), this can be set under: - Edit -   |_    -         Preferences -                |_        -                        Advanced -                              |_      -                                    Proxies -                                         |_        -                                                HTTP Proxy + Edit + |_ + Preferences + |_ + Advanced + |_ + Proxies + |_ + HTTP Proxy For Internet Explorer: - Tools -     |_    -         Internet Properties -                            |_        -                                      Connections -                                               |_      -                                                            LAN Settings + Tools + |_ + Internet Properties + |_ + Connections + |_ + LAN Settings Then, check "Use Proxy" and fill in the appropriate info (Address: 127.0.0.1, Port: 8118). Include HTTPS (SSL), if you want HTTPS proxy support too. @@ -676,6 +683,7 @@ Privoxy is typically started by specifying the main configuration file to be used on the command line. If no configuration file is specified on the command line, Privoxy will look for a file named config in the current directory. Except on Win32 where it will try config.txt. + ------------------------------------------------------------------------------- 5.1. Red Hat and Conectiva @@ -685,6 +693,7 @@ default. It will use the file /etc/privoxy/config as its main configuration file. # /etc/rc.d/init.d/privoxy start + ------------------------------------------------------------------------------- 5.2. Debian @@ -693,6 +702,7 @@ We use a script. Note that Debian starts Privoxy upon booting per default. It will use the file /etc/privoxy/config as its main configuration file. # /etc/init.d/privoxy start + ------------------------------------------------------------------------------- 5.3. SuSE @@ -701,6 +711,7 @@ We use a script. It will use the file /etc/privoxy/config as its main configuration file. Note that SuSE starts Privoxy upon booting your PC. # rcprivoxy start + ------------------------------------------------------------------------------- 5.4. Windows @@ -708,6 +719,7 @@ configuration file. Note that SuSE starts Privoxy upon booting your PC. Click on the Privoxy Icon to start Privoxy. If no configuration file is specified on the command line, Privoxy will look for a file named config.txt. Note that Windows will automatically start Privoxy upon booting you PC. + ------------------------------------------------------------------------------- 5.5. Solaris, NetBSD, FreeBSD, HP-UX and others @@ -715,6 +727,7 @@ Note that Windows will automatically start Privoxy upon booting you PC. Example Unix startup command: # /usr/sbin/privoxy /etc/privoxy/config + ------------------------------------------------------------------------------- 5.6. OS/2 @@ -722,6 +735,7 @@ Example Unix startup command: During installation, Privoxy is configured to start automatically when the system restarts. You can start it manually by double-clicking on the Privoxy icon in the Privoxy folder. + ------------------------------------------------------------------------------- 5.7. Mac OSX @@ -735,6 +749,7 @@ in the Terminal: You will be prompted for the administrator password. + ------------------------------------------------------------------------------- 5.8. AmigaOS @@ -744,6 +759,7 @@ user-startup (RoadShow), as startup program in your startup script (Genesis), or as startup action (Miami and MiamiDx). Privoxy will automatically quit when you quit your TCP/IP stack (just ignore the harmless warning your TCP/IP stack may display that Privoxy is still running). + ------------------------------------------------------------------------------- 5.9. Gentoo @@ -759,51 +775,53 @@ change this with the rc-update command. rc-update add privoxy default + ------------------------------------------------------------------------------- 5.10. Command Line Options Privoxy may be invoked with the following command-line options: -  * --version + * --version Print version info and exit. Unix only. -  * --help + * --help Print short usage info and exit. Unix only. -  * --no-daemon + * --no-daemon Don't become a daemon, i.e. don't fork and become process group leader, and don't detach from controlling tty. Unix only. -  * --pidfile FILE + * --pidfile FILE On startup, write the process ID to FILE. Delete the FILE on exit. Failure to create or delete the FILE is non-fatal. If no FILE option is given, no PID file will be used. Unix only. -  * --user USER[.GROUP] + * --user USER[.GROUP] After (optionally) writing the PID file, assume the user ID of USER, and if included the GID of GROUP. Exit if the privileges are not sufficient to do so. Unix only. -  * configfile + * configfile If no configfile is included on the command line, Privoxy will look for a file named "config" in the current directory (except on Win32 where it will look for "config.txt" instead). Specify full path to avoid confusion. If no config file is found, Privoxy will fail to start. - ------------------------------------------------------------------------------- + 6. Privoxy Configuration All Privoxy configuration is stored in text files. These files can be edited with a text editor. Many important aspects of Privoxy can also be controlled easily with a web browser. + ------------------------------------------------------------------------------- 6.1. Controlling Privoxy with Your Web Browser @@ -811,12 +829,15 @@ easily with a web browser. Privoxy's user interface can be reached through the special URL http:// config.privoxy.org/ (shortcut: http://p.p/), which is a built-in page and works without Internet access. You will see the following section: -     Privoxy Menu -        ??  View & change the current configuration -        ??  View the source code version numbers -        ??  View the request headers. -        ??  Look up which actions apply to a URL and why -        ??  Toggle Privoxy on or off + + Privoxy Menu + ? View & change the current configuration + ? View the source code version numbers + ? View the request headers. + ? Look up which actions apply to a URL and why + ? Toggle Privoxy on or off + ? Documentation + This should be self-explanatory. Note the first item leads to an editor for the actions files, which is where the ad, banner, cookie, and URL blocking magic is @@ -830,27 +851,26 @@ whether it is Privoxy causing the problem or not. Privoxy continues to run as a proxy in this case, but all manipulation is disabled, i.e. Privoxy acts like a normal forwarding proxy. There is even a toggle Bookmarklet offered, so that you can toggle Privoxy with one click from your browser. + ------------------------------------------------------------------------------- 6.2. Configuration Files Overview For Unix, *BSD and Linux, all configuration files are located in /etc/privoxy/ by default. For MS Windows, OS/2, and AmigaOS these are all in the same -directory as the Privoxy executable. The name and number of configuration files -has changed from previous versions, and is subject to change as development -progresses. +directory as the Privoxy executable. The installed defaults provide a reasonable starting point, though some settings may be aggressive by some standards. For the time being, the principle configuration files are: -  * The main configuration file is named config on Linux, Unix, BSD, OS/2, and + * The main configuration file is named config on Linux, Unix, BSD, OS/2, and AmigaOS and config.txt on Windows. This is a required file. -  * default.action (the main actions file) is used to define which "actions" + * default.action (the main actions file) is used to define which "actions" relating to banner-blocking, images, pop-ups, content modification, cookie handling etc should be applied by default. It also defines many exceptions - (both positive and negative) from this default set of actions that enable + (both positive and negative) from this default set of actions that enable Privoxy to selectively eliminate the junk, and only the junk, on as many websites as possible. @@ -865,12 +885,11 @@ configuration files are: config.privoxy.org/show-status (Shortcut: http://p.p/show-status) for the various actions files. -  * default.filter (the filter file) can be used to re-write the raw page + * default.filter (the filter file) can be used to re-write the raw page content, including viewable text as well as embedded HTML and JavaScript, and whatever else lurks on any given web page. The filtering jobs are only pre-defined here; whether to apply them or not is up to the actions files. - All files use the "#" character to denote a comment (the rest of the line will be ignored) and understand line continuation through placing a backslash ("\") as the very last character in a line. If the # is preceded by a backslash, it @@ -887,10 +906,6 @@ however, that it may take one or two additional requests for the change to take effect. When changing the listening address of Privoxy, these "wake up" requests must obviously be sent to the old listening address. -While under development, the configuration content is subject to change. The -below documentation may not be accurate by the time you read this. Also, what -constitutes a "default" setting, may change, so please check all your -configuration files on important issues. ------------------------------------------------------------------------------- 7. The Main Configuration File @@ -900,7 +915,7 @@ and config.txt on Windows. Configuration lines consist of an initial keyword followed by a list of values, all separated by whitespace (any number of spaces or tabs). For example: -  confdir /etc/privoxy + confdir /etc/privoxy Assigns the value /etc/privoxy to the option confdir and thus indicates that the configuration directory is named "/etc/privoxy/". @@ -911,34 +926,41 @@ Watch out in the below description for what happens if you leave them unset. The main config file controls all aspects of Privoxy's operation that are not location dependent (i.e. they apply universally, no matter where you may be surfing). + ------------------------------------------------------------------------------- 7.1. Configuration and Log File Locations Privoxy can (and normally does) use a number of other files for additional -configuration, help and logging. This section of the configuration file tells +configuration, help and logging. This section of the configuration file tells Privoxy where to find those other files. The user running Privoxy, must have read permission for all configuration files, and write permission to any files that would be modified, such as log files and actions files. + ------------------------------------------------------------------------------- 7.1.1. confdir Specifies: + The directory where the other configuration files are located Type of value: + Path name Default value: + /etc/privoxy (Unix) or Privoxy installation dir (Windows) Effect if unset: + Mandatory Notes: + No trailing "/", please When development goes modular and multi-user, the blocker, filter, and @@ -947,46 +969,57 @@ Notes: where the HTML templates for CGI output reside (e.g. Privoxy's 404 error page). - ------------------------------------------------------------------------------- + 7.1.2. logdir Specifies: + The directory where all logging takes place (i.e. where logfile and jarfile are located) Type of value: + Path name Default value: + /var/log/privoxy (Unix) or Privoxy installation dir (Windows) Effect if unset: + Mandatory Notes: + No trailing "/", please - ------------------------------------------------------------------------------- + 7.1.3. actionsfile Specifies: + The actions file(s) to use Type of value: + File name, relative to confdir, without the .action suffix Default values: -   standard     # Internal purposes, no editing recommended -   default      # Main actions file -   user         # User customizations + standard # Internal purposes, no editing recommended + + default # Main actions file + + user # User customizations Effect if unset: + No actions are taken at all. Simple neutral proxying. Notes: + Multiple actionsfile lines are permitted, and are in fact recommended! The default values include standard.action, which is used for internal @@ -998,28 +1031,33 @@ Notes: for ad blocking, cookie management, privacy considerations, etc. There is no point in using Privoxy without at least one actions file. - ------------------------------------------------------------------------------- + 7.1.4. filterfile Specifies: + The filter file to use Type of value: + File name, relative to confdir Default value: + default.filter (Unix) or default.filter.txt (Windows) Effect if unset: + No textual content filtering takes place, i.e. all +filter{name} actions in the actions files are turned neutral. Notes: + The filter file contains content modification rules that use regular expressions. These rules permit powerful changes on the content of Web pages, e.g., you could disable your favorite JavaScript annoyances, - re-write the actual displayed text, or just have some fun replacing + re-write the actual displayed text, or just have some fun replacing "Microsoft" with "MicroSuck" wherever it appears on a Web page. The +filter{name} actions rely on the relevant filter (name) to be defined @@ -1029,23 +1067,28 @@ Notes: handy filters for common problems is included in the distribution. See the section on the filter action for a list. - ------------------------------------------------------------------------------- + 7.1.5. logfile Specifies: + The log file to use Type of value: + File name, relative to logdir Default value: + logfile (Unix) or privoxy.log (Windows) Effect if unset: + No log file is used, all log messages go to the console (STDERR). Notes: + The windows version will additionally log to the console. The logfile is where all logging and error messages are written. The level @@ -1065,42 +1108,52 @@ Notes: Any log files must be writable by whatever user Privoxy is being run as (default on UNIX, user id is "privoxy"). - ------------------------------------------------------------------------------- + 7.1.6. jarfile Specifies: + The file to store intercepted cookies in Type of value: + File name, relative to logdir Default value: + jarfile (Unix) or privoxy.jar (Windows) Effect if unset: + Intercepted cookies are not stored at all. Notes: + The jarfile may grow to ridiculous sizes over time. - ------------------------------------------------------------------------------- + 7.1.7. trustfile Specifies: + The trust file to use Type of value: + File name, relative to confdir Default value: + Unset (commented out). When activated: trust (Unix) or trust.txt (Windows) Effect if unset: + The whole trust mechanism is turned off. Notes: + The trust mechanism is an experimental feature for building white-lists and should be used with care. It is NOT recommended for the casual user. @@ -1114,31 +1167,37 @@ Notes: If you use + operator in the trust file, it may grow considerably over time. - ------------------------------------------------------------------------------- + 7.2. Local Set-up Documentation If you intend to operate Privoxy for more users than just yourself, it might be a good idea to let them know how to reach you, what you block and why you do that, your policies, etc. + ------------------------------------------------------------------------------- 7.2.1. user-manual Specifies: + Location of the Privoxy User Manual. Type of value: + A fully qualified URI Default value: + Unset Effect if unset: + http://www.privoxy.org/version/user-manual/ will be used, where version is the Privoxy version. Notes: + The User Manual URI is used for help links from some of the internal CGI pages. The manual itself is normally packaged with the binary distributions, so you probably want to set this to a locally installed @@ -1149,37 +1208,42 @@ Notes: Unix, in local filesystem: - user-manual  file:///usr/share/doc/privoxy-2.9.20/user-manual/ + user-manual file:///usr/share/doc/privoxy-3.0.0/user-manual/ Any platform, on local webserver (called "local-webserver"): - user-manual  http://local-webserver/privoxy-user-manual/ + user-manual http://local-webserver/privoxy-user-manual/ +-----------------------------------------------------------------+ | Warning | - +-----------------------------------------------------------------+ + |-----------------------------------------------------------------| |If set, this option should be the first option in the config | |file, because it is used while the config file is being read. | +-----------------------------------------------------------------+ - ------------------------------------------------------------------------------- + 7.2.2. trust-info-url Specifies: + A URL to be displayed in the error page that users will see if access to an untrusted page is denied. Type of value: + URL Default value: + Two example URL are provided Effect if unset: + No links are displayed on the "untrusted" error page. Notes: + The value of this option only matters if the experimental trust mechanism has been activated. (See trustfile above.) @@ -1191,74 +1255,90 @@ Notes: locked out from the information on why they were locked out in the first place! - ------------------------------------------------------------------------------- + 7.2.3. admin-address Specifies: + An email address to reach the proxy administrator. Type of value: + Email address Default value: + Unset Effect if unset: + No email address is displayed on error pages and the CGI user interface. Notes: + If both admin-address and proxy-info-url are unset, the whole "Local Privoxy Support" box on all generated pages will not be shown. - ------------------------------------------------------------------------------- + 7.2.4. proxy-info-url Specifies: + A URL to documentation about the local Privoxy setup, configuration or policies. Type of value: + URL Default value: + Unset Effect if unset: + No link to local documentation is displayed on error pages and the CGI user interface. Notes: + If both admin-address and proxy-info-url are unset, the whole "Local Privoxy Support" box on all generated pages will not be shown. This URL shouldn't be blocked ;-) - ------------------------------------------------------------------------------- + 7.3. Debugging These options are mainly useful when tracing a problem. Note that you might also want to invoke Privoxy with the --no-daemon command line option when debugging. + ------------------------------------------------------------------------------- 7.3.1. debug Specifies: + Key values that determine what information gets logged to the logfile. Type of value: + Integer values Default value: + 12289 (i.e.: URLs plus informational and warning messages) Effect if unset: + Nothing gets logged. Notes: + The available debug levels are: debug 1 # show each GET/POST/CONNECT request @@ -1291,52 +1371,63 @@ Notes: If you want to use CLF (Common Log Format), you should set "debug 512" ONLY and not enable anything else. - ------------------------------------------------------------------------------- + 7.3.2. single-threaded Specifies: + Whether to run only one server thread Type of value: + None Default value: + Unset Effect if unset: + Multi-threaded (or, where unavailable: forked) operation, i.e. the ability to serve multiple requests simultaneously. Notes: + This option is only there for debug purposes and you should never need to use it. It will drastically reduce performance. - ------------------------------------------------------------------------------- + 7.4. Access Control and Security -This section of the config file controls the security-relevant aspects of +This section of the config file controls the security-relevant aspects of Privoxy's configuration. + ------------------------------------------------------------------------------- 7.4.1. listen-address Specifies: + The IP address and TCP port on which Privoxy will listen for client requests. Type of value: + [IP-Address]:Port Default value: + 127.0.0.1:8118 Effect if unset: + Bind to 127.0.0.1 (localhost), port 8118. This is suitable and recommended for home users who run Privoxy on the same machine as their browser. Notes: + You will need to configure your browser(s) to this proxy address and port. If you already have another service running on port 8118, or if you want to @@ -1352,6 +1443,7 @@ Notes: enable-edit-actions and enable-remote-toggle options! Example: + Suppose you are running Privoxy on a machine which has the address 192.168.0.1 on your local private network (192.168.0.0) and has another outside connection with a different address. You want it to serve requests @@ -1359,23 +1451,28 @@ Example: listen-address 192.168.0.1:8118 - ------------------------------------------------------------------------------- + 7.4.2. toggle Specifies: + Initial state of "toggle" status Type of value: + 1 or 0 Default value: + 1 Effect if unset: + Act as if toggled on Notes: + If set to 0, Privoxy will start in "toggled off" mode, i.e. behave like a normal, content-neutral proxy where all ad blocking, filtering, etc are disabled. See enable-remote-toggle below. This is not really useful @@ -1385,23 +1482,28 @@ Notes: The windows version will only display the toggle icon in the system tray if this option is present. - ------------------------------------------------------------------------------- + 7.4.3. enable-remote-toggle Specifies: + Whether or not the web-based toggle feature may be used Type of value: + 0 or 1 Default value: + 1 Effect if unset: + The web-based toggle feature is disabled. Notes: + When toggled off, Privoxy acts like a normal, content-neutral proxy, i.e. it acts as if none of the actions applied to any URL. @@ -1414,23 +1516,28 @@ Notes: Note that you must have compiled Privoxy with support for this feature, otherwise this option has no effect. - ------------------------------------------------------------------------------- + 7.4.4. enable-edit-actions Specifies: + Whether or not the web-based actions file editor may be used Type of value: + 0 or 1 Default value: + 1 Effect if unset: + The web-based actions file editor is disabled. Notes: + For the time being, access to the editor can not be controlled separately by "ACLs" or HTTP authentication, so that everybody who can access Privoxy (see "ACLs" and listen-address above) can modify its configuration for all @@ -1440,14 +1547,16 @@ Notes: Note that you must have compiled Privoxy with support for this feature, otherwise this option has no effect. - ------------------------------------------------------------------------------- + 7.4.5. ACLs: permit-access and deny-access Specifies: + Who can access what. Type of value: + src_addr[/src_masklen] [dst_addr[/dst_masklen]] Where src_addr and dst_addr are IP addresses in dotted decimal notation or @@ -1457,12 +1566,15 @@ Type of value: optional. Default value: + Unset Effect if unset: + Don't restrict access further than implied by listen-address Notes: + Access controls are included at the request of ISPs and systems administrators, and are not usually needed by individual users. For a typical home user, it will normally suffice to ensure that Privoxy only @@ -1494,6 +1606,7 @@ Notes: sites. Examples: + Explicitly define the default behavior if no ACL and listen-address are set: "localhost" is OK. The absence of a dst_addr implies that all destination addresses are OK: @@ -1512,23 +1625,28 @@ Examples: permit-access 192.168.45.64/26 deny-access 192.168.45.73 www.dirty-stuff.example.com - ------------------------------------------------------------------------------- + 7.4.6. buffer-limit Specifies: + Maximum size of the buffer for content filtering. Type of value: + Size in Kbytes Default value: + 4096 Effect if unset: + Use a 4MB (4096 KB) limit. Notes: + For content filtering, i.e. the +filter and +deanimate-gif actions, it is necessary that Privoxy buffers the entire document body. This can be potentially dangerous, since a server could just keep sending data @@ -1538,11 +1656,11 @@ Notes: When a document buffer size reaches the buffer-limit, it is flushed to the client unfiltered and no further attempt to filter the rest of the document is made. Remember that there may be multiple threads running, which might - require up to buffer-limit Kbytes each, unless you have enabled + require up to buffer-limit Kbytes each, unless you have enabled "single-threaded" above. - ------------------------------------------------------------------------------- + 7.5. Forwarding This feature allows routing of HTTP requests through a chain of multiple @@ -1555,14 +1673,17 @@ access. Also specified here are SOCKS proxies. Privoxy supports the SOCKS 4 and SOCKS 4A protocols. + ------------------------------------------------------------------------------- 7.5.1. forward Specifies: + To which parent HTTP proxy specific requests should be routed. Type of value: + target_pattern http_parent[:port] where target_pattern is a URL pattern that specifies to which requests @@ -1573,12 +1694,15 @@ Type of value: forwarding". Default value: + Unset Effect if unset: + Don't use parent HTTP proxies. Notes: + If http_parent is ".", then requests are not forwarded to another HTTP proxy but are made directly to the web servers. @@ -1586,6 +1710,7 @@ Notes: wins. Examples: + Everything goes to an example anonymizing proxy, except SSL on port 443 (which it doesn't handle): @@ -1598,15 +1723,17 @@ Examples: forward / caching-proxy.example-isp.net:8000 forward .example-isp.net . - ------------------------------------------------------------------------------- + 7.5.2. forward-socks4 and forward-socks4a Specifies: + Through which SOCKS proxy (and to which parent HTTP proxy) specific requests should be routed. Type of value: + target_pattern socks_proxy[:port] http_parent[:port] where target_pattern is a URL pattern that specifies to which requests @@ -1617,12 +1744,15 @@ Type of value: to 64535 Default value: + Unset Effect if unset: + Don't use SOCKS proxies. Notes: + Multiple lines are OK, they are checked in sequence, and the last match wins. @@ -1635,6 +1765,7 @@ Notes: a SOCKS proxy. Examples: + From the company example.com, direct connections are made to all "internal" domains, but everything outbound goes through their ISP's proxy by way of example.com's corporate SOCKS 4A gateway to the Internet. @@ -1647,8 +1778,8 @@ Examples: forward-socks4 / socks-gw.example.com:1080 . - ------------------------------------------------------------------------------- + 7.5.3. Advanced Forwarding Examples If you have links to multiple ISPs that provide various special content only to @@ -1700,25 +1831,23 @@ through a virus-scanning parent proxy, say, on antivir.example.com, port 8010: forward / . forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010 + ------------------------------------------------------------------------------- 7.6. Windows GUI Options Privoxy has a number of options specific to the Windows GUI interface: - -If "activity-animation" is set to 1, the Privoxy icon will animate when +If "activity-animation" is set to 1, the Privoxy icon will animate when "Privoxy" is active. To turn off, set to 0. -  activity-animation 1 -    - + activity-animation 1 + If "log-messages" is set to 1, Privoxy will log messages to the console window: -  log-messages 1 -    - + log-messages 1 + If "log-buffer-size" is set to 1, the size of the log buffer, i.e. the amount of memory used for the log messages displayed in the console window, will be @@ -1727,56 +1856,50 @@ limited to "log-max-lines" (see below). Warning: Setting this to 0 will result in the buffer to grow infinitely and eat up all your memory! -  log-buffer-size 1 -    - + log-buffer-size 1 + log-max-lines is the maximum number of lines held in the log buffer. See above. -  log-max-lines 200 -    - + log-max-lines 200 + If "log-highlight-messages" is set to 1, Privoxy will highlight portions of the log messages with a bold-faced font: -  log-highlight-messages 1 -    - + log-highlight-messages 1 + The font used in the console window: -  log-font-name Comic Sans MS -    - + log-font-name Comic Sans MS + Font size used in the console window: -  log-font-size 8 -    - + log-font-size 8 + "show-on-task-bar" controls whether or not Privoxy will appear as a button on the Task bar when minimized: -  show-on-task-bar 0 -    - + show-on-task-bar 0 + If "close-button-minimizes" is set to 1, the Windows close button will minimize Privoxy instead of closing the program (close with the exit option on the File menu). -  close-button-minimizes 1 -    - + close-button-minimizes 1 + The "hide-console" option is specific to the MS-Win console version of Privoxy. If this option is used, Privoxy will disconnect from and hide the command console. -  #hide-console -    + #hide-console + + ------------------------------------------------------------------------------- 8. Actions Files @@ -1787,24 +1910,23 @@ content and transactions are handled, and on which sites (or even parts thereof). There are three such files included with Privoxy (as of version 2.9.15), with differing purposes: -  * default.action - is the primary action file that sets the initial values + * default.action - is the primary action file that sets the initial values for all actions. It is intended to provide a base level of functionality for Privoxy's array of features. So it is a set of broad rules that should work reasonably well for users everywhere. This is the file that the developers are keeping updated, and making available to users. -  * user.action - is intended to be for local site preferences and exceptions. + * user.action - is intended to be for local site preferences and exceptions. As an example, if your ISP or your bank has specific requirements, and need special handling, this kind of thing should go here. This file will not be upgraded. -  * standard.action - is used by the web based editor, to set various + * standard.action - is used by the web based editor, to set various pre-defined sets of rules for the default actions section in default.action. These have increasing levels of aggressiveness and have no influence on your browsing unless you select them explicitly in the editor. It is not recommend to edit this file. - The list of actions files to be used are defined in the main configuration file, and are processed in the order they are defined. The content of these can all be viewed and edited from http://config.privoxy.org/show-status. @@ -1824,6 +1946,7 @@ some obnoxious URL that you would rather not see. Cookies can be accepted or rejected, or accepted only during the current browser session (i.e. not written to disk), content can be modified, JavaScripts tamed, user-tracking fooled, and much more. See below for a complete list of actions. + ------------------------------------------------------------------------------- 8.1. Finding the Right Mix @@ -1832,7 +1955,7 @@ Note that some actions, like cookie suppression or script disabling, may render some sites unusable that rely on these techniques to work properly. Finding the right mix of actions is not always easy and certainly a matter of personal taste. In general, it can be said that the more "aggressive" your default -settings (in the top section of the actions file) are, the more exceptions for +settings (in the top section of the actions file) are, the more exceptions for "trusted" sites you will have to make later. If, for example, you want to kill popup windows per default, you'll have to make exceptions from that rule for sites that you regularly use and that require popups for actually useful @@ -1843,6 +1966,7 @@ distribution actions files. But there is no general rule of thumb on these things. There just are too many variables, and sites are constantly changing. Sooner or later you will want to change the rules (and read this chapter again :). + ------------------------------------------------------------------------------- 8.2. How to Edit @@ -1855,6 +1979,7 @@ like "Cautious", "Medium" or "Advanced". If you prefer plain text editing to GUIs, you can of course also directly edit the the actions files. Look at default.action which is richly commented. + ------------------------------------------------------------------------------- 8.3. How Actions are Applied to URLs @@ -1879,6 +2004,7 @@ You can trace this process for any given URL by visiting http:// config.privoxy.org/show-url-info. More detail on this is provided in the Appendix, Anatomy of an Action. + ------------------------------------------------------------------------------- 8.4. Patterns @@ -1887,42 +2013,49 @@ Generally, a pattern has the form /, where both the and are optional. (This is why the pattern / matches all URLs). www.example.com/ + is a domain-only pattern and will match any request to www.example.com, regardless of which document on that server is requested. www.example.com + means exactly the same. For domain-only patterns, the trailing / may be omitted. www.example.com/index.html + matches only the single document /index.html on www.example.com. /index.html + matches the document /index.html, regardless of the domain, i.e. on any web server. index.html + matches nothing, since it would be interpreted as a domain name and there is no top-level domain called .html. - ------------------------------------------------------------------------------- + 8.4.1. The Domain Pattern The matching of the domain part offers some flexible options: if the domain starts or ends with a dot, it becomes unanchored at that end. For example: .example.com + matches any domain that ENDS in .example.com www. + matches any domain that STARTS with www. .example. + matches any domain that CONTAINS .example. (Correctly speaking: It matches any FQDN that contains example as a domain.) - Additionally, there are wild-cards that you can use in the domain names themselves. They work pretty similar to shell wild-cards: "*" stands for zero or more arbitrary characters, "?" stands for any single character, you can @@ -1930,21 +2063,25 @@ define character classes in square brackets and all of that can be freely mixed: ad*.example.com - matches "adserver.example.com", "ads.example.com", etc but not + + matches "adserver.example.com", "ads.example.com", etc but not "sfads.example.com" *ad*.example.com + matches all of the above, and then some. .?pix.com + matches www.ipix.com, pictures.epix.com, a.b.c.d.e.upix.com etc. www[1-9a-ez].example.c* + matches www1.example.com, www4.example.cc, wwwd.example.cy, wwwz.example.com etc., but not wwww.example.com. - ------------------------------------------------------------------------------- + 8.4.2. The Path Pattern Privoxy uses Perl compatible regular expressions (through the PCRE library) for @@ -1964,6 +2101,7 @@ Please also note that matching in the path is CASE INSENSITIVE by default, but you can switch to case sensitive at any point in the pattern by using the "(? -i)" switch: www.example.com/(?-i)PaTtErN.* will match only documents whose path starts with PaTtErN in exactly this capitalization. + ------------------------------------------------------------------------------- 8.5. Actions @@ -1983,14 +2121,14 @@ a section of the actions file. There are three classes of actions: -  * Boolean, i.e the action can only be "enabled" or "disabled". Syntax: + * Boolean, i.e the action can only be "enabled" or "disabled". Syntax: +name # enable action name -name # disable action name Example: +block -  * Parameterized, where some value is required in order to enable this type of + * Parameterized, where some value is required in order to enable this type of action. Syntax: +name{param} # enable action and set parameter to param, @@ -2003,7 +2141,7 @@ There are three classes of actions: Example: +hide-user-agent{ Mozilla 1.0 } -  * Multi-value. These look exactly like parameterized actions, but they behave + * Multi-value. These look exactly like parameterized actions, but they behave differently: If the action applies multiple times to the same URL, but with different parameters, all the parameters from all matches are remembered. This is used for actions that can be executed for the same request @@ -2017,7 +2155,6 @@ There are three classes of actions: Examples: +add-header{X-Fun-Header: Some text} and +filter{html-annoyances} - If nothing is specified in any actions file, no "actions" are taken. So in this case Privoxy would just be a normal, non-blocking, non-anonymizing proxy. You must specifically enable the privacy and blocking features you need (although @@ -2032,51 +2169,63 @@ three actions files). It also quite possible for any given URL pattern to match more than one pattern and thus more than one set of actions! The list of valid Privoxy actions are: + ------------------------------------------------------------------------------- 8.5.1. add-header Typical use: + Confuse log analysis, custom applications Effect: + Sends a user defined HTTP header to the web server. Type: + Multi-value. Parameter: + Any string value is possible. Validity of the defined HTTP headers is not checked. It is recommended that you use the "X-" prefix for custom headers. Notes: + This action may be specified multiple times, in order to define multiple headers. This is rarely needed for the typical user. If you don't know what "HTTP headers" are, you definitely don't need to worry about this one. Example usage: + +add-header{X-User-Tracking: sucks} - ------------------------------------------------------------------------------- + 8.5.2. block Typical use: + Block ads or other obnoxious content Effect: + Requests for URLs to which this action applies are blocked, i.e. the requests are not forwarded to the remote server, but answered locally with a substitute page or image, as determined by the handle-as-image and set-image-blocker actions. Type: + Boolean. Parameter: + N/A Notes: + Privoxy sends a special "BLOCKED" page for requests to blocked pages. This page contains links to find out why the request was blocked, and a click-through to the blocked content (the latter only if compiled with the @@ -2091,7 +2240,7 @@ Notes: determined by its parameter, if not, the standard checkerboard pattern is sent. - It is important to understand this process, in order to understand how + It is important to understand this process, in order to understand how Privoxy deals with ads and other unwanted content. The filter action can perform a very similar task, by "blocking" banner @@ -2101,6 +2250,7 @@ Notes: the two. Example usage (section): + {+block} # Block and replace with "blocked" page .nasty-stuff.example.com @@ -2108,23 +2258,28 @@ Example usage (section): .ad.doubleclick.net .ads.r.us - ------------------------------------------------------------------------------- + 8.5.3. crunch-incoming-cookies Typical use: + Prevent the web server from setting any cookies on your system Effect: + Deletes any "Set-Cookie:" HTTP headers from server replies. Type: + Boolean. Parameter: + N/A Notes: + This action is only concerned with incoming cookies. For outgoing cookies, use crunch-outgoing-cookies. Use both to disable cookies completely. @@ -2133,25 +2288,31 @@ Notes: from being set. Example usage: + +crunch-incoming-cookies - ------------------------------------------------------------------------------- + 8.5.4. crunch-outgoing-cookies Typical use: + Prevent the web server from reading any cookies from your system Effect: + Deletes any "Cookie:" HTTP headers from client requests. Type: + Boolean. Parameter: + N/A Notes: + This action is only concerned with outgoing cookies. For incoming cookies, use crunch-incoming-cookies. Use both to disable cookies completely. @@ -2160,25 +2321,31 @@ Notes: from being read. Example usage: + +crunch-outgoing-cookies - ------------------------------------------------------------------------------- + 8.5.5. deanimate-gifs Typical use: + Stop those annoying, distracting animated GIF images. Effect: + De-animate GIF animations, i.e. reduce them to their first or last image. Type: + Parameterized. Parameter: + "last" or "first" Notes: + This will also shrink the images considerably (in bytes, not pixels!). If the option "first" is given, the first frame of the animation is used as the replacement. If "last" is given, the last frame of the animation is @@ -2191,25 +2358,31 @@ Notes: a GIF. Example usage: + +deanimate-gifs{last} - ------------------------------------------------------------------------------- + 8.5.6. downgrade-http-version Typical use: + Work around (very rare) problems with HTTP/1.1 Effect: + Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0. Type: + Boolean. Parameter: + N/A Notes: + This is a left-over from the time when Privoxy didn't support important HTTP/1.1 features well. It is left here for the unlikely case that you experience HTTP/1.1 related problems with some server out there. Not all @@ -2217,26 +2390,32 @@ Notes: might need this action. Example usage (section): + {+downgrade-http-version} problem-host.example.com - ------------------------------------------------------------------------------- + 8.5.7. fast-redirects Typical use: + Fool some click-tracking scripts and speed up indirect links Effect: + Cut off all but the last valid URL from requests. Type: + Boolean. Parameter: + N/A Notes: + Many sites, like yahoo.com, don't just link to other sites. Instead, they will link to some script on their own servers, giving the destination as a parameter, which will then redirect you to the final target. URLs resulting @@ -2256,30 +2435,36 @@ Notes: Some sites just don't work without it. Example usage: + {+fast-redirects} - ------------------------------------------------------------------------------- + 8.5.8. filter Typical use: + Get rid of HTML and JavaScript annoyances, banner advertisements (by size), do fun text replacements, etc. Effect: + Text documents, including HTML and JavaScript, to which this action applies, are filtered on-the-fly through the specified regular expression based substitutions. Type: + Parameterized. Parameter: + The name of a filter, as defined in the filter file (typically default.filter, set by the filterfile option in the config file). Filtering can be completely disabled without the use of parameters. Notes: + For your convenience, there are a number of pre-defined filters available in the distribution filter file that you can use. See the examples below for a list. @@ -2312,6 +2497,7 @@ Notes: welcome! Example usage (with filters from the distribution default.filter file): + +filter{html-annoyances} # Get rid of particularly annoying HTML abuse. +filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse @@ -2342,15 +2528,17 @@ Example usage (with filters from the distribution default.filter file): +filter{js-events} # Kill all JS event bindings (Radically destructive! Only for extra nasty sites) - ------------------------------------------------------------------------------- + 8.5.9. handle-as-image Typical use: + Mark URLs as belonging to images (so they'll be replaced by images if they get blocked) Effect: + This action alone doesn't do anything noticeable. It just marks URLs as images. If the block action also applies, the presence or absence of this mark decides whether an HTML "blocked" page, or a replacement image (as @@ -2358,12 +2546,15 @@ Effect: substitute for the blocked content. Type: + Boolean. Parameter: + N/A Notes: + The below generic example section is actually part of default.action. It marks all URLs with well-known image file name extensions as images and should be left intact. @@ -2378,6 +2569,7 @@ Notes: replace the ad frame with an image, but lead to error messages. Example usage (sections): + # Generic image extensions: # {+handle-as-image} @@ -2392,24 +2584,29 @@ Example usage (sections): # Banner source! Who cares if they also have non-image content? ad.doubleclick.net - ------------------------------------------------------------------------------- + 8.5.10. hide-forwarded-for-headers Typical use: + Improve privacy by hiding the true source of the request Effect: + Deletes any existing "X-Forwarded-for:" HTTP header from client requests, and prevents adding a new one. Type: + Boolean. Parameter: + N/A Notes: + It is fairly safe to leave this on. This action is scheduled for improvement: It should be able to generate @@ -2418,26 +2615,32 @@ Notes: like requests from a pool of different users sharing the same proxy. Example usage: + +hide-forwarded-for-headers - ------------------------------------------------------------------------------- + 8.5.11. hide-from-header Typical use: + Keep your (old and ill) browser from telling web servers your email address Effect: + Deletes any existing "From:" HTTP header, or replaces it with the specified string. Type: + Parameterized. Parameter: + Keyword: "block", or any user defined value. Notes: + The keyword "block" will completely remove the header (not to be confused with the block action). @@ -2449,34 +2652,41 @@ Notes: headers anymore. Example usage: + +hide-from-header{block} + or + +hide-from-header{spam-me-senseless@sittingduck.example.com} - ------------------------------------------------------------------------------- + 8.5.12. hide-referrer Typical use: + Conceal which link you followed to get to a particular site Effect: + Deletes the "Referer:" (sic) HTTP header from the client request, or replaces it with a forged one. Type: + Parameterized. Parameter: -   + "block" to delete the header completely. + + + "block" to delete the header completely. -   + "forge" to pretend to be coming from the homepage of the server we are + + "forge" to pretend to be coming from the homepage of the server we are talking to. -   + Any other string to set a user defined referrer. + + Any other string to set a user defined referrer. - Notes: + "forge" is the preferred option here, since some servers will not send images back otherwise, in an attempt to prevent their valuable content from being embedded elsewhere (and hence, without being surrounded by their @@ -2488,31 +2698,39 @@ Notes: to be spelled as "referer".) Example usage: + +hide-referrer{forge} + or + +hide-referrer{http://www.yahoo.com/} - ------------------------------------------------------------------------------- + 8.5.13. hide-user-agent Typical use: + Conceal your type of browser and client operating system Effect: + Replaces the value of the "User-Agent:" HTTP header in client requests with the specified value. Type: + Parameterized. Parameter: + Any user-defined string. Notes: + +-----------------------------------------------------------------+ | Warning | - +-----------------------------------------------------------------+ + |-----------------------------------------------------------------| |This breaks many web sites that depend on looking at this header | |in order to customize their content for different browsers | |(which, by the way, is NOT a smart way to do that!). | @@ -2531,26 +2749,32 @@ Notes: This action is scheduled for improvement. Example usage: + +hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)} - ------------------------------------------------------------------------------- + 8.5.14. kill-popups Typical use: + Eliminate those annoying pop-up windows Effect: + While loading the document, replace JavaScript code that opens pop-up windows with (syntactically neutral) dummy code on the fly. Type: + Boolean. Parameter: + N/A Notes: + This action is easily confused with the built-in, hardwired filter action, but there are important differences: For kill-popups, the document need not be buffered, so it can be incrementally rendered while downloading. But @@ -2570,33 +2794,39 @@ Notes: filter{js-annoyances} instead. Example usage: + +kill-popups - ------------------------------------------------------------------------------- + 8.5.15. limit-connect Typical use: + Prevent abuse of Privoxy as a TCP proxy relay Effect: + Specifies to which ports HTTP CONNECT requests are allowable. Type: + Parameterized. Parameter: + A comma-separated list of ports or port ranges (the latter using dashes, with the minimum defaulting to 0 and the maximum to 65K). Notes: + By default, i.e. if no limit-connect action applies, Privoxy only allows HTTP CONNECT requests to port 443 (the standard, secure HTTPS port). Use limit-connect if more fine-grained control is desired for some or all destinations. - The CONNECT methods exists in HTTP to allow access to secure websites ( - "https://" URLs) through proxies. It works very simply: the proxy connects + The CONNECT methods exists in HTTP to allow access to secure websites + ("https://" URLs) through proxies. It works very simply: the proxy connects to the server on the specified port, and then short-circuits its connections to the client and to the remote server. This can be a big security hole, since CONNECT-enabled proxies can be abused as TCP relays @@ -2606,29 +2836,35 @@ Notes: change this one, since the default is already very restrictive. Example usages: + +limit-connect{443} # This is the default and need not be specified. +limit-connect{80,443} # Ports 80 and 443 are OK. +limit-connect{-3, 7, 20-100, 500-} # Ports less than 3, 7, 20 to 100 and above 500 are OK. +limit-connect{-} # All ports are OK (gaping security hole!) - ------------------------------------------------------------------------------- + 8.5.16. prevent-compression Typical use: + Ensure that servers send the content uncompressed, so it can be passed through filters Effect: + Adds a header to the request that asks for uncompressed transfer. Type: + Boolean. Parameter: + N/A Notes: + More and more websites send their content compressed by default, which is generally a good idea and saves bandwidth. But for the filter, deanimate-gifs and kill-popups actions to work, Privoxy needs access to the @@ -2647,6 +2883,7 @@ Notes: those sites. See the example for how to do that. Example usage (sections): + # Set default: # {+prevent-compression} @@ -2658,80 +2895,97 @@ Example usage (sections): www.debianhelp.org www.pclinuxonline.com - ------------------------------------------------------------------------------- + 8.5.17. send-vanilla-wafer Typical use: + Feed log analysis scripts with useless data. Effect: + Sends a cookie with each request stating that you do not accept any copyright on cookies sent to you, and asking the site operator not to track you. Type: + Boolean. Parameter: + N/A Notes: + The vanilla wafer is a (relatively) unique header and could conceivably be used to track you. This action is rarely used and not enabled in the default configuration. Example usage: + +send-vanilla-wafer - ------------------------------------------------------------------------------- + 8.5.18. send-wafer Typical use: + Send custom cookies or feed log analysis scripts with even more useless data. Effect: + Sends a custom, user-defined cookie with each request. Type: + Multi-value. Parameter: + A string of the form "name=value". Notes: + Being multi-valued, multiple instances of this action can apply to the same request, resulting in multiple cookies being sent. This action is rarely used and not enabled in the default configuration. Example usage (section): + {+send-wafer{UsingPrivoxy=true}} my-internal-testing-server.void - ------------------------------------------------------------------------------- + 8.5.19. session-cookies-only Typical use: + Allow only temporary "session" cookies (for the current browser session only). Effect: + Deletes the "expires" field from "Set-Cookie:" server headers. Most browsers will not store such cookies permanently and forget them in between sessions. Type: + Boolean. Parameter: + N/A Notes: + This is less strict than crunch-incoming-cookies / crunch-outgoing-cookies and allows you to browse websites that insist or rely on setting cookies, without compromising your privacy too badly. @@ -2746,40 +3000,45 @@ Notes: crunch-incoming-cookies or crunch-outgoing-cookies. If you do, cookies will be plainly killed. - Note that it is up to the browser how it handles such cookies without an + Note that it is up to the browser how it handles such cookies without an "expires" field. If you use an exotic browser, you might want to try it out to be sure. Example usage: + +session-cookies-only - ------------------------------------------------------------------------------- + 8.5.20. set-image-blocker Typical use: + Choose the replacement for blocked images Effect: + This action alone doesn't do anything noticeable. If both block and handle-as-image also apply, i.e. if the request is to be blocked as an image, then the parameter of this action decides what will be sent as a replacement. Type: + Parameterized. Parameter: -   + "pattern" to send a built-in checkerboard pattern image. The image is + + + "pattern" to send a built-in checkerboard pattern image. The image is visually decent, scales very well, and makes it obvious where banners were busted. -   + "blank" to send a built-in transparent image. This makes banners + + "blank" to send a built-in transparent image. This makes banners disappear completely, but makes it hard to detect where Privoxy has - blocked images on a given page and complicates troubleshooting if + blocked images on a given page and complicates troubleshooting if Privoxy has blocked innocent images, like navigation icons. -   + "target-url" to send a redirect to target-url. You can redirect to any + + "target-url" to send a redirect to target-url. You can redirect to any image anywhere, even in your local filesystem (via "file:///" URL). A good application of redirects is to use special Privoxy-built-in @@ -2788,8 +3047,8 @@ Parameter: but enables your browser to cache the replacement image, instead of requesting it over and over again. - Notes: + The URLs for the built-in images are "http://config.privoxy.org/ send-banner?type=type", where type is either "blank" or "pattern". @@ -2799,6 +3058,7 @@ Notes: image. Example usage: + Built-in pattern: +set-image-blocker{pattern} @@ -2811,8 +3071,8 @@ Example usage: +set-image-blocker{http://config.privoxy.org/send-banner?type=pattern} - ------------------------------------------------------------------------------- + 8.5.21. Summary Note that many of these actions have the potential to cause a page to @@ -2820,6 +3080,7 @@ misbehave, possibly even not to display at all. There are many ways a site designer may choose to design his site, and what HTTP header content, and other criteria, he may depend on. There is no way to have hard and fast rules for all sites. See the Appendix for a brief example on troubleshooting actions. + ------------------------------------------------------------------------------- 8.6. Aliases @@ -2827,7 +3088,7 @@ sites. See the Appendix for a brief example on troubleshooting actions. Custom "actions", known to Privoxy as "aliases", can be defined by combining other actions. These can in turn be invoked just like the built-in actions. Currently, an alias name can contain any character except space, tab, "=", "{" -and "}", but we strongly recommend that you only use "a" to "z", "0" to "9", +and "}", but we strongly recommend that you only use "a" to "z", "0" to "9", "+", and "-". Alias names are not case sensitive, and are not required to start with a "+" or "-" sign, since they are merely textually expanded. @@ -2847,7 +3108,7 @@ Currently, there is one big drawback to using aliases, though: Privoxy's built-in web-based action file editor honors aliases when reading the actions files, but it expands them before writing. So the effects of your aliases are of course preserved, but the aliases themselves are lost when you edit sections -that use aliases with it. This is likely to change in future versions of +that use aliases with it. This is likely to change in future versions of Privoxy. Now let's define some aliases... @@ -2906,6 +3167,7 @@ up for the "/" pattern): Aliases like "shop" and "fragile" are often used for "problem" sites that require some actions to be disabled in order to function properly. + ------------------------------------------------------------------------------- 8.7. Actions Files Tutorial @@ -2914,6 +3176,7 @@ The above chapters have shown which actions files there are and how they are organized, how actions are specified and applied to URLs, how patterns work, and how to define and use aliases. Now, let's look at an example default.action and user.action file and see how all these pieces come together: + ------------------------------------------------------------------------------- 8.7.1. default.action @@ -3145,7 +3408,7 @@ count*. .hitbox.com You wouldn't believe how many advertisers actually call their banner servers -ads.company.com, or call the directory in which the banners are stored simply +ads.company.com, or call the directory in which the banners are stored simply "banners". So the above generic patterns are surprisingly effective. But being very generic, they necessarily also catch URLs that we don't want to @@ -3195,6 +3458,7 @@ disables all filters in one fell swoop! The actual default.action is of course more comprehensive, but we hope this example made clear how it works. + ------------------------------------------------------------------------------- 8.7.2. user.action @@ -3290,6 +3554,7 @@ value to you: .osdn.net Note that allow-ads has been aliased to -block -filter{banners-by-size} above. + ------------------------------------------------------------------------------- 9. The Filter File @@ -3335,6 +3600,7 @@ If you are new to regular expressions, you might want to take a look at the Appendix on regular expressions, and see the Perl manual for the s/// operator's syntax and Perl-style regular expressions in general. The below examples might also help to get you started. + ------------------------------------------------------------------------------- 9.1. Filter File Tutorial @@ -3380,7 +3646,7 @@ That's more than we want, but the pattern continues: document\.referrer matches only the exact string "document.referrer". The dot needed to be escaped, i.e. preceded by a backslash, to take away its special meaning as a joker, and make it just a regular dot. So far, the meaning is: Match from the start of the -first