# Note: Makefile is built automatically from Makefile.in
#
-# $Id: GNUmakefile.in,v 1.201 2011/08/31 13:36:35 fabiankeil Exp $
+# $Id: GNUmakefile.in,v 1.202 2011/09/04 11:09:05 fabiankeil Exp $
#
# Written by and Copyright (C) 2001-2011 members of the
# Privoxy team. http://www.privoxy.org/
#
# Based on the Internet Junkbuster originally written
-# by and Copyright (C) 1997 Anonymous Coders and
+# by and Copyright (C) 1997 Anonymous Coders and
# Junkbusters Corporation. http://www.junkbusters.com
#
-# This program is free software; you can redistribute it
+# 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
LOGS_DEST = $(VAR_DEST)/log/privoxy
PIDS_DEST = $(VAR_DEST)/run
-# if $prefix = /usr/local then the default CONFDEST change from
-# CONF_DEST = $(CONF_BASE) to CONF_DEST = $(CONF_BASE)/privoxy
+# if $prefix = /usr/local then the default CONFDEST change from
+# CONF_DEST = $(CONF_BASE) to CONF_DEST = $(CONF_BASE)/privoxy
# by the target rule CONF_DEST
#
# also if the $prefix is /usr/local and there is no
# $(SHARE_DEST)/doc, it checks for $prefix/doc and installs there
# instead in this situation
#
-# finally if $prefix=/usr/local and VAR_DEST=$prefix/var it
+# finally if $prefix=/usr/local and VAR_DEST=$prefix/var it
# changes this to /var for storing the logs and pidfile
# used in source dir only, the install goes to $share_dest/doc/privoxy
DIR_MODE = 0755
# Files daemon writes to.
RWD_MODE = 0660
-INSTALL_P = -m $(BIN_MODE)
+INSTALL_P = -m $(BIN_MODE)
INSTALL_T = -m $(RA_MODE)
INSTALL_D = -m $(DIR_MODE) -d
INSTALL_R = -m $(RWD_MODE)
# install options for superuser install
-#INSTALL_S = -g @GROUP@ -o @USER@
+#INSTALL_S = -g @GROUP@ -o @USER@
#############################################################################
# Build tools
# possibly other OSs).
SPECIAL_CFLAGS = @SPECIAL_CFLAGS@
-# Add your flags here
-OTHER_CFLAGS =
+# Add your flags here
+OTHER_CFLAGS =
CFLAGS = @CFLAGS@ @CPPFLAGS@ $(OTHER_CFLAGS) $(SPECIAL_CFLAGS) -Wall \
- @STATIC_PCRE_ONLY@ -Ipcre
+ @STATIC_PCRE_ONLY@ -Ipcre
LDFLAGS = @LDFLAGS@ $(DEBUG_CFLAGS) $(SPECIAL_CFLAGS)
$(DOSFILTER) <default.filter >default.filter.txt && mv default.filter.txt default.filter
trust.txt: trust
- $(DOSFILTER) < $< > $@
+ $(DOSFILTER) < $< > $@
#############################################################################
# Pre-dist check:
#############################################################################
# create tar.gz from CVS:
-# This make-target is usually called through 'create-archive'. If you
+# This make-target is usually called through 'create-archive'. If you
# run 'make create-snapshot' without setting SNAPVERSION, you'll get a
-# tar.gz with the current date in the name and as a releasenumber in the
+# tar.gz with the current date in the name and as a releasenumber in the
# spec-file. But the main usage is to run it as follows (Red Hat example):
# make SNAPVERSION=1.6x create-snapshot
# This creates a tar.gz.
#############################################################################
# looks at the version of Makefile and exports a corresponding source-tree
-# example: if the Makefile has the sticky tag v_2_9_13, you'll get
+# example: if the Makefile has the sticky tag v_2_9_13, you'll get
# privoxy-*-2.4.13.tar.gz.
#############################################################################
create-archive:
# add config files
for foo in $(CONFIG_FILES); do \
(cd .. && $(TAR) -uvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
- done;
+ done;
# add documentation
for foo in $(DOC_FILES); do \
(cd .. && $(TAR) -uvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
cd .. && $(TAR) -cvhf privoxy-$(VERSION)-$(CODE_STATUS)-src.tar $$files ; \
# and zip the archive
- $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
+ $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
$(GZIP_PROG) ../privoxy-$(VERSION)-$(CODE_STATUS)-src.tar
@$(ECHO) Tarball distribution created.
#############################################################################
# developer manual
-dok-devel:
+dok-devel:
$(RM) doc/webserver/developer-manual/*.html
$(RM) -r doc/source/developer-manual
mkdir -p doc/source/developer-manual
cd doc/source/developer-manual && $(DB) ../developer-manual.sgml && cd .. && cp developer-manual/*.html ../webserver/developer-manual/
# user manual
-dok-user:
+dok-user:
$(RM) doc/webserver/user-manual/*.html
$(RM) -r doc/source/user-manual/
mkdir -p doc/source/user-manual
$(PERL) -pi.bak -e 's/<\/head/\n<LINK REL=\"STYLESHEET\" TYPE=\"text\/css\" HREF=\"p_doc.css\">\n<\/head/i' doc/webserver/user-manual/*html
# faq
-dok-faq:
+dok-faq:
$(RM) doc/webserver/faq/*.html
$(RM) -r doc/source/faq
mkdir -p doc/source/faq
cd doc/source/faq && $(DB) ../faq.sgml && cd .. && cp faq/*.html ../webserver/faq/
-# man page, one variation. Try to use the next target, just 'make man'.
-dok-man:
+# man page, one variation. Try to use the next target, just 'make man'.
+dok-man:
$(RM) doc/man/* doc/webserver/man-page/*.html
echo MAN2HTML is $(MAN2HTML)
@if [ $(MAN2HTML) != "false" ]; then \
fi;
# Build man page from sgml. This requires the SGMLSpm perl module.
-# See CPAN, or your favorite perl repository. This is the preferred
+# See CPAN, or your favorite perl repository. This is the preferred
# target for man page generation!
man: dok-release
mkdir -p doc/source/temp && cd doc/source/temp && $(RM) * ;\
# for documentation, etc.
#
# index.html for webserver:
-dok-webserver:
+dok-webserver:
cd doc/source/webserver && $(DB)-notoc -ip-homepage -V nochunks index.sgml > ../../webserver/index.html
$(PERL) -pi.bak -e 's/..\/p_doc.css/p_doc.css/;\
s/<\/HEAD/\n<meta name=\"description\" content=\"Privoxy helps users to protect their privacy.\"><\/HEAD/;\
doc/webserver/index.html && $(RM) doc/webserver/*.bak
# privoxy-index.html for local documentation:
-dok-index:
+dok-index:
cd doc/source/webserver && $(DB)-notoc -ip-index -V nochunks index.sgml > ../../webserver/privoxy-index.html
$(PERL) -pi.bak -e 's/..\/p_doc.css/p_doc.css/;\
s/<\/HEAD/\n<meta name=\"description\" content=\"Privoxy helps users to protect their privacy.\"><\/HEAD/;\
@$(ECHO) Documentation created.
## Make AUTHORS file
-dok-authors:
+dok-authors:
cd doc/source && $(DB) -V nochunks authors.sgml > tmp.html && env -u LANG $(WDUMP) \
tmp.html > ../../AUTHORS && $(RM) tmp.html
# mv -f index.html announce.html && $(WDUMP) announce.html > announce.txt
# cd $(DOC_TMP) && $(DB) announce.sgml &&\
# mv -f index.html announce-mini.html && $(WDUMP) announce-mini.html > announce-mini.txt &&\
-# mv -f *html *txt ../../..
+# mv -f *html *txt ../../..
# rm -fr $(DOC_TMP)
-# The main Privoxy config file, generated from sgml sources.
-# NOTE: This will require some hand editing. The new file is outputted
+# The main Privoxy config file, generated from sgml sources.
+# NOTE: This will require some hand editing. The new file is outputted
# as config.new so that problem sections can be compared to previous
-# version. This is hardcored to w3m for html/text conversion. Also,
+# version. This is hardcored to w3m for html/text conversion. Also,
# requires the shell util 'fmt'.
config-file: dok-release
cd doc/source && $(DB)-notoc -iconfig-file -V nochunks config.sgml > __tmp.html &&\
# config file, alternate version using lynx (perl stuff unfinished). Lynx
# does not do so good a job.
-config-file-alt:
+config-file-alt:
cd doc/source && $(ECHO) -e ".h2 JUSTIFY\\nJUSTIFY:FALSE" > __tmp.lynx_cfg &&\
$(DB)-notoc -iconfig-file -V nochunks config.sgml > __tmp.html &&\
lynx -cfg=__tmp.lynx_cfg -width=78 -dump __tmp.html > ../../config.new && $(RM) -r __tmp.*
@$(ECHO) You will need to "create" a SF shell first:
@$(ECHO) ssh -t SF-USER-ID,ijbswa@shell.sourceforge.net create
@$(ECHO) Please make sure your documentation files are up to date.
- @$(ECHO) Note that this command updates the home page and copys
+ @$(ECHO) Note that this command updates the home page and copys
@$(ECHO) all stuff to the webserver, it will not remove obsolete documents.
@$(ECHO) Note that a botched upload can result in the documentation
@$(ECHO) on the website becoming unreachable! Also the CSS files
@$(SSH) shell.sourceforge.net 'find /home/groups/i/ij/ijbswa/htdocs/ -type f | xargs chmod 664 2>/dev/null; true'
web-actions: clean-editor-files
- @$(ECHO) Uploading
+ @$(ECHO) Uploading
@cd doc/webserver/actions; \
upload=`find . -type f -a -not \( -path "*/CVS*" -o -path "*/results*" \)`; \
$(TAR) cf - $$upload | $(SSH) ijbswa.sourceforge.net 'cd /home/groups/i/ij/ijbswa/htdocs/actions; tar xvm'
@$(SSH) ijbswa.sourceforge.net 'find /home/groups/i/ij/ijbswa/htdocs/actions/ -type f | xargs chmod 664 2>/dev/null'
@$(SSH) ijbswa.sourceforge.net 'chmod 666 /home/groups/i/ij/ijbswa/htdocs/actions/results/actions-feedback.txt 2>/dev/null'
-##
+##
dok-put:
tar --exclude ".cvsignore" --exclude "CVS" --exclude "source" --exclude ".htaccess" \
--exclude "obsolete" --exclude "actions" --exclude "*.zip" --exclude "robots.txt"\
deanimate.@OBJEXT@: deanimate.c deanimate.h config.h $(PROJECT_H_DEPS)
encode.@OBJEXT@: encode.c encode.h config.h
errlog.@OBJEXT@: errlog.c errlog.h config.h $(PROJECT_H_DEPS) @WIN_ONLY@w32log.h
-filters.@OBJEXT@: filters.c filters.h config.h $(PROJECT_H_DEPS) errlog.h encode.h gateway.h jbsockets.h jcc.h loadcfg.h parsers.h ssplit.h cgi.h deanimate.h urlmatch.h @WIN_ONLY@win32.h
+filters.@OBJEXT@: filters.c filters.h config.h $(PROJECT_H_DEPS) errlog.h encode.h gateway.h jbsockets.h jcc.h loadcfg.h parsers.h ssplit.h cgi.h deanimate.h urlmatch.h @WIN_ONLY@win32.h
gateway.@OBJEXT@: gateway.c gateway.h config.h $(PROJECT_H_DEPS) errlog.h jbsockets.h jcc.h loadcfg.h
jbsockets.@OBJEXT@: jbsockets.c jbsockets.h config.h $(PROJECT_H_DEPS) filters.h
jcc.@OBJEXT@: jcc.c jcc.h config.h $(PROJECT_H_DEPS) errlog.h filters.h gateway.h jbsockets.h loadcfg.h loaders.h miscutil.h parsers.h @WIN_ONLY@w32log.h win32.h w32svrapi.h cgi.h
gnu_regex.@OBJEXT@: gnu_regex.c gnu_regex.h config.h
# PCRS
-pcrs.@OBJEXT@: pcrs.c pcrs.h config.h @STATIC_PCRE_ONLY@pcre/pcre.h
+pcrs.@OBJEXT@: pcrs.c pcrs.h config.h @STATIC_PCRE_ONLY@pcre/pcre.h
# PCRE
pcre/get.@OBJEXT@: pcre/get.c pcre/config.h pcre/internal.h pcre/pcre.h
pcre/maketables.@OBJEXT@: pcre/maketables.c pcre/config.h pcre/internal.h pcre/pcre.h
-pcre/pcre.@OBJEXT@: pcre/pcre.c pcre/config.h pcre/internal.h pcre/pcre.h pcre/chartables.c
+pcre/pcre.@OBJEXT@: pcre/pcre.c pcre/config.h pcre/internal.h pcre/pcre.h pcre/chartables.c
pcre/pcreposix.@OBJEXT@: pcre/pcreposix.c pcre/config.h pcre/internal.h pcre/pcre.h pcre/pcreposix.h
pcre/study.@OBJEXT@: pcre/study.c pcre/config.h pcre/internal.h pcre/pcre.h
$(RM) -r autom4te.cache
#
-# FIXME: What is all this?
+# FIXME: What is all this?
#
- $(RM) cscope.* *.pdb *.lib *.exp
+ $(RM) cscope.* *.pdb *.lib *.exp
distclean: clobber
install-strip:
$(MAKE) install STRIP=-s
-# FIXME: Test USER and GROUP on Slack to make sure this works as
+# FIXME: Test USER and GROUP on Slack to make sure this works as
# intended.
#
-# FIXME: id handling needs help, probably via configure, since 'id -u' is not
-# universally reliable (eg Solaris). Group handling could be better.
+# FIXME: id handling needs help, probably via configure, since 'id -u' is not
+# universally reliable (eg Solaris). Group handling could be better.
# Perhaps the whole user/group validation should be done here, and simplified.
PROGRAM_V = Privoxy $(VERSION) $(CODE_STATUS)
install: CONF_DEST LOG_DEST PID_DEST check_doc GROUP_T
@if [ -n "$(USER)" ]; then \
$(ID) $(USER) >/dev/null || exit 1;\
fi
- @# Test for valid group. FIXME. USER does not have to belong to GROUP
+ @# Test for valid group. FIXME. USER does not have to belong to GROUP
@# for file ownership purposes.
# if [ -n "$(GROUP_T)" ] && [ -n "$(USER)" ] && ! $(GROUPS) $(USER) | $(GREP) "\<$(GROUP_T)\>" >/dev/null; then \
# $(ECHO) Group $(GROUP_T) for User $(USER) is invalid && exit 1 ;\
$(SED) 's+^#\?user-manual .*+user-manual $(prefix)/doc/privoxy/user-manual/+' config.tmp >config.updated ;\
fi;\
$(MV) config config.base
- $(MV) config.updated config
+ $(MV) config.updated config
- @# Install the config support files. Test for root install, and abort
- @# if there is no privoxy user, and no other user was enabled during
+ @# Install the config support files. Test for root install, and abort
+ @# if there is no privoxy user, and no other user was enabled during
@# configure. Later, install init script if appropriate.
@$(ECHO) Installing templates to $(DESTDIR)$(CONF_DEST)/templates
@for i in `find templates -type f`; do \
* File : $Source: /cvsroot/ijbswa/current/acconfig.h,v $
*
* Purpose : This file should be the first thing included in every
- * .c file. (Before even system headers). It contains
+ * .c file. (Before even system headers). It contains
* #define statements for various features. It was
* introduced because the compile command line started
* getting ludicrously long with feature defines.
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
*/
#undef CODE_STATUS
-/*
+/*
* Should pcre be statically built in instead of linkling with libpcre?
* (This is determined by configure depending on the availiability of
* libpcre and user preferences). The name is ugly, but pcre needs it.
*/
#undef STATIC_PCRE
-/*
+/*
* Should pcrs be statically built in instead of linkling with libpcrs?
* (This is determined by configure depending on the availiability of
* libpcrs and user preferences).
*
* And no, I haven't got that backwards - IE is being weird.
*
- * Known limitations:
+ * Known limitations:
* 1) If you press shift-reload on a blocked HTML page, you get
* the image "blocked" page, not the HTML "blocked" page.
- * 2) Once an image "blocked" page has been sent, viewing it
+ * 2) Once an image "blocked" page has been sent, viewing it
* in it's own browser window *should* bring up the HTML
- * "blocked" page, but it doesn't. You need to clear the
+ * "blocked" page, but it doesn't. You need to clear the
* browser cache to get the HTML version again.
*
* These limitations are due to IE making inconsistent choices
#undef HAVE_GMTIME_R
#undef HAVE_LOCALTIME_R
-/* Define to 'int' if <sys/socket.h> doesn't have it.
+/* Define to 'int' if <sys/socket.h> doesn't have it.
*/
#undef socklen_t
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
#if DEFINE_ACTION_ALIAS
-/*
+/*
* Alternative spellings
*/
DEFINE_ACTION_STRING ("hide-referer", ACTION_HIDE_REFERER, ACTION_STRING_REFERER)
DEFINE_ACTION_BOOL ("prevent-keeping-cookies", ACTION_NO_COOKIE_KEEP)
-/*
+/*
* Pre-3.0.7 (pseudo) compatibility
*/
DEFINE_ACTION_MULTI ("filter-client-headers", ACTION_MULTI_CLIENT_HEADER_FILTER)
DEFINE_ACTION_MULTI ("filter-server-headers", ACTION_MULTI_SERVER_HEADER_FILTER)
-/*
+/*
* Pre-3.0 compatibility
*/
DEFINE_ACTION_BOOL ("no-cookie-read", ACTION_NO_COOKIE_READ)
-const char actions_rcs[] = "$Id: actions.c,v 1.69 2011/05/22 10:21:54 fabiankeil Exp $";
+const char actions_rcs[] = "$Id: actions.c,v 1.70 2011/08/17 10:24:55 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/actions.c,v $
/* too short */
fclose(fp);
log_error(LOG_LEVEL_FATAL,
- "can't load actions file '%s': invalid line (%lu): %s",
+ "can't load actions file '%s': invalid line (%lu): %s",
csp->config->actions_file[fileid], linenum, buf);
return 1; /* never get here */
}
csp->config->actions_file[fileid]);
return 1; /* never get here */
}
-
+
num_fields = ssplit(version_string, ".", fields, SZ(fields), TRUE, FALSE);
if (num_fields < 1 || atoi(fields[0]) == 0)
*
* Description : Converts a actionsfile entry from the internal
* structure into a text line. The output is split
- * into one line for each action with line continuation.
+ * into one line for each action with line continuation.
*
* Parameters :
* 1 : action = The action to format.
* the user manual.
*
* Parameters :
- * 1 : csp = Client state (for config)
+ * 1 : csp = Client state (for config)
* 2 : action = Current action spec to be converted
*
* Returns : A string. Caller must free it.
#ifndef ACTIONS_H_INCLUDED
#define ACTIONS_H_INCLUDED
-#define ACTIONS_H_VERSION "$Id: actions.h,v 1.18 2008/03/30 14:52:00 fabiankeil Exp $"
+#define ACTIONS_H_VERSION "$Id: actions.h,v 1.19 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/actions.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
};
-extern jb_err get_actions (char *line,
+extern jb_err get_actions (char *line,
struct action_alias * alias_list,
struct action_spec *cur_action);
extern void free_alias_list(struct action_alias *alias_list);
extern void init_action(struct action_spec *dest);
extern void free_action(struct action_spec *src);
-extern jb_err merge_actions (struct action_spec *dest,
+extern jb_err merge_actions (struct action_spec *dest,
const struct action_spec *src);
#if 0
extern int update_action_bits_for_all_tags(struct client_state *csp);
#endif
extern int update_action_bits_for_tag(struct client_state *csp, const char *tag);
-extern jb_err copy_action (struct action_spec *dest,
+extern jb_err copy_action (struct action_spec *dest,
const struct action_spec *src);
extern char * actions_to_text (const struct action_spec *action);
extern char * actions_to_html (const struct client_state *csp,
const struct action_spec *action);
extern void init_current_action (struct current_action_spec *dest);
extern void free_current_action (struct current_action_spec *src);
-extern jb_err merge_current_action (struct current_action_spec *dest,
+extern jb_err merge_current_action (struct current_action_spec *dest,
const struct action_spec *src);
extern char * current_action_to_html(const struct client_state *csp,
const struct current_action_spec *action);
-const char amiga_rcs[] = "$Id: amiga.c,v 1.12 2007/01/07 07:40:52 joergs Exp $";
+const char amiga_rcs[] = "$Id: amiga.c,v 1.13 2009/05/16 13:27:20 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/amiga.c,v $
* Copyright : Written by and Copyright (C) 2001 the SourceForge
* Privoxy team. http://www.privoxy.org/
*
- * This program is free software; you can redistribute it
+ * 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
#ifdef AMIGA
#ifndef AMIGA_H_INCLUDED
#define AMIGA_H_INCLUDED
-#define AMIGA_H_VERSION "$Id: amiga.h,v 1.12 2007/01/07 07:40:52 joergs Exp $"
+#define AMIGA_H_VERSION "$Id: amiga.h,v 1.13 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/amiga.h,v $
* Copyright : Written by and Copyright (C) 2001 the SourceForge
* Privoxy team. http://www.privoxy.org/
*
- * This program is free software; you can redistribute it
+ * 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
-const char cgi_rcs[] = "$Id: cgi.c,v 1.142 2011/08/17 10:25:43 fabiankeil Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.143 2011/08/17 10:26:47 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgi.c,v $
* html or gif answers, and to compose HTTP resonses.
* This only contains the framework functions, the
* actual handler functions are declared elsewhere.
- *
+ *
* Functions declared include:
- *
+ *
*
* Copyright : Written by and Copyright (C) 2001-2004, 2006-2008
* the SourceForge Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
"Privoxy main page",
TRUE },
#ifdef FEATURE_GRACEFUL_TERMINATION
- { "die",
- cgi_die,
+ { "die",
+ cgi_die,
"<b>Shut down</b> - <em class=\"warning\">Do not deploy this build in a production environment, "
"this is a one click Denial Of Service attack!!!</em>",
- FALSE },
+ FALSE },
#endif
- { "show-status",
- cgi_show_status,
+ { "show-status",
+ cgi_show_status,
#ifdef FEATURE_CGI_EDIT_ACTIONS
"View & change the current configuration",
#else
"View the current configuration",
#endif
- TRUE },
- { "show-version",
- cgi_show_version,
+ TRUE },
+ { "show-version",
+ cgi_show_version,
"View the source code version numbers",
- TRUE },
- { "show-request",
- cgi_show_request,
+ TRUE },
+ { "show-request",
+ cgi_show_request,
"View the request headers",
- TRUE },
+ TRUE },
{ "show-url-info",
- cgi_show_url_info,
+ cgi_show_url_info,
"Look up which actions apply to a URL and why",
TRUE },
#ifdef FEATURE_TOGGLE
{ "toggle",
- cgi_toggle,
+ cgi_toggle,
"Toggle Privoxy on or off",
FALSE },
#endif /* def FEATURE_TOGGLE */
#ifdef FEATURE_CGI_EDIT_ACTIONS
{ "edit-actions", /* Edit the actions list */
- cgi_edit_actions,
+ cgi_edit_actions,
NULL, FALSE },
{ "eaa", /* Shortcut for edit-actions-add-url-form */
- cgi_edit_actions_add_url_form,
+ cgi_edit_actions_add_url_form,
NULL, FALSE },
{ "eau", /* Shortcut for edit-actions-url-form */
- cgi_edit_actions_url_form,
+ cgi_edit_actions_url_form,
NULL, FALSE },
{ "ear", /* Shortcut for edit-actions-remove-url-form */
- cgi_edit_actions_remove_url_form,
+ cgi_edit_actions_remove_url_form,
NULL, FALSE },
{ "eal", /* Shortcut for edit-actions-list */
- cgi_edit_actions_list,
+ cgi_edit_actions_list,
NULL, FALSE },
{ "eafu", /* Shortcut for edit-actions-for-url */
- cgi_edit_actions_for_url,
+ cgi_edit_actions_for_url,
NULL, FALSE },
{ "eas", /* Shortcut for edit-actions-submit */
- cgi_edit_actions_submit,
+ cgi_edit_actions_submit,
NULL, FALSE },
{ "easa", /* Shortcut for edit-actions-section-add */
- cgi_edit_actions_section_add,
+ cgi_edit_actions_section_add,
NULL, FALSE },
{ "easr", /* Shortcut for edit-actions-section-remove */
- cgi_edit_actions_section_remove,
+ cgi_edit_actions_section_remove,
NULL, FALSE },
{ "eass", /* Shortcut for edit-actions-section-swap */
- cgi_edit_actions_section_swap,
+ cgi_edit_actions_section_swap,
NULL, FALSE },
{ "edit-actions-for-url",
- cgi_edit_actions_for_url,
+ cgi_edit_actions_for_url,
NULL, FALSE /* Edit the actions for (a) specified URL(s) */ },
{ "edit-actions-list",
- cgi_edit_actions_list,
+ cgi_edit_actions_list,
NULL, TRUE /* Edit the actions list */ },
{ "edit-actions-submit",
- cgi_edit_actions_submit,
+ cgi_edit_actions_submit,
NULL, FALSE /* Change the actions for (a) specified URL(s) */ },
{ "edit-actions-url",
- cgi_edit_actions_url,
+ cgi_edit_actions_url,
NULL, FALSE /* Change a URL pattern in the actionsfile */ },
{ "edit-actions-url-form",
- cgi_edit_actions_url_form,
+ cgi_edit_actions_url_form,
NULL, FALSE /* Form to change a URL pattern in the actionsfile */ },
{ "edit-actions-add-url",
- cgi_edit_actions_add_url,
+ cgi_edit_actions_add_url,
NULL, FALSE /* Add a URL pattern to the actionsfile */ },
{ "edit-actions-add-url-form",
- cgi_edit_actions_add_url_form,
+ cgi_edit_actions_add_url_form,
NULL, FALSE /* Form to add a URL pattern to the actionsfile */ },
{ "edit-actions-remove-url",
- cgi_edit_actions_remove_url,
+ cgi_edit_actions_remove_url,
NULL, FALSE /* Remove a URL pattern from the actionsfile */ },
{ "edit-actions-remove-url-form",
- cgi_edit_actions_remove_url_form,
+ cgi_edit_actions_remove_url_form,
NULL, FALSE /* Form to remove a URL pattern from the actionsfile */ },
{ "edit-actions-section-add",
- cgi_edit_actions_section_add,
+ cgi_edit_actions_section_add,
NULL, FALSE /* Remove a section from the actionsfile */ },
{ "edit-actions-section-remove",
- cgi_edit_actions_section_remove,
+ cgi_edit_actions_section_remove,
NULL, FALSE /* Remove a section from the actionsfile */ },
{ "edit-actions-section-swap",
- cgi_edit_actions_section_swap,
+ cgi_edit_actions_section_swap,
NULL, FALSE /* Swap two sections in the actionsfile */ },
#endif /* def FEATURE_CGI_EDIT_ACTIONS */
- { "error-favicon.ico",
- cgi_send_error_favicon,
+ { "error-favicon.ico",
+ cgi_send_error_favicon,
NULL, TRUE /* Sends the favicon image for error pages. */ },
- { "favicon.ico",
- cgi_send_default_favicon,
+ { "favicon.ico",
+ cgi_send_default_favicon,
NULL, TRUE /* Sends the default favicon image. */ },
- { "robots.txt",
- cgi_robots_txt,
- NULL, TRUE /* Sends a robots.txt file to tell robots to go away. */ },
+ { "robots.txt",
+ cgi_robots_txt,
+ NULL, TRUE /* Sends a robots.txt file to tell robots to go away. */ },
{ "send-banner",
- cgi_send_banner,
+ cgi_send_banner,
NULL, TRUE /* Send a built-in image */ },
{ "send-stylesheet",
- cgi_send_stylesheet,
+ cgi_send_stylesheet,
NULL, FALSE /* Send templates/cgi-style.css */ },
{ "t",
- cgi_transparent_image,
+ cgi_transparent_image,
NULL, TRUE /* Send a transparent image (short name) */ },
{ "url-info-osd.xml",
- cgi_send_url_info_osd,
+ cgi_send_url_info_osd,
NULL, TRUE /* Send templates/url-info-osd.xml */ },
{ "user-manual",
cgi_send_user_manual,
/*********************************************************************
- *
+ *
* Function : dispatch_cgi
*
* Description : Checks if a request URL has either the magical
return NULL;
}
- /*
+ /*
* This is a CGI call.
*/
/*********************************************************************
- *
+ *
* Function : referrer_is_safe
*
* Description : Decides whether we trust the Referer for
}
/*********************************************************************
- *
+ *
* Function : dispatch_known_cgi
*
* Description : Processes a CGI once dispatch_cgi has determined that
{
query_args_start++;
}
- if (*query_args_start == '/')
+ if (*query_args_start == '/')
{
*query_args_start++ = '\0';
if ((param_list = new_map()))
return cgi_error_memory();
}
- /*
+ /*
* Find and start the right CGI function
*/
d = cgi_dispatchers;
d++;
}
}
-
-
+
+
/*********************************************************************
*
* Function : parse_cgi_parameters
return NULL;
}
- /*
+ /*
* IE 5 does, of course, violate RFC 2316 Sect 4.1 and sends
* the fragment identifier along with the request, so we must
* cut it off here, so it won't pollute the CGI params:
assert(name);
assert(pvalue);
- *pvalue = 0;
+ *pvalue = 0;
param = lookup(parameters, name);
if (!*param)
if (!err) err = map(exports, "host", 1, html_encode(csp->http->host), 0);
if (!err) err = map(exports, "hostport", 1, html_encode(csp->http->hostport), 0);
if (!err) err = map(exports, "path", 1, html_encode_and_free_original(path), 0);
- if (!err) err = map(exports, "protocol", 1, csp->http->ssl ? "https://" : "http://", 1);
+ if (!err) err = map(exports, "protocol", 1, csp->http->ssl ? "https://" : "http://", 1);
if (!err)
{
err = map(exports, "host-ip", 1, html_encode(csp->http->host_ip_addr_str), 0);
*
* Description : Almost-CGI function that is called if a template
* cannot be loaded. Note this is not a true CGI,
- * it takes a template name rather than a map of
+ * it takes a template name rather than a map of
* parameters.
*
* Parameters :
* be loaded.
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_error_no_template(const struct client_state *csp,
* 3 : error_to_report = Error code to report.
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_error_unknown(const struct client_state *csp,
*
* Description : CGI function that is called if the parameters
* (query string) for a CGI were wrong.
- *
+ *
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
* 2 : rsp = http_response data structure for output
* CGI Parameters : none
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_error_bad_param(const struct client_state *csp,
/*********************************************************************
*
- * Function : cgi_redirect
+ * Function : cgi_redirect
*
* Description : CGI support function to generate a HTTP redirect
* message
* CGI Parameters : None
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_redirect (struct http_response * rsp, const char *target)
* FIXME: I currently only work for actions, and would
* like to be generalized for other topics.
*
- * Parameters :
- * 1 : item = item (will NOT be free()d.)
+ * Parameters :
+ * 1 : item = item (will NOT be free()d.)
* It is assumed to be HTML-safe.
* 2 : config = The current configuration.
*
* HTTP header - e.g.:
* "Sun, 06 Nov 1994 08:49:37 GMT"
*
- * Parameters :
+ * Parameters :
* 1 : time_offset = Time returned will be current time
* plus this number of seconds.
* 2 : buf = Destination for result.
return rsp;
}
- /*
+ /*
* Fill in the HTTP Status, using HTTP/1.1
* unless the client asked for HTTP/1.0.
*/
rsp->status ? rsp->status : "200 OK");
err = enlist_first(rsp->headers, buf);
- /*
+ /*
* Set the Content-Length
*/
if (rsp->content_length == 0)
* Last-Modified: set to date/time the page was last changed.
* Expires: set to date/time page next needs reloading.
* Cache-Control: set to "no-cache" if applicable.
- *
+ *
* See http://www.w3.org/Protocols/rfc2068/rfc2068
*/
if (rsp->is_static)
err = enlist_unique_header(rsp->headers, "Connection", "close");
}
- /*
+ /*
* Write the head
*/
if (err || (NULL == (rsp->head = list_to_text(rsp->headers))))
* following an #include statament
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
* JB_ERR_FILE if the template file cannot be read
*
*********************************************************************/
-jb_err template_load(const struct client_state *csp, char **template_ptr,
+jb_err template_load(const struct client_state *csp, char **template_ptr,
const char *templatename, int recursive)
{
jb_err err;
}
free(full_path);
- /*
+ /*
* Read the file, ignoring comments, and honoring #include
* statements, unless we're already called recursively.
*
file_buffer = *template_ptr;
size = strlen(file_buffer) + 1;
- /*
+ /*
* Assemble pcrs joblist from exports map
*/
for (m = exports->first; m != NULL; m = m->next)
else
{
/*
- * Treat the "replace with" text as a literal string -
+ * Treat the "replace with" text as a literal string -
* no quoting needed, no backreferences allowed.
* ("Trivial" ['T'] flag).
*/
/* Make and run job. */
job = pcrs_compile(buf, m->value, flags, &error);
- if (job == NULL)
+ if (job == NULL)
{
if (error == PCRS_ERR_NOMEM)
{
if (error < 0)
{
- /*
+ /*
* Substitution failed, keep the original buffer,
* log the problem and ignore it.
- *
+ *
* The user might see some unresolved @CGI_VARIABLES@,
* but returning a special CGI error page seems unreasonable
* and could mask more important error messages.
struct http_response *rsp)
{
jb_err err;
-
+
assert(csp);
assert(templatename);
assert(exports);
* "if-<name>-start.*if-<name>-end" to the given
* export list.
*
- * Parameters :
+ * Parameters :
* 1 : exports = map to extend
* 2 : name = name of conditional block
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err map_block_killer(struct map *exports, const char *name)
* by map-block-killer, to save a few bytes.
* i.e. removes "@if-<name>-start@" and "@if-<name>-end@"
*
- * Parameters :
+ * Parameters :
* 1 : exports = map to extend
* 2 : name = name of conditional block
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err map_block_keep(struct map *exports, const char *name)
* The control structure and one of the alternatives
* will be hidden.
*
- * Parameters :
+ * Parameters :
* 1 : exports = map to extend
* 2 : name = name of conditional block
* 3 : choose_first = nonzero for first, zero for second.
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err map_conditional(struct map *exports, const char *name, int choose_first)
*
* Function : make_menu
*
- * Description : Returns an HTML-formatted menu of the available
+ * Description : Returns an HTML-formatted menu of the available
* unhidden CGIs, excluding the one given in <self>
* and the toggle CGI if toggling is disabled.
*
* 1 : self = name of CGI to leave out, can be NULL for
* complete listing.
* 2 : feature_flags = feature bitmap from csp->config
- *
+ *
*
* Returns : menu string, or NULL on out-of-memory error.
*
html_encoded_prefix = html_encode(CGI_PREFIX);
if (html_encoded_prefix == NULL)
{
- return NULL;
+ return NULL;
}
else
{
#ifndef CGI_H_INCLUDED
#define CGI_H_INCLUDED
-#define CGI_H_VERSION "$Id: cgi.h,v 1.39 2011/07/03 17:55:23 fabiankeil Exp $"
+#define CGI_H_VERSION "$Id: cgi.h,v 1.40 2011/07/08 13:27:31 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgi.h,v $
*
* Purpose : Declares functions to intercept request, generate
* html or gif answers, and to compose HTTP resonses.
- *
+ *
* Functions declared include:
- *
+ *
*
* Copyright : Written by and Copyright (C) 2001-2009 the
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
extern jb_err map_block_keep (struct map *exports, const char *name);
extern jb_err map_conditional (struct map *exports, const char *name, int choose_first);
-extern jb_err template_load(const struct client_state *csp, char ** template_ptr,
+extern jb_err template_load(const struct client_state *csp, char ** template_ptr,
const char *templatename, int recursive);
extern jb_err template_fill(char ** template_ptr, const struct map *exports);
extern jb_err template_fill_for_cgi(const struct client_state *csp,
-const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.68 2011/01/22 12:30:22 fabiankeil Exp $";
+const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.69 2011/04/19 13:00:47 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgiedit.c,v $
{
/** Next entry in the linked list */
struct file_line * next;
-
+
/** The raw data, to write out if this line is unmodified. */
char * raw;
-
+
/** Comments and/or whitespace to put before this line if it's modified
and then written out. */
char * prefix;
are performed on the data read from file before it's stored here, so
it will be a single line of data. */
char * unprocessed;
-
+
/** The type of data on this line. One of the FILE_LINE_xxx constants. */
int type;
const char *name);
#endif /* unused function */
-static jb_err get_file_name_param(struct client_state *csp,
- const struct map *parameters,
- const char *param_name,
+static jb_err get_file_name_param(struct client_state *csp,
+ const struct map *parameters,
+ const char *param_name,
const char **pfilename);
/* Internal convenience functions */
if (cur_line->type == FILE_LINE_ACTION)
{
section_start_line_number = line_number;
- }
+ }
cur_line = cur_line->next;
}
if (cur_line->type == FILE_LINE_ACTION)
{
section_start_line_number = line_number;
- }
+ }
cur_line = cur_line->next;
line_number++;
}
*
* Description : Converts a string into a form JavaScript will like.
*
- * Netscape 4's JavaScript sucks - it doesn't use
+ * Netscape 4's JavaScript sucks - it doesn't use
* "id" parameters, so you have to set the "name"
* used to submit a form element to something JavaScript
* will like. (Or access the elements by index in an
#ifndef CGIEDIT_H_INCLUDED
#define CGIEDIT_H_INCLUDED
-#define CGIEDIT_H_VERSION "$Id: cgiedit.h,v 1.10 2008/08/31 15:59:03 fabiankeil Exp $"
+#define CGIEDIT_H_VERSION "$Id: cgiedit.h,v 1.11 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgiedit.h,v $
*
* Purpose : CGI-based actionsfile editor.
- *
+ *
* Functions declared include:
- *
+ *
*
* 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
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.109 2011/04/19 13:00:47 fabiankeil Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.110 2011/06/23 14:01:39 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
*
* Purpose : Simple CGIs to get information about Privoxy's
* status.
- *
+ *
* Functions declared include:
- *
+ *
*
* Copyright : Written by and Copyright (C) 2001-2011 the
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
* Description : CGI function that is called for the CGI_SITE_1_HOST
* and CGI_SITE_2_HOST/CGI_SITE_2_PATH base URLs.
* Boring - only exports the default exports.
- *
+ *
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
* 2 : rsp = http_response data structure for output
*
* Description : CGI function that is called if an unknown action was
* given.
- *
+ *
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
* 2 : rsp = http_response data structure for output
* CGI Parameters : none
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_error_404(struct client_state *csp,
* NOTE: Turning this on in a production build
* would be a BAD idea. An EXTREMELY BAD idea.
* In short, don't do it.
- *
+ *
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
* 2 : rsp = http_response data structure for output
* CGI Parameters : none
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_die (struct client_state *csp,
*
* Description : Show the client's request and what sed() would have
* made of it.
- *
+ *
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
* 2 : rsp = http_response data structure for output
* CGI Parameters : none
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_show_request(struct client_state *csp,
{
return JB_ERR_MEMORY;
}
-
+
/*
* Repair the damage done to the IOB by get_header()
*/
*
* Function : cgi_send_banner
*
- * Description : CGI function that returns a banner.
+ * Description : CGI function that returns a banner.
*
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
* equivalent).
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_send_banner(struct client_state *csp,
* If type is auto, then determine the right thing
* to do from the set-image-blocker action
*/
- if (imagetype == 'a')
+ if (imagetype == 'a')
{
/*
* Default to pattern
}
#endif /* def FEATURE_IMAGE_BLOCKING */
}
-
+
/*
* Now imagetype is either the non-auto type we were called with,
* or it was auto and has since been determined. In any case, we
* can proceed to actually answering the request by sending a redirect
* or an image as appropriate:
*/
- if (imagetype == 'r')
+ if (imagetype == 'r')
{
rsp->status = strdup("302 Local Redirect from Privoxy");
if (rsp->status == NULL)
}
else
{
- if ((imagetype == 'b') || (imagetype == 't'))
+ if ((imagetype == 'b') || (imagetype == 't'))
{
rsp->body = bindup(image_blank_data, image_blank_length);
rsp->content_length = image_blank_length;
* CGI Parameters : None
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_transparent_image(struct client_state *csp,
* CGI Parameters : None
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_send_default_favicon(struct client_state *csp,
* CGI Parameters : None
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_send_error_favicon(struct client_state *csp,
* CGI Parameters : None
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_send_stylesheet(struct client_state *csp,
const struct map *parameters)
{
jb_err err;
-
+
assert(csp);
assert(rsp);
* CGI Parameters : None
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_send_url_info_osd(struct client_state *csp,
* (relative to user-manual from config)
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_send_user_manual(struct client_state *csp,
* CGI Parameters : none
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_show_version(struct client_state *csp,
* Default is to show menu and other information.
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_show_status(struct client_state *csp,
if (!err) err = map(exports, "options", 1, csp->config->proxy_args, 1);
if (!err) err = show_defines(exports);
- if (err)
+ if (err)
{
free_map(exports);
return JB_ERR_MEMORY;
#else /* ndef FEATURE_STATISTICS */
err = err || map_block_killer(exports, "statistics");
#endif /* ndef FEATURE_STATISTICS */
-
- /*
+
+ /*
* List all action files in use, together with view and edit links,
* except for standard.action, which should only be viewable. (Not
* enforced in the editor itself)
if (!err) err = string_append(&s, "</td></tr>\n");
}
}
- if (*s != '\0')
+ if (*s != '\0')
{
if (!err) err = map(exports, "actions-filenames", 1, s, 0);
}
if (!err) err = map(exports, "actions-filenames", 1, "<tr><td>None specified</td></tr>", 1);
}
- /*
+ /*
* List all re_filterfiles in use, together with view options.
* FIXME: Shouldn't include hardwired HTML here, use line template instead!
*/
if (!err) err = string_append(&s, "</td></tr>\n");
}
}
- if (*s != '\0')
+ if (*s != '\0')
{
if (!err) err = map(exports, "re-filter-filenames", 1, s, 0);
}
return template_fill_for_cgi(csp, "show-status", exports, rsp);
}
-
+
/*********************************************************************
*
* Function : cgi_show_url_info
* the template.
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_show_url_info(struct client_state *csp,
struct http_request url_to_query[1];
struct current_action_spec action[1];
int i;
-
+
if (map(exports, "url", 1, html_encode(url_param), 0))
{
free(url_param);
* CGI Parameters : None
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
jb_err cgi_robots_txt(struct client_state *csp,
* 1 : exports = map to extend
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
static jb_err show_defines(struct map *exports)
* Default is to show menu and other information.
*
* Returns : JB_ERR_OK on success
- * JB_ERR_MEMORY on out-of-memory error.
+ * JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
static jb_err cgi_show_file(struct client_state *csp,
return JB_ERR_CGI_PARAMS;
}
-
+
/*********************************************************************
*
* Function : load_file
#ifndef CGISIMPLE_H_INCLUDED
#define CGISIMPLE_H_INCLUDED
-#define CGISIMPLE_H_VERSION "$Id: cgisimple.h,v 1.16 2008/05/26 17:30:55 fabiankeil Exp $"
+#define CGISIMPLE_H_VERSION "$Id: cgisimple.h,v 1.17 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgisimple.h,v $
*
* Purpose : Declares functions to intercept request, generate
* html or gif answers, and to compose HTTP resonses.
- *
+ *
* Functions declared include:
- *
+ *
*
* Copyright : Written by and Copyright (C) 2001-2007 the SourceForge
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
dnl Process this file with autoconf to produce a configure script.
-dnl
-dnl $Id: configure.in,v 1.158 2011/06/23 14:01:01 fabiankeil Exp $
-dnl
+dnl
+dnl $Id: configure.in,v 1.159 2011/07/03 17:53:00 fabiankeil Exp $
+dnl
dnl Written by and Copyright (C) 2001-2010 the
dnl Privoxy team. http://www.privoxy.org/
dnl
dnl Based on the Internet Junkbuster originally written
-dnl by and Copyright (C) 1997 Anonymous Coders and
+dnl by and Copyright (C) 1997 Anonymous Coders and
dnl Junkbusters Corporation. http://www.junkbusters.com
dnl
-dnl This program is free software; you can redistribute it
+dnl This program is free software; you can redistribute it
dnl and/or modify it under the terms of the GNU General
dnl Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at
dnl your option) any later version.
-dnl
+dnl
dnl This program is distributed in the hope that it will
dnl be useful, but WITHOUT ANY WARRANTY; without even the
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE. See the GNU General Public
dnl License for more details.
-dnl
+dnl
dnl The GNU General Public License should be included with
dnl this file. If not, you can view it at
dnl http://www.gnu.org/copyleft/gpl.html
dnl or write to the Free Software Foundation, Inc., 59
dnl Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-dnl
+dnl
dnl =================================================================
dnl AutoConf Initialization
dnl =================================================================
-AC_REVISION($Revision: 1.158 $)
+AC_REVISION($Revision: 1.159 $)
AC_INIT(jcc.c)
if test ! -f config.h.in; then
else
autoheader
fi
-fi
+fi
AC_CONFIG_HEADER([config.h])
AC_CANONICAL_HOST
dodk=auto
DKPREFIX=none
AC_ARG_WITH(docbook, dnl
- --with-docbook=[[yes|no|directory]]
- Enable docbook documentation creation
+ --with-docbook=[[yes|no|directory]]
+ Enable docbook documentation creation
(default = yes, for gnu and linux),[dnl
case "$with_docbook" in
yes) dodk=yes;;
no) dodk=no;;
-*)
+*)
dodk=yes
DKPREFIX=$withval
;;
AC_SUBST(BGROUPS)
dnl =================================================================
-dnl debug, gcc and gdb support
+dnl debug, gcc and gdb support
dnl =================================================================
AC_ARG_WITH(debug,
AC_MSG_CHECKING([for group])
AC_ARG_WITH(group,
[ --with-group=privoxy Set group for privoxy],
- [
+ [
if test "x$withval" != "xyes"; then
if test $BGROUPS = no ; then
AC_MSG_ERROR(There is no 'groups' program on this system)
dnl =================================================================
dnl additional gcc flags
dnl =================================================================
-dnl
+dnl
if test "$GCC"; then
if test "$host" != "powerpc-unknown-amigaos"; then
CFLAGS="-pipe $CFLAGS"
dnl into Cygwin or MinGW32 modes. Depending on the mode selected,
dnl the compiler will use completely different sets of library
dnl and include files.
-dnl
+dnl
dnl =================================================================
AC_MINGW32
fi
if test $DB2HTML = false; then
dnl We need to clean the variable, otherwise AC_CHECK_PROGS
- dnl will fail
+ dnl will fail
DB2HTML=""
AC_CHECK_PROGS(DB2HTML,db2html docbook2html,false)
fi
[if test $enableval = no; then
# Disable pthreads
if test $have_pthread = yes; then
- AC_MSG_WARN([pthreads seem to be available but you are using --disable-pthread.])
+ AC_MSG_WARN([pthreads seem to be available but you are using --disable-pthread.])
AC_MSG_WARN([This is almost always a mistake and can render Privoxy unacceptable slow.])
fi
have_pthread=no
dnl =================================================================
dnl Mac OSX specific
dnl =================================================================
-
+
case "$host" in
*-apple-darwin*) SPECIAL_CFLAGS="-Dunix"
-;;
+;;
esac
dnl =================================================================
], [have_pcre=no])
])
], [have_pcre=no])
-
+
AC_CHECK_LIB(pcreposix, regcomp, [
AC_CHECK_HEADER(pcreposix.h, [
AC_EGREP_HEADER(pcreposix_regerror, pcreposix.h, [AC_MSG_WARN([[pcreposix old version installed]]); have_pcreposix=no], [have_pcreposix=yes])
AC_EGREP_HEADER(pcreposix_regerror, pcre/pcreposix.h, [AC_MSG_WARN([[pcreposix old version installed]]); have_pcreposix=no], [have_pcreposix=yes]; [AC_DEFINE(PCREPOSIX_H_IN_SUBDIR)])
], [have_pcreposix=no])
])
-], [have_pcreposix=no], -lpcre)
+], [have_pcreposix=no], -lpcre)
dnl ================================================================
dnl libpcrs is temporarily disabled.
fi],)
AC_ARG_ENABLE(image-blocking,
-[ --disable-image-blocking Don't try to figure out whether a request is
+[ --disable-image-blocking Don't try to figure out whether a request is
for an image or HTML - assume HTML.],
[if test $enableval = yes; then
AC_DEFINE(FEATURE_IMAGE_BLOCKING)
AC_MSG_WARN([No zlib found.
Privoxy will not be able to filter compressed content.
This may become a fatal error in the future.])
- fi
+ fi
fi
AC_ARG_ENABLE(compression,
#ifndef CYGWIN_H_INCLUDED
#define CYGWIN_H_INCLUDED
-#define CYGWIN_H_VERSION "$Id: cygwin.h,v 1.6 2006/07/18 14:48:45 david__schmidt Exp $"
+#define CYGWIN_H_VERSION "$Id: cygwin.h,v 1.7 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cygwin.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char deanimate_rcs[] = "$Id: deanimate.c,v 1.19 2008/05/21 15:29:35 fabiankeil Exp $";
+const char deanimate_rcs[] = "$Id: deanimate.c,v 1.20 2009/05/16 13:27:20 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/deanimate.c,v $
* Purpose : Declares functions to manipulate binary images on the
* fly. High-level functions include:
* - Deanimation of GIF images
- *
+ *
* Functions declared include: gif_deanimate, buf_free,
* buf_copy, buf_getbyte, gif_skip_data_block
* and gif_extract_image
* and ideas from the Image::DeAnim Perl module by
* Ken MacFarlane, <ksm+cpan@universal.dca.net>
*
- * This program is free software; you can redistribute it
+ * 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
const char deanimate_h_rcs[] = DEANIMATE_H_VERSION;
/*********************************************************************
- *
+ *
* Function : buf_free
*
* Description : Safely frees a struct binbuffer
/*********************************************************************
- *
+ *
* Function : buf_extend
*
* Description : Ensure that a given binbuffer can hold a given amount
* Parameters :
* 1 : buf = Pointer to the binbuffer
* 2 : length = Desired minimum size
- *
+ *
*
* Returns : 0 on success, 1 on failure.
*
/*********************************************************************
- *
+ *
* Function : buf_copy
*
* Description : Safely copies a given amount of bytes from one
/*
* Sanity check: Can't copy more data than we have
*/
- if (src->offset + length > src->size)
+ if (src->offset + length > src->size)
{
return 1;
}
/*
* Ensure that dst can hold the new data
*/
- if (buf_extend(dst, length))
+ if (buf_extend(dst, length))
{
return 1;
}
/*********************************************************************
- *
+ *
* Function : buf_getbyte
*
* Description : Safely gets a byte from a given binbuffer at a
/*********************************************************************
- *
+ *
* Function : gif_skip_data_block
*
* Description : Safely advances the offset of a given struct binbuffer
{
unsigned char c;
- /*
+ /*
* Data blocks are sequences of chunks, which are headed
* by a one-byte length field, with the last chunk having
* zero length.
/*********************************************************************
- *
+ *
* Function : gif_extract_image
*
* Description : Safely extracts an image data block from a given
* struct binbuffer that contains a GIF image and whose
- * offset is positioned at the start of a data block
+ * offset is positioned at the start of a data block
* into a given destination binbuffer.
*
* Parameters :
if (buf_copy(src, dst, (size_t)map_length))
{
return 1;
- }
+ }
}
if (buf_copy(src, dst, 1)) return 1;
}
/*********************************************************************
- *
+ *
* Function : gif_deanimate
*
* Description : Deanimate a given GIF image, i.e. given a GIF with
c = buf_getbyte(src, 10);
/*
- * Check & copy GIF header
+ * Check & copy GIF header
*/
- if (strncmp(src->buffer, "GIF89a", 6) && strncmp(src->buffer, "GIF87a", 6))
+ if (strncmp(src->buffer, "GIF89a", 6) && strncmp(src->buffer, "GIF87a", 6))
{
return 1;
}
case 0x3b:
goto write;
- /*
+ /*
* Image block: Extract to current image buffer.
*/
case 0x2c:
*/
default:
goto failed;
-
+
}
} /* -END- while src */
/*
* Either we got here by goto, or because the GIF is
- * bogus and EOF was reached before an end-of-gif marker
+ * bogus and EOF was reached before an end-of-gif marker
* was found.
*/
#ifndef DEANIMATE_H_INCLUDED
#define DEANIMATE_H_INCLUDED
-#define DEANIMATE_H_VERSION "$Id: deanimate.h,v 1.12 2008/03/28 15:13:39 fabiankeil Exp $"
+#define DEANIMATE_H_VERSION "$Id: deanimate.h,v 1.13 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/deanimate.h,v $
* Purpose : Declares functions to manipulate binary images on the
* fly. High-level functions include:
* - Deanimation of GIF images
- *
+ *
* Functions declared include: gif_deanimate and buf_free.
- *
+ *
*
* Copyright : Written by and Copyright (C) 2001 - 2004 by the the
* SourceForge Privoxy team. http://www.privoxy.org/
* Ken MacFarlane, <ksm+cpan@universal.dca.net>
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
extern int gif_deanimate(struct binbuffer *src, struct binbuffer *dst, int get_first_image);
extern void buf_free(struct binbuffer *buf);
-/*
+/*
* Revision control strings from this header and associated .c file
*/
extern const char deanimate_rcs[];
File : $Source: /cvsroot/ijbswa/current/doc/source/authors.sgml,v $
Purpose : AUTHORS file for Privoxy
-
- $Id: authors.sgml,v 2.17 2010/11/06 12:55:48 fabiankeil Exp $
-
+ $Id: authors.sgml,v 2.18 2011/08/17 10:40:07 fabiankeil Exp $
+
+
Copyright (C) 2001-2009 Privoxy Developers http://www.privoxy.org/
See LICENSE.
========================================================================
- NOTE: Please read developer-manual/documentation.html before touching
+ NOTE: Please read developer-manual/documentation.html before touching
anything in this, or other Privoxy documentation. You have been warned!
- Failure to abide by this rule will result in the revocation of your license
+ Failure to abide by this rule will result in the revocation of your license
to live a peaceful existence!
========================================================================
===================================================================
- READ: Document Note: This file generates the AUTHORS file in the
+ READ: Document Note: This file generates the AUTHORS file in the
top level source directory. See p-authors.sgml for list of developers
and contributors, etc. They were split from here for use in man page.
===================================================================
-->
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
-<!entity % dummy "IGNORE">
+<!entity % dummy "IGNORE">
<!entity authors SYSTEM "p-authors.sgml">
<!entity p-version "3.0.18">
<!entity p-status "UNRELEASED">
File : $Source: /cvsroot/ijbswa/current/doc/source/buildsource.sgml,v $
Purpose : Entity included in other project documents.
-
- $Id: buildsource.sgml,v 2.17 2009/02/21 13:27:58 hal9 Exp $
+
+ $Id: buildsource.sgml,v 2.18 2009/02/23 09:03:12 fabiankeil Exp $
Copyright (C) 2001-2009 Privoxy Developers http://www.privoxy.org/
See LICENSE.
This file used for inclusion with other documents only.
======================================================================
- If you make changes to this file, please verify the finished
+ If you make changes to this file, please verify the finished
docs all display as intended.
This file is included into:
-->
<para>
- To build <application>Privoxy</application> from source,
+ To build <application>Privoxy</application> from source,
<ulink url="http://www.gnu.org/software/autoconf/autoconf.html">autoconf</ulink>,
<ulink
url="http://www.gnu.org/software/make/make.html">GNU make
<para>
When building from a source tarball,
-<!--
+<!--
no longer available ...
<ulink
url="http://cvs.sourceforge.net/cvstarballs/ijbswa-cvsroot.tar.gz">nightly CVS
- tarball</ulink>),
---> first unpack the source:
+ tarball</ulink>),
+--> first unpack the source:
</para>
<para>
</para>
<para>
- This will create a directory named <filename>current/</filename>, which will
+ This will create a directory named <filename>current/</filename>, which will
contain the source tree.
</para>
and group just for this purpose. See your local documentation for the correct
command line to do add new users and groups (something like
<command>adduser</command>, but the command syntax may vary from platform
- to platform).
+ to platform).
</para>
<para>
autoheader
autoconf
./configure # (--help to see options)
- make # (the make from GNU, sometimes called gmake)
+ make # (the make from GNU, sometimes called gmake)
su # Possibly required
make -n install # (to see where all the files will go)
make -s install # (to really install, -s to silence output)</screen>
</para>
<para>
- To build an executable with security enhanced features so that
+ To build an executable with security enhanced features so that
users cannot easily bypass the proxy (e.g. <quote>Go There Anyway</quote>), or
alter their own configurations, <command>configure</command> like this:
</para>
<para>
<screen>
./configure --disable-toggle --disable-editor --disable-force</screen>
-</para>
+</para>
<para>
Then build as above. In Privoxy 3.0.7 and later, all of these options
can also be disabled through the configuration file.
</para>
<para>
- The default installation path for <command>make install</command> is
- <filename>/usr/local</filename>. This may of course be customized with
- the various <command>./configure</command> path options. If you are doing
+ The default installation path for <command>make install</command> is
+ <filename>/usr/local</filename>. This may of course be customized with
+ the various <command>./configure</command> path options. If you are doing
an install to anywhere besides <filename>/usr/local</filename>, be
sure to set the appropriate paths with the correct configure options
(<command>./configure --help</command>). Non-privileged users must of course
<literal>localstatedir</literal> (ie: <filename>var/</filename>) will default
to <filename>/var</filename> instead of <literal>$prefix/var</literal> so
the logs will go to <filename>/var/log/privoxy/</filename>, and the pid file
- will be created in <filename>/var/run/privoxy.pid</filename>.
+ will be created in <filename>/var/run/privoxy.pid</filename>.
</para>
<para>
- <command>make install</command> will attempt to set the correct values
- in <filename>config</filename> (main configuration file). You should
+ <command>make install</command> will attempt to set the correct values
+ in <filename>config</filename> (main configuration file). You should
check this to make sure all values are correct. If appropriate,
- an init script will be installed, but it is up to the user to determine
- how and where to start <application>Privoxy</application>. The init
+ an init script will be installed, but it is up to the user to determine
+ how and where to start <application>Privoxy</application>. The init
script should be checked for correct paths and values, if anything other than
a default install is done.
</para>
<!-- Actually this is now in INSTALL -->
<![%p-readme;[
<para>
- The simplest command line to start <application>Privoxy</application> is
- <command>$path/privoxy --user=privoxy $path/etc/privoxy/config</command>.
- See <command>privoxy --usage</command>, or the man page, for other options,
+ The simplest command line to start <application>Privoxy</application> is
+ <command>$path/privoxy --user=privoxy $path/etc/privoxy/config</command>.
+ See <command>privoxy --usage</command>, or the man page, for other options,
and configuration.
</para>
]]>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN"[
-<!entity % dummy "IGNORE">
+<!entity % dummy "IGNORE">
<!entity config SYSTEM "p-config.sgml">
<!entity p-version "3.0.18">
<!entity p-status "UNRELEASED">
File : $Source: /cvsroot/ijbswa/current/doc/source/config.sgml,v $
Purpose : config file generation
-
- $Id: config.sgml,v 2.18 2010/11/06 12:55:48 fabiankeil Exp $
+
+ $Id: config.sgml,v 2.19 2011/08/17 10:40:07 fabiankeil Exp $
Copyright (C) 2001-2009 Privoxy Developers http://www.privoxy.org/
See LICENSE.
========================================================================
- NOTE: Please read developer-manual/documentation.html before touching
- anything in this, or other Privoxy documentation.
+ NOTE: Please read developer-manual/documentation.html before touching
+ anything in this, or other Privoxy documentation.
========================================================================
- This file is used to generate the main Privoxy config file. It is mostly
- content included from p-config.sgml (where all the data is). See that
+ This file is used to generate the main Privoxy config file. It is mostly
+ content included from p-config.sgml (where all the data is). See that
file for more comments.
-->
File : $Source: /cvsroot/ijbswa/current/doc/source/contacting.sgml,v $
Purpose : Entity included in other project documents.
-
- $Id: contacting.sgml,v 2.24 2011/05/03 10:13:21 fabiankeil Exp $
+
+ $Id: contacting.sgml,v 2.25 2011/08/18 11:42:50 fabiankeil Exp $
Copyright (C) 2001-2011 Privoxy Developers http://www.privoxy.org/
See LICENSE.
<para>
We value your feedback. In fact, we rely on it to improve
<application>Privoxy</application> and its configuration.
- However, please note the following hints, so we can
+ However, please note the following hints, so we can
provide you with the best support:
</para>
<sect2 id="contact-support"><title>Get Support</title>
<para>
- For casual users, our
+ For casual users, our
<ulink url="http://sourceforge.net/tracker/?group_id=11118&atid=211118">support forum at SourceForge</ulink>
is probably best suited:
<ulink url="http://sourceforge.net/tracker/?group_id=11118&atid=211118">http://sourceforge.net/tracker/?group_id=11118&atid=211118</ulink>
<listitem>
<para>
- Configuration issues, such as ads that slip through, or sites that
- don't function properly due to one <application>Privoxy</application>
+ Configuration issues, such as ads that slip through, or sites that
+ don't function properly due to one <application>Privoxy</application>
<quote>action</quote> or another being turned <quote>on</quote>.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- <quote>Bugs</quote> in the programming code that makes up
+ <quote>Bugs</quote> in the programming code that makes up
<application>Privoxy</application>, such as that might cause a crash.
</para>
- </listitem>
+ </listitem>
</itemizedlist>
<sect3 id="contact-ads"><title>Reporting Ads or Other Configuration Problems</title>
<para>
Please send feedback on ads that slipped through, innocent images that were
- blocked, sites that don't work properly, and other configuration related problem of
- <filename>default.action</filename> file, to
+ blocked, sites that don't work properly, and other configuration related problem of
+ <filename>default.action</filename> file, to
<ulink url="http://sourceforge.net/tracker/?group_id=11118&atid=460288">
http://sourceforge.net/tracker/?group_id=11118&atid=460288</ulink>,
the Actions File Tracker.
-</para>
+</para>
<para>
New, improved <filename>default.action</filename> files may occasionally be made
<sect3 id="contact-bugs"><title>Reporting Bugs</title>
<para>
- Please report all bugs through our bug tracker:
- <ulink url="http://sourceforge.net/tracker/?group_id=11118&atid=111118">http://sourceforge.net/tracker/?group_id=11118&atid=111118</ulink>.
+ Please report all bugs through our bug tracker:
+ <ulink url="http://sourceforge.net/tracker/?group_id=11118&atid=111118">http://sourceforge.net/tracker/?group_id=11118&atid=111118</ulink>.
</para>
<para>
Before doing so, please make sure that the bug has <emphasis>not already been submitted</emphasis>
and observe the additional hints at the top of the <ulink
url="http://sourceforge.net/tracker/?func=add&group_id=11118&atid=111118">submit
- form</ulink>. If already submitted, please feel free to add any info to the
+ form</ulink>. If already submitted, please feel free to add any info to the
original report that might help to solve the issue.
</para>
(if you got the source from CVS, please also provide the source code revisions
as shown in <ulink url="http://config.privoxy.org/show-version">http://config.privoxy.org/show-version</ulink>).
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
sending the output of <quote>uname -a</quote> should do,
in case of GNU/Linux, please also name the distribution.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- The name, platform, and version of the <application>browser</application>
+ The name, platform, and version of the <application>browser</application>
you were using (e.g. <application>Internet Explorer v5.5</application> for Mac).
</para>
</listitem>
<listitem>
<para>
The URL where the problem occurred, or some way for us to duplicate the
- problem (e.g. <literal>http://somesite.example.com/?somethingelse=123</literal>).
+ problem (e.g. <literal>http://somesite.example.com/?somethingelse=123</literal>).
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
by the <application>Privoxy</application> developers via SourceForge,
or if you got your copy somewhere else.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Whether you are using <application>Privoxy</application> in tandem with
+ Whether you are using <application>Privoxy</application> in tandem with
another proxy such as <application>Tor</application>. If so, please
temporary disable the other proxy to see if the symptoms change.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Whether you are using a personal firewall product. If so, does
+ Whether you are using a personal firewall product. If so, does
<application>Privoxy</application> work without it?
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
submit any logfiles you didn't read first. You can mask sensitive information
as long as it's clear that you removed something.
</para>
- </listitem>
+ </listitem>
</itemizedlist>
</para>
<para>
The <ulink url="http://www.privoxy.org/user-manual/appendix.html#ACTIONSANAT">appendix
- of the Privoxy User Manual</ulink> also has helpful information
- on understanding <literal>actions</literal>, and <literal>action</literal> debugging.
+ of the Privoxy User Manual</ulink> also has helpful information
+ on understanding <literal>actions</literal>, and <literal>action</literal> debugging.
</para>
</sect3>
</sect2>
File : $Source: /cvsroot/ijbswa/current/doc/source/copyright.sgml,v $
Purpose : Entity included in other project documents.
-
- $Id: copyright.sgml,v 2.12 2011/03/27 13:50:38 fabiankeil Exp $
+
+ $Id: copyright.sgml,v 2.13 2011/08/18 11:42:50 fabiankeil Exp $
Copyright (C) 2001-2011 Privoxy Developers http://www.privoxy.org/
See LICENSE.
This file used for inclusion with other documents only.
======================================================================
- If you make changes to this file, please verify the finished
+ If you make changes to this file, please verify the finished
docs all display as intended.
This file is included into:
faq
**************************************************************
- NOTE: the &my-copy entity must be defined in any file that will
- include this file. (This is a workaround for docbook2man not
+ NOTE: the &my-copy entity must be defined in any file that will
+ include this file. (This is a workaround for docbook2man not
handling the standard © entity in the man page processing.)
**************************************************************
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN"[
-<!entity % dummy "IGNORE">
+<!entity % dummy "IGNORE">
<!entity supported SYSTEM "supported.sgml">
<!entity newfeatures SYSTEM "newfeatures.sgml">
<!entity p-intro SYSTEM "privoxy.sgml">
Purpose : developer manual
This file belongs into
ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
-
- $Id: developer-manual.sgml,v 2.34 2010/11/06 12:55:48 fabiankeil Exp $
+
+ $Id: developer-manual.sgml,v 2.35 2011/08/17 10:40:07 fabiankeil Exp $
Copyright (C) 2001-2009 Privoxy Developers http://www.privoxy.org/
See LICENSE.
========================================================================
- NOTE: Please read developer-manual/documentation.html before touching
+ NOTE: Please read developer-manual/documentation.html before touching
anything in this, or other Privoxy documentation. You have been warned!
- Failure to abide by this rule will result in the revocation of your license
+ Failure to abide by this rule will result in the revocation of your license
to live a peaceful existence!
========================================================================
<subscript>
<!-- Completely the wrong markup, but very little is allowed -->
<!-- in this part of an article. FIXME -->
- <link linkend="copyright">Copyright</link> &my-copy; 2001-2009 by
+ <link linkend="copyright">Copyright</link> &my-copy; 2001-2009 by
<ulink url="http://www.privoxy.org/">Privoxy Developers</ulink>
</subscript>
</pubdate>
- <pubdate>$Id: developer-manual.sgml,v 2.34 2010/11/06 12:55:48 fabiankeil Exp $</pubdate>
+ <pubdate>$Id: developer-manual.sgml,v 2.35 2011/08/17 10:40:07 fabiankeil Exp $</pubdate>
<!--
-Note: this should generate a separate page, and a live link to it.
+Note: this should generate a separate page, and a live link to it.
But it doesn't for some mysterious reason. Please leave commented
-unless it can be fixed proper. For the time being, the copyright
+unless it can be fixed proper. For the time being, the copyright
statement will be in copyright.smgl.
Hal.
-<legalnotice id="legalnotice">
+<legalnotice id="legalnotice">
<para>
text goes here ........
</para>
the state at the release of version &p-version;.
You can find the latest version of the this manual at <ulink
url="http://www.privoxy.org/developer-manual/">http://www.privoxy.org/developer-manual/</ulink>.
- Please see <link linkend="contact">the Contact section</link>
+ Please see <link linkend="contact">the Contact section</link>
on how to contact the developers.
</para>
<!-- <para> -->
I don't like seeing blank space :) So added *something* here.
- -->
+ -->
<para>
<application>Privoxy</application>, as an heir to
- <application>Junkbuster</application>, is a Free Software project
+ <application>Junkbuster</application>, is a Free Software project
and the code is licensed under the GNU General Public License version 2.
As such, <application>Privoxy</application> development is potentially open
to anyone who has the time, knowledge, and desire to contribute
in any capacity. Our goals are simply to continue the mission,
to improve <application>Privoxy</application>, and
- to make it available to as wide an audience as possible.
+ to make it available to as wide an audience as possible.
</para>
<para>
One does not have to be a programmer to contribute. Packaging, testing,
<para>
The first step is to join the <ulink
url="mailto:ijbswa-developers@lists.sourceforge.net">developer's mailing list</ulink>.
- You can submit your ideas, or even better patches. Patches are best
- submitted to the Sourceforge tracker set up for this purpose, but
+ You can submit your ideas, or even better patches. Patches are best
+ submitted to the Sourceforge tracker set up for this purpose, but
can be sent to the list for review too.
</para>
<para>
- You will also need to have a cvs package installed, which will
+ You will also need to have a cvs package installed, which will
entail having ssh installed as well (which seems to be a requirement of
SourceForge), in order to access the cvs repository. Having the GNU build
tools is also going to be important (particularly, autoconf and gmake).
</para>
<para>
- For the time being (read, this section is under construction), you can
- also refer to the extensive comments in the source code. In fact,
+ For the time being (read, this section is under construction), you can
+ also refer to the extensive comments in the source code. In fact,
reading the code is recommended in any case.
</para>
</sect2>
<sect1 id="cvs"><title>The CVS Repository</title>
<para>
If you become part of the active development team, you will eventually
- need write access to our holy grail, the CVS repository. One of the
+ need write access to our holy grail, the CVS repository. One of the
team members will need to set this up for you. Please read
this chapter completely before accessing via CVS.
</para>
</para>
<para>
At one time there were two distinct branches: stable and unstable. The
- more drastic changes were to be in the unstable branch. These branches
- have now been merged to minimize time and effort of maintaining two
+ more drastic changes were to be in the unstable branch. These branches
+ have now been merged to minimize time and effort of maintaining two
branches.
</para>
- <!--
+ <!--
<para>
This will result in at least two active branches, which means there may
- be occasions that require the same (or similar) item to be
- checked into to two different places (assuming its a bugfix and needs
+ be occasions that require the same (or similar) item to be
+ checked into to two different places (assuming its a bugfix and needs
fixing in both the stable and unstable trees). This also means that in
- order to have access to both trees, both will have to be checked out
- separately. Use the <literal>cvs -r</literal> flag to check out a
+ order to have access to both trees, both will have to be checked out
+ separately. Use the <literal>cvs -r</literal> flag to check out a
branch, e.g: <literal>cvs co -r v_3_0_branch current</literal>.
</para>
- -->
+ -->
</sect2>
<sect2 id="cvscommit"><title>CVS Commit Guidelines</title>
main development trunk, and we ask anyone with CVS access to strictly
adhere to the following guidelines:
</para>
-
+
<para>
Basic Guidelines, for all branches:
</para>
<para>
<itemizedlist>
<listitem><para>
- Please don't commit even
+ Please don't commit even
a small change without testing it thoroughly first. When we're
- close to a public release, ask a fellow developer to review your
+ close to a public release, ask a fellow developer to review your
changes.
</para></listitem>
<listitem><para>
url="http://sourceforge.net/tracker/?atid=311118&group_id=11118&func=browse">patch
tracker</ulink> instead.
</para>
- </listitem>
+ </listitem>
</itemizedlist>
</para>
-
+
<!--
<para>
- Stable branches are handled with more care, especially after the
- initial *.*.0 release, and we are just in bugfix mode. In addition to
- the above, the below applies only to the stable branch (currently the
+ Stable branches are handled with more care, especially after the
+ initial *.*.0 release, and we are just in bugfix mode. In addition to
+ the above, the below applies only to the stable branch (currently the
<literal>v_3_0_branch</literal> branch):
</para>
-
+
<para>
<itemizedlist>
<listitem>
project, or have prior approval of the project leaders or consensus
of the devel list.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Where possible, bugfixes and changes should be tested in the main
- development trunk first. There may be occasions where this is not
+ Where possible, bugfixes and changes should be tested in the main
+ development trunk first. There may be occasions where this is not
feasible, though.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Alternately, proposed changes can be submitted as patches to the patch tracker on
+ Alternately, proposed changes can be submitted as patches to the patch tracker on
Sourceforge first: <ulink
url="http://sourceforge.net/tracker/?group_id=11118&atid=311118">http://sourceforge.net/tracker/?group_id=11118&atid=311118</ulink>.
- Then ask for peer review.
+ Then ask for peer review.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Do not even think about anything except bugfixes. No new features!
</para>
- </listitem>
-
+ </listitem>
+
</itemizedlist>
- </para>
+ </para>
-->
</sect2>
</sect1>
-
+
<!-- ~~~~~ New section ~~~~~ -->
<sect1 id="documentation"><title>Documentation Guidelines</title>
<para>
All formal documents are maintained in Docbook SGML and located in the
<computeroutput>doc/source/*</computeroutput> directory. You will need
- <ulink url="http://www.docbook.org">Docbook</ulink>, the Docbook
+ <ulink url="http://www.docbook.org">Docbook</ulink>, the Docbook
DTD's and the Docbook modular stylesheets (or comparable alternatives),
and either <application>jade</application> or
<application>openjade</application> (recommended) installed in order to
<citetitle>privoxy.1</citetitle> (man page), and
<citetitle>config</citetitle> files are also now maintained as Docbook
SGML. These files, when built, in the top-level source directory are
- generated files! Also, the <application>Privoxy</application> <filename>index.html</filename> (and a
- variation on this file, <filename>privoxy-index.html</filename>,
+ generated files! Also, the <application>Privoxy</application> <filename>index.html</filename> (and a
+ variation on this file, <filename>privoxy-index.html</filename>,
meant for inclusion with doc packages), are maintained as SGML as well.
<emphasis>DO NOT edit these directly</emphasis>. Edit the SGML source, or
contact someone involved in the documentation.
- </para>
+ </para>
<para>
<filename>config</filename> requires some special handling. The reason it
is maintained this way is so that the extensive comments in the file
- mirror those in <citetitle>user-manual</citetitle>. But the conversion
- process requires going from SGML to HTML to text to special formatting
+ mirror those in <citetitle>user-manual</citetitle>. But the conversion
+ process requires going from SGML to HTML to text to special formatting
required for the embedded comments. Some of this does not survive so
well. Especially some of the examples that are longer than 80 characters.
- The build process for this file outputs to <filename>config.new</filename>,
+ The build process for this file outputs to <filename>config.new</filename>,
which should be reviewed for errors and mis-formatting. Once satisfied
that it is correct, then it should be hand copied to
<filename>config</filename>.
<para>
Packagers are encouraged to include this documentation. For those without
the ability to build the docs locally, text versions of each are kept in
- CVS. HTML versions are also being kept in CVS under
- <filename>doc/webserver/*</filename>. And PDF version are kept in
+ CVS. HTML versions are also being kept in CVS under
+ <filename>doc/webserver/*</filename>. And PDF version are kept in
<filename>doc/pdf/*</filename>.
</para>
<para>
</para>
<para>
How do you update the webserver (i.e. the pages on privoxy.org)?
-
+
<orderedlist numeration="arabic">
<listitem><para>
First, build the docs by running <computeroutput>make
<para>
Finished docs should be occasionally submitted to CVS
- (<filename>doc/webserver/*/*.html</filename>) so that those without
+ (<filename>doc/webserver/*/*.html</filename>) 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 <emphasis>after</emphasis> the <literal>$VERSION</literal> and
<sect2 id="sgml">
<title>Quickstart to Docbook and SGML</title>
<para>
- If you are not familiar with SGML, it is a markup language similar to HTML.
- Actually, not a mark up language per se, but a language used to define
+ If you are not familiar with SGML, it is a markup language similar to HTML.
+ Actually, not a mark up language per se, but a language used to define
markup languages. In fact, HTML is an SGML application. Both will use
<quote>tags</quote> to format text and other content. SGML tags can be much
more varied, and flexible, but do much of the same kinds of things. The tags,
or <quote>elements</quote>, are definable in SGML. There is no set
<quote>standards</quote>. Since we are using
- <application>Docbook</application>, our tags are those that are defined by
+ <application>Docbook</application>, our tags are those that are defined by
<application>Docbook</application>. Much of how the finish document is
rendered is determined by the <quote>stylesheets</quote>.
The stylesheets determine how each tag gets translated to HTML, or other
<para>
Our documents use <quote>sections</quote> for the most part. Sections
- will be processed into HTML headers (e.g. <literal>h1</literal> for
+ will be processed into HTML headers (e.g. <literal>h1</literal> for
<literal>sect1</literal>). The <application>Docbook</application> stylesheets
- will use these to also generate the Table of Contents for each doc. Our
- TOC's are set to a depth of three. Meaning <literal>sect1</literal>,
- <literal>sect2</literal>, and <literal>sect3</literal> will have TOC
- entries, but <literal>sect4</literal> will not. Each section requires
- a <literal><title></literal> element, and at least one
- <literal><para></literal>. There is a limit of five section
- levels in Docbook, but generally three should be sufficient for our
+ will use these to also generate the Table of Contents for each doc. Our
+ TOC's are set to a depth of three. Meaning <literal>sect1</literal>,
+ <literal>sect2</literal>, and <literal>sect3</literal> will have TOC
+ entries, but <literal>sect4</literal> will not. Each section requires
+ a <literal><title></literal> element, and at least one
+ <literal><para></literal>. There is a limit of five section
+ levels in Docbook, but generally three should be sufficient for our
purposes.
</para>
<para>
- Some common elements that you likely will use:
+ Some common elements that you likely will use:
</para>
<para>
<simplelist>
<member>
- <emphasis><para></para></emphasis>, paragraph delimiter. Most
+ <emphasis><para></para></emphasis>, paragraph delimiter. Most
text needs to be within paragraph elements (there are some exceptions).
</member>
<member>
<emphasis><command></command></emphasis>, command examples.
</member>
<member>
- <emphasis><literallayout></literallayout></emphasis>, like
+ <emphasis><literallayout></literallayout></emphasis>, like
<literal><pre></literal>, more or less.
</member>
<member>
<emphasis><listitem></listitem></emphasis>, member of the above.
</member>
<member>
- <emphasis><screen></screen></emphasis>, screen output, implies
+ <emphasis><screen></screen></emphasis>, screen output, implies
<literal><literallayout></literal>.
</member>
<member>
- <emphasis><ulink url="example.com"></ulink></emphasis>, like
+ <emphasis><ulink url="example.com"></ulink></emphasis>, like
HTML <literal><a></literal> tag.
</member>
<member>
- <emphasis><quote></quote></emphasis>, for, doh, quoting text.
+ <emphasis><quote></quote></emphasis>, for, doh, quoting text.
</member>
</simplelist>
</para>
<sect2 id="docstyle">
<title><application>Privoxy</application> Documentation Style</title>
<para>
- It will be easier if everyone follows a similar writing style. This
- just makes it easier to read what someone else has written if it
+ It will be easier if everyone follows a similar writing style. This
+ just makes it easier to read what someone else has written if it
is all done in a similar fashion.
</para>
<para>
<para>
All tags should be lower case.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Tags delimiting a <emphasis>block</emphasis> of text (even small
Just to <emphasis>emphasize</emphasis>, some text goes here.
</literallayout>
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Tags should be nested and step indented for block text like: (except
- in-line tags)
+ in-line tags)
<literallayout>
<para>
<itemizedlist>
</literallayout>
This makes it easier to find the text amongst the tags ;-)
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Use white space to separate logical divisions within a document,
- like between sections. Running everything together consistently
+ 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.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Do not hesitate to make comments. Comments can either use the
- <comment> element, or the <!-- --> style comment
- familiar from HTML. (Note in Docbook v4.x <comment> is
+ Do not hesitate to make comments. Comments can either use the
+ <comment> element, or the <!-- --> style comment
+ familiar from HTML. (Note in Docbook v4.x <comment> is
replaced by <remark>.)
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- We have an international audience. Refrain from slang, or English
- idiosyncrasies (too many to list :). Humor also does not translate
+ We have an international audience. Refrain from slang, or English
+ idiosyncrasies (too many to list :). Humor also does not translate
well sometimes.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
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.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Our documents are available in differing formats. Right now, they
- are just plain text, HTML, and PDF, but others are always a
- future possibility. Be careful with URLs (<ulink>), and avoid
+ Our documents are available in differing formats. Right now, they
+ are just plain text, HTML, and PDF, but others are always a
+ future possibility. Be careful with URLs (<ulink>), and avoid
this mistake:
</para>
<para>
My favorite site is <ulink url="http://example.com">here</ulink>.
</para>
<para>
- This will render as <quote>My favorite site is here</quote>, which is
+ This will render as <quote>My favorite site is here</quote>, which is
not real helpful in a text doc. Better like this:
</para>
<para>
<literal>-H</literal> option. (<application>ispell</application> I think
too.)
</para>
- </listitem>
+ </listitem>
</itemizedlist>
- </para>
-
+ </para>
+
</sect2>
-
+
<!-- ~~~~~ New section ~~~~~ -->
<sect2><title>Privoxy Custom Entities</title>
<para>
- <application>Privoxy</application> documentation is using
- a number of customized <quote>entities</quote> to facilitate
- documentation maintenance.
+ <application>Privoxy</application> documentation is using
+ a number of customized <quote>entities</quote> to facilitate
+ documentation maintenance.
</para>
<para>
We are using a set of <quote>boilerplate</quote> files with generic text,
that is used by multiple docs. This way we can write something once, and use
it repeatedly without having to re-write the same content over and over again.
If editing such a file, keep in mind that it should be
- <emphasis>generic</emphasis>. That is the purpose; so it can be used in varying
+ <emphasis>generic</emphasis>. That is the purpose; so it can be used in varying
contexts without additional modifications.
</para>
<para>
- We are also using what <application>Docbook</application> calls
- <quote>internal entities</quote>. These are like variables in
+ We are also using what <application>Docbook</application> calls
+ <quote>internal entities</quote>. These are like variables in
programming. Well, sort of. For instance, we have the
- <literal>p-version</literal> entity that contains the current
- <application>Privoxy</application> version string. You are strongly
- encouraged to use these where possible. Some of these obviously
+ <literal>p-version</literal> entity that contains the current
+ <application>Privoxy</application> version string. You are strongly
+ 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.
</para>
</para>
<para>
In this example, the contents of the file,
- <filename>supported.sgml</filename> is available for inclusion anywhere
- in the doc. To make this happen, just reference the now defined
- entity: <literal>&supported;</literal> (starts with an ampersand
- and ends with a semi-colon), and the contents will be dumped into
+ <filename>supported.sgml</filename> is available for inclusion anywhere
+ in the doc. To make this happen, just reference the now defined
+ entity: <literal>&supported;</literal> (starts with an ampersand
+ and ends with a semi-colon), and the contents will be dumped into
the finished doc at that point.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Commonly used <quote>internal entities</quote>:
</para>
<simplelist>
<member>
- <emphasis>p-version</emphasis>: the <application>Privoxy</application>
+ <emphasis>p-version</emphasis>: the <application>Privoxy</application>
version string, e.g. <quote>&p-version;</quote>.
</member>
<member>
- <emphasis>p-status</emphasis>: the project status, either
+ <emphasis>p-status</emphasis>: the project status, either
<quote>alpha</quote>, <quote>beta</quote>, or <quote>stable</quote>.
</member>
<member>
- <emphasis>p-not-stable</emphasis>: use to conditionally include
+ <emphasis>p-not-stable</emphasis>: use to conditionally include
text in <quote>not stable</quote> releases (e.g. <quote>beta</quote>).
</member>
<member>
<emphasis>p-text</emphasis>: this doc is only generated as text.
</member>
</simplelist>
- </listitem>
+ </listitem>
</itemizedlist>
- </para>
+ </para>
<para>
- There are others in various places that are defined for a specific
+ There are others in various places that are defined for a specific
purpose. Read the source!
</para>
-
+
</sect2>
-
+
</sect1>
<!-- <listitem><para>be consistent with the redirect script (i.e. the <application>Privoxy</application> program -->
</sect2>
<sect2 id="s2"><title>Using Comments</title>
-
+
<sect3 id="s3"><title>Comment, Comment, Comment</title>
</programlisting>
</sect3>
-
+
<sect3 id="s4"><title>Use blocks for comments</title>
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.</para>
-
+
</sect3>
-
+
<sect3 id="s5"><title>Keep Comments on their own line</title>
} /* -END- do_something_very_important */
</programlisting>
</sect3>
-
+
<sect3 id="s6"><title>Comment each logical step</title>
comment. After all, these are usually major logic
containers.</para>
-
+
</sect3>
-
+
<sect3 id="s7"><title>Comment All Functions Thoroughly</title>
functions should contain the information presented in the
addendum section of this document.</para>
-
+
</sect3>
-
+
<sect3 id="s8"><title>Comment at the end of braces if the
content is more than one screen length</title>
} /* -END- if ( 1 == X ) */
</programlisting>
</sect3>
-
+
</sect2>
<sect2 id="s9"><title>Naming Conventions</title>
-
+
<sect3 id="s10"><title>Variable Names</title>
</programlisting>
</para>
-
- </sect3>
+
+ </sect3>
<sect3 id="s11"><title>Function Names</title>
</programlisting>
</para>
-
+
</sect3>
-
+
<sect3 id="s12"><title>Header file prototypes</title>
<para><emphasis>Instead of:</emphasis>
<programlisting>
-(.h) extern int load_aclfile( struct client_state * ); or
-(.h) extern int load_aclfile();
+(.h) extern int load_aclfile( struct client_state * ); or
+(.h) extern int load_aclfile();
(.c) int load_aclfile( struct client_state *csp )
</programlisting>
</para>
-
+
</sect3>
-
+
<sect3 id="s13"><title>Enumerations, and #defines</title>
#endif /* def FEATURE_FORCE */
</programlisting>
</sect3>
-
+
<sect3 id="s14"><title>Constants</title>
<para>
<programlisting>
-#define USE_IMG_LST 1 or
+#define USE_IMG_LST 1 or
#define _USE_IMAGE_LIST 1 or
-#define USE_IMAGE_LIST_ 1 or
+#define USE_IMAGE_LIST_ 1 or
#define use_image_list 1 or
#define UseImageList 1
</programlisting>
</para>
-
+
</sect3>
</sect2>
-
+
<sect2 id="s15"><title>Using Space</title>
-
+
<sect3 id="s16"><title>Put braces on a line by themselves.</title>
}
</programlisting>
</sect3>
-
+
<sect3 id="s17"><title>ALL control statements should have a
block</title>
"feature". The "explanation" and "exception" from the point
above also applies.</para>
-
+
</sect3>
-
+
<sect3 id="s18"><title>Do not belabor/blow-up boolean
expressions</title>
to the project has at least a "good" knowledge of C/C++. (Hope
I do not offend by that last comment ... 8-)</para>
-
+
</sect3>
-
+
<sect3 id="s19"><title>Use white space freely because it is
free</title>
first_value = old_value + ( ( some_value - another_value ) - whatever )
</programlisting>
</sect3>
-
+
<sect3 id="s20"><title>Don't use white space around structure
operators</title>
<para><emphasis>Instead of:</emphasis> a_struct -> a_member; a_struct . a_member;
function_name ();</para>
-
+
</sect3>
-
+
<sect3 id="s21"><title>Make the last brace of a function stand
out</title>
<para><emphasis>Status:</emphasis> developer-discretion on the number of blank
lines. Enforced is the end of function comments.</para>
-
+
</sect3>
-
+
<sect3 id="s22"><title>Use 3 character indentions</title>
</sect3>
</sect2>
-
+
<sect2 id="s23"><title>Initializing</title>
-
+
<sect3 id="s24"><title>Initialize all variables</title>
</sect3>
</sect2>
-
+
<sect2 id="s25"><title>Functions</title>
-
+
<sect3 id="s26"><title>Name functions that return a boolean as a
question.</title>
is_web_page_blank();
</programlisting>
</sect3>
-
+
<sect3 id="s27"><title>Always specify a return type for a
function.</title>
purpose, and create a void return type if the function does not
need to return anything.</para>
-
+
</sect3>
-
+
<sect3 id="s28"><title>Minimize function calls when iterating by
using variables</title>
*may* change or could *potentially* change, then you must code the
function call in the for/while loop.</para>
-
+
</sect3>
-
+
<sect3 id="s29"><title>Pass and Return by Const Reference</title>
<para>Both these pointers are *const*! If the c runtime library
maintainers do it, we should too.</para>
-
+
</sect3>
-
+
<sect3 id="s30"><title>Pass and Return by Value</title>
prototypes with "pass by value": int load_aclfile( struct
client_state *csp )</para>
-
+
</sect3>
-
+
<sect3 id="s31"><title>Names of include files</title>
<para>
<programlisting>
-/* This is not a local include, but requires a path element. */
+/* This is not a local include, but requires a path element. */
#include <sys/fileName.h>
</programlisting>
</para>
without a _very_ good reason. This duplicates the #include
"file.h" behavior.</para>
-
+
</sect3>
-
+
<sect3 id="s32"><title>Provide multiple inclusion
protection</title>
#endif /* ndef PROJECT_H_INCLUDED */
</programlisting>
</sect3>
-
+
<sect3 id="s33"><title>Use `extern "C"` when appropriate</title>
#endif /* def __cplusplus */
</programlisting>
</sect3>
-
+
<sect3 id="s34"><title>Where Possible, Use Forward Struct
Declaration Instead of Includes</title>
<para><emphasis>Status:</emphasis> Use with discretion.</para>
-
+
</sect3>
</sect2>
<sect2 id="s35"><title>General Coding Practices</title>
-
+
<sect3 id="s36"><title>Turn on warnings</title>
should turn on as many as possible. With GCC, the switch is
"-Wall". Try and fix as many warnings as possible.</para>
-
+
</sect3>
-
+
<sect3 id="s37"><title>Provide a default case for all switch
statements</title>
<para><emphasis>Status:</emphasis> Programmer discretion is advised.</para>
-
+
</sect3>
-
+
<sect3 id="s38"><title>Try to avoid falling through cases in a
switch statement.</title>
the fact of the fall through and reason why you felt it was
necessary.</para>
-
+
</sect3>
-
+
<sect3 id="s39"><title>Use 'long' or 'short' Instead of
'int'</title>
now). Should we add these to IJB now that we have a "configure"
script?</para>
-
+
</sect3>
-
+
<sect3 id="s40"><title>Don't mix size_t and other types</title>
variable of a different type (or even against a constant)
without casting one of the values.</para>
-
+
</sect3>
-
+
<sect3 id="s41"><title>Declare each variable and struct on its
own line.</title>
<para><emphasis>Status:</emphasis> developer-discretion.</para>
-
+
</sect3>
-
+
<sect3 id="s42"><title>Use malloc/zalloc sparingly</title>
list, then it should definitely be allocated via `malloc'.
</programlisting>
</sect3>
-
+
<sect3 id="s43"><title>The Programmer Who Uses 'malloc' is
Responsible for Ensuring 'free'</title>
standard is for allocating and freeing data structures (complex
or nested).</para>
-
+
</sect3>
-
+
<sect3 id="s44"><title>Add loaders to the `file_list' structure
and in order</title>
POPUPs can also be referred to as KILLPOPUPs, it is clear that
it should come first.</para>
-
+
</sect3>
-
+
<sect3 id="s45"><title>"Uncertain" new code and/or changes to
existing code, use FIXME or XXX</title>
include in the project (or conversely exclude from the
project).</para>
-
+
</sect3>
</sect2>
* The GNU General Public License should be included with
* this file. If not, you can view it at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * or write to the Free Software Foundation, Inc.,
+ * or write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ,
* USA
*
* The GNU General Public License should be included with
* this file. If not, you can view it at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * or write to the Free Software Foundation, Inc.,
+ * or write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ,
* USA
*
Please submit test reports only with the <ulink url="http://sourceforge.net/tracker/?func=add&group_id=11118&atid=395005">test form</ulink>
at sourceforge. Three simple steps:
<itemizedlist>
-
+
<listitem><para>Select category: the distribution you test on.</para></listitem>
<listitem><para>Select group: the version of <application>Privoxy</application> that we are about to release.</para></listitem>
<listitem><para>Fill the Summary and Detailed Description with something
Do not mail to the mailing list (we cannot keep track on issues there).
</para>
</sect2>
-
+
</sect1>
<!-- ~~~~~ New section ~~~~~ -->
<title>Version numbers</title>
<para>
- First you need to determine which version number the release will have.
+ First you need to determine which version number the release will have.
<application>Privoxy</application> version numbers consist of three numbers,
separated by dots, like in X.Y.Z (e.g. 3.0.0), where:
<itemizedlist>
<para>
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
+ user interface or configuration syntax. Majors 1 and 2 were
<application>Junkbuster</application>, and 3 will be the first stable
<application>Privoxy</application> release.
</para>
<listitem>
<para>
Z, the point or sub version, represents a release of the software within a branch.
- It is therefore incremented immediately before each code freeze.
+ 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 CVS in between.
It follows that Z is odd on CVS in development branches most of the time. There, it gets
Stable branches work a little differently, since there should be
little to no development happening in such branches. Remember,
only bugfixes, which presumably should have had some testing
- before being committed. Stable branches will then have their
- version reported as <literal>0.0.0</literal>, during that period
- between releases when changes are being added. This is to denote
- that this code is <emphasis>not for release</emphasis>. Then
- as the release nears, the version is bumped according: e.g.
+ before being committed. Stable branches will then have their
+ version reported as <literal>0.0.0</literal>, during that period
+ between releases when changes are being added. This is to denote
+ that this code is <emphasis>not for release</emphasis>. Then
+ as the release nears, the version is bumped according: e.g.
<literal>3.0.1 -> 0.0.0 -> 3.0.2</literal>.
</para>
</listitem>
<emphasis>before</emphasis> committing to a stable branch!
</para>
<para>
- Developers should remember too that if they commit a bugfix to the stable
- branch, this will more than likely require a separate submission to the
- main trunk, since these are separate development trees within CVS. If you
+ Developers should remember too that if they commit a bugfix to the stable
+ branch, this will more than likely require a separate submission to the
+ main trunk, since these are separate development trees within CVS. If you
are working on both, then this would require at least two separate check
outs (i.e main trunk, <emphasis>and</emphasis> the stable release branch,
which is <literal>v_3_0_branch</literal> at the moment).
</para>
</sect2>
-
+
<sect2 id="beforerelease">
<title>Before the Release: Freeze</title>
<para>
they have pending changes/fixes in their pipelines. Announce the
freeze so that nobody will interfere with last minute changes.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Increment the version number (point from odd to even in development
- branches!) in <filename>configure.in</filename>. (RPM spec files
+ branches!) in <filename>configure.in</filename>. (RPM spec files
will need to be incremented as well.)
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
If <filename>default.action</filename> 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:
</para>
- <para>
+ <para>
<programlisting>
{+add-header{X-Actions-File-Version: A.B} -filter -no-popups}
</programlisting>
</para>
- <para>
+ <para>
Then change the version info in doc/webserver/actions/index.php,
line: '$required_actions_file_version = "A.B";'
</para>
<listitem>
<para>
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
+ 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. <filename>config</filename>,
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 packagers. The
+ should all also be 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.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- The <citetitle>User Manual</citetitle> is also used for context
+ The <citetitle>User Manual</citetitle> 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
+ 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 <citetitle>User Manual</citetitle>
- link from the main page since we need to keep manuals for various
- versions available). The CGI pages will link to something like
+ link from the main page since we need to keep manuals for various
+ versions available). The CGI pages will link to something like
<literal>http://privoxy.org/$(VERSION)/user-manual/</literal>. 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.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
All developers should look at the <filename>ChangeLog</filename> and
make sure noteworthy changes are referenced.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<emphasis>Commit all files that were changed in the above steps!</emphasis>
<quote><command>cvs tag v_X_Y_Z</command></quote>.
Don't use vX_Y_Z, ver_X_Y_Z, v_X.Y.Z (won't work) etc.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
If the release was in a development branch, increase the point version
from even to odd (X.Y.(Z+1)) again in <filename>configure.in</filename> and
commit your change.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
On the webserver, copy the user manual to a new top-level directory
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 <filename>X.Y.(Z-1)</filename>
to <filename>X.Y.Z</filename> and <filename>X.Y.(Z+1)</filename> to
- <filename>.</filename> (i.e. dot).
+ <filename>.</filename> (i.e. dot).
</para>
- </listitem>
+ </listitem>
</itemizedlist>
- </para>
+ </para>
</sect2>
-
+
<sect2 id="therelease">
<title>Building and Releasing the Packages</title>
<para>
Now the individual packages can be built and released. Note that for
GPL reasons the first package to be released is always the source tarball.
</para>
-
+
<para>
For <emphasis>all</emphasis> types of packages, including the source tarball,
<emphasis>you must make sure that you build from clean sources by exporting
the right version from CVS into an empty directory</emphasis> (just press return when
asked for a password):
</para>
-
+
<para>
<programlisting>
mkdir dist # delete or choose different name if it already exists
cvs -z3 -d:pserver:anonymous@ijbswa.cvs.sourceforge.net:/cvsroot/ijbswa export -r v_X_Y_Z current
</programlisting>
</para>
-
+
<para>
<emphasis>Do NOT change</emphasis> a single bit, including, but not limited to
version information after export from CVS. This is to make sure that
all release packages, and with them, all future bug reports, are based
on exactly the same code.
</para>
-
+
<warning>
<para>
- Every significant release of Privoxy has included at least one
- package that either had incorrect versions of files, missing files,
- or incidental leftovers from a previous build process that gave
- unknown numbers of users headaches to try to figure out what was
+ Every significant release of Privoxy has included at least one
+ package that either had incorrect versions of files, missing files,
+ or incidental leftovers from a previous build process that gave
+ unknown numbers of users headaches to try to figure out what was
wrong. PLEASE, make sure you are using pristene sources, and are
following the prescribed process!
</para>
<para>
Please find additional instructions for the source tarball and the
- individual platform dependent binary packages below. And details
+ individual platform dependent binary packages below. And details
on the Sourceforge release process below that.
</para>
<sect3 id="pack-guidelines">
<title>Note on Privoxy Packaging</title>
<para>
- Please keep these general guidelines in mind when putting together
+ Please keep these general guidelines in mind when putting together
your package. These apply to <emphasis>all</emphasis> platforms!
</para>
<para>
<listitem>
<para>
<application>Privoxy</application> <emphasis>requires</emphasis>
- write access to: all <filename>*.action</filename> files, all
- logfiles, and the <filename>trust</filename> file. You will
+ write access to: all <filename>*.action</filename> files, all
+ logfiles, and the <filename>trust</filename> file. You will
need to determine the best way to do this for your platform.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Please include up to date documentation. At a bare minimum:
</para>
<para>
The documentation has been designed such that the manuals are linked
- to each other from parallel directories, and should be packaged
+ to each other from parallel directories, and should be packaged
that way. <filename>privoxy-index.html</filename> can also be
included and can serve as a focal point for docs and other links of
interest (and possibly renamed to <filename>index.html</filename>).
- This should be one level up from the manuals. There is a link also
+ This should be one level up from the manuals. There is a link also
on this page to an HTMLized version of the man page. To avoid 404 for
this, it is in CVS as
<filename>doc/webserver/man-page/privoxy-man-page.html</filename>,
with <filename>privoxy-index.html</filename>, (i.e. one level up from
the manual directories).
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<filename>user.action</filename> and <filename>user.filter</filename>
are designed for local preferences. Make sure these do not get overwritten!
- <filename>config</filename> should not be overwritten either. This
+ <filename>config</filename> should not be overwritten either. This
has especially important configuration data in it.
<filename>trust</filename> should be left in tact as well.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Other configuration files (<filename>default.action</filename> and
likely to change between releases and contain important new features
and bug fixes.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Please check platform specific notes in this doc, if you haven't
- done <quote>Privoxy</quote> 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
+ Please check platform specific notes in this doc, if you haven't
+ done <quote>Privoxy</quote> 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).
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Packagers should do a <quote>clean</quote> 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
+ Packagers should do a <quote>clean</quote> 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.
</para>
- </listitem>
+ </listitem>
</itemizedlist>
- </para>
-
+ </para>
+
</sect3>
<sect3 id="newrelease-tarball"><title>Source Tarball</title>
<para>
First, <emphasis>make sure that you have freshly exported the right
version into an empty directory</emphasis>. (See "Building and releasing
- packages" above).
+ packages" above).
</para>
<para>
As the only exception to not changing anything after export from CVS,
<para>
Change directory to the <filename>os2setup</filename> directory.
Edit the os2build.cmd file to set the final executable filename.
- For example,
+ For example,
</para>
<para>
<programlisting>
</programlisting>
</para>
<para>
- Then, run:
+ Then, run:
</para>
<para>
<programlisting>
</programlisting>
</para>
<para>
- You can then upload <filename>privoxyosx_setup_x.y.z.zip</filename> anonymously to
+ You can then upload <filename>privoxyosx_setup_x.y.z.zip</filename> anonymously to
<filename>uploads.sourceforge.net/incoming</filename>,
create a release for it, and you're done. Use the release notes
and Change Log from the source tarball package.
<sect2 id="releasing">
<title>Uploading and Releasing Your Package</title>
<para>
- After the package is ready, it is time to upload it
+ 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:
</para>
<para>
Upload to: <ulink url="ftp://upload.sourceforge.net/incoming">ftp://upload.sourceforge.net/incoming</ulink>
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
user: <literal>anonymous</literal>
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
password: <literal>ijbswa-developers@lists.sourceforge.net</literal>
</para>
- </listitem>
+ </listitem>
</itemizedlist>
- </para>
+ </para>
<para>
Or use the <command>make</command> targets as described above.
</para>
<para>
Once this done go to <ulink
url="https://sourceforge.net/project/admin/editpackages.php?group_id=11118"
- >https://sourceforge.net/project/admin/editpackages.php?group_id=11118</ulink>,
- making sure you are logged in. Find your target platform in the
- second column, and click <literal>Add Release</literal>. You will
- then need to create a new release for your package, using the format
+ >https://sourceforge.net/project/admin/editpackages.php?group_id=11118</ulink>,
+ making sure you are logged in. Find your target platform in the
+ second column, and click <literal>Add Release</literal>. You will
+ then need to create a new release for your package, using the format
of <literal>$VERSION ($CODE_STATUS)</literal>, e.g. <emphasis>&p-version;
(beta)</emphasis>.
</para>
<para>
Now just follow the prompts. Be sure to add any appropriate Release
- notes. You should see your freshly uploaded packages in
- <quote>Step 2. Add Files To This Release</quote>. Check the
- appropriate box(es). Remember at each step to hit the
- <quote>Refresh/Submit</quote> buttons! You should now see your
- file(s) listed in Step 3. Fill out the forms with the appropriate
+ notes. You should see your freshly uploaded packages in
+ <quote>Step 2. Add Files To This Release</quote>. Check the
+ appropriate box(es). Remember at each step to hit the
+ <quote>Refresh/Submit</quote> 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 <quote>Update</quote>
- for each file. If anyone is monitoring your platform, check the
- <quote>email</quote> box at the very bottom to notify them of
+ for each file. If anyone is monitoring your platform, check the
+ <quote>email</quote> box at the very bottom to notify them of
the new package. This should do it!
</para>
<para>
- If you have made errors, or need to make changes, you can go through
- essentially the same steps, but select <literal>Edit Release</literal>,
+ If you have made errors, or need to make changes, you can go through
+ essentially the same steps, but select <literal>Edit Release</literal>,
instead of <literal>Add Release</literal>.
</para>
</sect2>
include the
<ulink url="http://sourceforge.net/project/showfiles.php?group_id=11118">download
location</ulink>, the release notes and the Changelog. Also, post an
- updated News item on the project page Sourceforge, and update the Home
+ updated News item on the project page Sourceforge, and update the Home
page and docs linked from the Home page (see below). Other news sites
and release oriented sites, such as Freshmeat, should also be notified.
</para>
</sect2>
</sect1>
-
+
<!-- ~~~~~ New section ~~~~~ -->
<sect1 id="webserver-update"><title>Update the Webserver</title>
<para>
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
+ inconsistent contents or permission problems will occur (as it has many
times in the past!):
</para>
<para>
<para>
That will generate <filename>doc/webserver/user-manual</filename>,
<filename>doc/webserver/developer-manual</filename>,
- <filename>doc/webserver/faq</filename>,
+ <filename>doc/webserver/faq</filename>,
<filename>doc/pdf/*.pdf</filename> and
<filename>doc/webserver/index.html</filename> automatically.
</para>
create new directories under <filename>doc/webserver</filename>).
</para>
<para>
- Next, commit any changes from the above steps to CVS. All set?
+ Next, commit any changes from the above steps to CVS. All set?
If these are docs in the stable branch, then do:
</para>
<para>
&contacting;
<!-- end contacting -->
</sect1>
-
+
<!-- ~~~~~~~~ New section Header ~~~~~~~~~ -->
<sect1 id="copyright"><title>Privoxy Copyright, License and History</title>
</sect2>
</sect1>
-
+
<!-- ~~~~~ New section ~~~~~ -->
<sect1 id="seealso"><title>See also</title>
<!-- Include seealso.sgml -->
<!--
- This program is free software; you can redistribute it
+ 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
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
$Log: developer-manual.sgml,v $
+ Revision 2.35 2011/08/17 10:40:07 fabiankeil
+ Update the entities.
+
+ This commit is chronological out of order.
+
Revision 2.34 2010/11/06 12:55:48 fabiankeil
Set p-version to 3.0.17
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN"[
-<!entity % dummy "IGNORE">
+<!entity % dummy "IGNORE">
<!entity supported SYSTEM "supported.sgml">
<!entity newfeatures SYSTEM "newfeatures.sgml">
<!entity p-intro SYSTEM "privoxy.sgml">
Purpose : FAQ
This file belongs into
ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
-
- $Id: faq.sgml,v 2.79 2011/08/17 10:40:07 fabiankeil Exp $
+
+ $Id: faq.sgml,v 2.80 2011/08/18 11:42:50 fabiankeil Exp $
Copyright (C) 2001-2009 Privoxy Developers http://www.privoxy.org/
See LICENSE.
<Qandaset defaultlabel='qanda'>
<QandAEntry>
<question>
- <para>
+ <para>
How are you?
</para>
</question>
<answer>
- <para>
+ <para>
Fine.
</para>
</answer>
</QandASet>
========================================================================
- NOTE: Please read developer-manual/documentation.html before touching
+ NOTE: Please read developer-manual/documentation.html before touching
this file!
- Please we keep the info in this file as version independent as possible
- so we only have to maintain one FAQ. Where significant changes are
- made to Privoxy configuration, please note the change in such a way that
+ Please we keep the info in this file as version independent as possible
+ so we only have to maintain one FAQ. Where significant changes are
+ made to Privoxy configuration, please note the change in such a way that
it makes sense to both users of older and newer versions.
========================================================================
</subscript>
</pubdate>
-<pubdate>$Id: faq.sgml,v 2.79 2011/08/17 10:40:07 fabiankeil Exp $</pubdate>
+<pubdate>$Id: faq.sgml,v 2.80 2011/08/18 11:42:50 fabiankeil Exp $</pubdate>
<!--
-Note: this should generate a separate page, and a live link to it.
+Note: this should generate a separate page, and a live link to it.
But it doesn't for some mysterious reason. Please leave commented
-unless it can be fixed proper. For the time being, the copyright
+unless it can be fixed proper. For the time being, the copyright
statement will be in copyright.smgl.
Hal.
-<legalnotice id="legalnotice">
+<legalnotice id="legalnotice">
<para>
text goes here ........
</para>
<para>
This FAQ gives quick answers to frequently asked questions about
<ulink url="http://www.privoxy.org/">Privoxy</ulink>.
- It is not a substitute for the
+ It is not a substitute for the
<ulink url="../user-manual/index.html"><citetitle>Privoxy User Manual</citetitle></ulink>.
-<!--
+<!--
This works, at least in some situtations:
Test: <ulink url="privoxy-user-manual.pdf"><citetitle>User Manual</citetitle></ulink>.
--->
+-->
</para>
<!-- Include privoxy.sgml boilerplate: -->
You can find the latest version of the document at <ulink
url="http://www.privoxy.org/faq/">http://www.privoxy.org/faq/</ulink>.
Please see the <link linkend="contact">Contact section</link> if you want to
- contact the developers.
+ contact the developers.
</para>
<!-- <para> -->
<sect1 id="general"><title>General Information</title>
<sect2 renderas="sect3" id="who-uses"><title>Who should give &my-app; a try?</title>
<para>
- Anyone who is interested in security, privacy, or in
+ Anyone who is interested in security, privacy, or in
finer-grained control over their web and Internet experience.
</para>
</sect2>
<sect2 renderas="sect3" id="bestchoice"><title>Is Privoxy the best choice for
me?</title>
<para>
- &my-app; is certainly a good choice, especially for those who want more
+ &my-app; is certainly a good choice, especially for those who want more
control and security. Those with the willingness to read the documentation
and the ability to fine-tune their installation will benefit the most.
</para>
completely personalize your installation. Being familiar with, or at least
having an interest in learning about <ulink
url="http://en.wikipedia.org/wiki/Http">HTTP</ulink> and other networking
- protocols, <ulink url="http://en.wikipedia.org/wiki/Html">HTML</ulink>, and
+ protocols, <ulink url="http://en.wikipedia.org/wiki/Html">HTML</ulink>, and
<ulink url="http://en.wikipedia.org/wiki/Regular_expressions"><quote>Regular
Expressions</quote></ulink>
- will be a big plus and will help you get the most out of &my-app;.
- A new installation just includes a very basic configuration. The user
- should take this as a starting point only, and enhance it as he or she
- sees fit. In fact, the user is encouraged, and expected to, fine-tune the
+ will be a big plus and will help you get the most out of &my-app;.
+ A new installation just includes a very basic configuration. The user
+ should take this as a starting point only, and enhance it as he or she
+ sees fit. In fact, the user is encouraged, and expected to, fine-tune the
configuration.
</para>
<para>
- Much of <application>Privoxy's</application> configuration can be done
+ Much of <application>Privoxy's</application> configuration can be done
with a <ulink url="http://en.wikipedia.org/wiki/Web_browser">Web browser</ulink>.
- But there are areas where configuration is done using a
+ But there are areas where configuration is done using a
<ulink url="http://en.wikipedia.org/wiki/Text_editors">text editor</ulink>
to edit configuration files. Also note that the web-based action editor
doesn't use authentication and should only be enabled in environments
<sect2 renderas="sect3" id="otherstuff">
<title>Does Privoxy do anything more than ad blocking?</title>
- <para>
- Yes, ad blocking is but one possible use. There are many, many ways &my-app;
- can be used to sanitize and customize web browsing.
+ <para>
+ Yes, ad blocking is but one possible use. There are many, many ways &my-app;
+ can be used to sanitize and customize web browsing.
</para>
</sect2>
-<sect2 renderas="sect3" id="newjb"><title>What is this new version of
+<sect2 renderas="sect3" id="newjb"><title>What is this new version of
<quote><citetitle>Junkbuster</citetitle></quote>?</title>
<!-- Include history.sgml -->
led to confusion.
</para>
<para>
- There are also potential legal complications from our use of the
- <application>Junkbuster</application> name, which is a registered trademark of
+ There are also potential legal complications from our use of the
+ <application>Junkbuster</application> name, which is a registered trademark of
<ulink url="http://junkbusters.com/">Junkbusters Corporation</ulink>.
- There are, however, no objections from Junkbusters Corporation to the
+ There are, however, no objections from Junkbusters Corporation to the
<application>Privoxy</application> project itself, and they, in fact, still
share our ideals and goals.
</para>
<para>
- The developers also believed that there are so many improvements over the original
- code, that it was time to make a clean break from the past and make
+ The developers also believed that there are so many improvements over the original
+ code, that it was time to make a clean break from the past and make
a name in their own right.
</para>
<para>
- <application>Privoxy</application> is the
+ <application>Privoxy</application> is the
<quote><emphasis>Privacy Enhancing Proxy</emphasis></quote>. Also, its content
modification and junk suppression gives <emphasis>you</emphasis>, the user, more
control, more freedom, and allows you to browse your personal and
</sect2>
<sect2 renderas="sect3" id="differs"><title>How does Privoxy differ
-from the old Junkbuster?</title>
+from the old Junkbuster?</title>
<para>
<application>Privoxy</application> picks up where
<application>Junkbuster</application> left off.
<application>Privoxy</application>'s new features include:
</para>
-<!-- Include newfeatures.sgml: -->
+<!-- Include newfeatures.sgml: -->
&newfeatures;
<!-- end include -->
and the host (blocking the big banner hosting services like doublecklick.net
already helps a lot). <application>Privoxy</application> takes advantage of this
fact by using <ulink url="../user-manual/actions-file.html#AF-PATTERNS">URL
- patterns</ulink> to sort out and block the requests for things that sound
+ patterns</ulink> to sort out and block the requests for things that sound
like they would be ads or banners.
</para>
<para>
</sect2>
<sect2 renderas="sect3">
-<title id="mistakes">Can Privoxy make mistakes?
+<title id="mistakes">Can Privoxy make mistakes?
This does not sound very scientific.</title>
<para>
Actually, it's a black art ;-) And yes, it is always possible to have a broad
The default installation should give you a good starting
point, and block <emphasis>most</emphasis> ads and unwanted content,
but many of the more advanced features are off by default, and require
- you to activate them.
+ you to activate them.
</para>
<para>
You do have to set up your browser to use
<application>Privoxy</application> (see the <link
- linkend="firststep">Installation section below</link>).
+ linkend="firststep">Installation section below</link>).
</para>
<para>
And you will certainly run into situations where there are false positives,
<sect2 renderas="sect3" id="lan">
<title>Can Privoxy run as a server on a network?</title>
- <para>
+ <para>
Yes, &my-app; runs as a server already, and can easily be configured to
<quote>serve</quote> more than one client. See <link linkend="lanconfig">
How can I set up Privoxy to act as a proxy for my LAN</link> below.
your browser just can't.
</para>
<para>
- In addition, a proxy is good choice if you use multiple browsers, or
- have a LAN with multiple computers since &my-app; can run as a server
+ In addition, a proxy is good choice if you use multiple browsers, or
+ have a LAN with multiple computers since &my-app; can run as a server
application. This way all the configuration is in one place, and you don't
have to maintain a similar configuration for possibly many browsers or
users.
The most important reason is because you have access to
<emphasis>everything</emphasis>, and you can control everything. You can
check every line of every configuration file yourself. You can check every
- last bit of source code should you desire. And even if you can't read code,
- there should be some comfort in knowing that <!-- thousands of -->other people can,
+ last bit of source code should you desire. And even if you can't read code,
+ there should be some comfort in knowing that <!-- thousands of -->other people can,
and do read it. You can build the software from scratch, if you want,
so that you know the executable is clean, and that it is
<emphasis>yours</emphasis>. In fact, we encourage this level of scrutiny. It
</para>
</sect2>
-<sect2 renderas="sect3" id="license"><title>Is there is a license or fee? What about a
+<sect2 renderas="sect3" id="license"><title>Is there is a license or fee? What about a
warranty? Registration?</title>
<para>
<application>Privoxy</application> is free software and licensed under the <ulink
url="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License (GPL) version 2</ulink>.
It is free to use, copy, modify or distribute as you wish under the terms of this
license. Please see the <link linkend="copyright">Copyright</link> section for more
- information on the license and copyright. Or the <filename>LICENSE</filename> file
+ information on the license and copyright. Or the <filename>LICENSE</filename> file
that should be included.
</para>
<para>
<sect2 renderas="sect3" id="whichbrowsers">
<title>Which browsers are supported by Privoxy?</title>
<para>
- Any browser that can be configured to use a proxy, which
+ Any browser that can be configured to use a proxy, which
should be virtually all browsers, including
<application>Firefox</application>, <application>Internet
- Explorer</application>, <application>Opera</application>, and
+ Explorer</application>, <application>Opera</application>, and
<application>Safari</application> among others.
Direct browser support is not an absolute requirement since
<application>Privoxy</application> runs as a separate application and talks
dealing with some of the common abuses of HTML in email. See <link
linkend="outlook">How can I configure <application>Privoxy</application>
with <application>Outlook</application>?</link> below for more on
- this.
+ this.
</para>
<para>
Be aware that HTML email presents a number of unique security and privacy
</sect2>
<!-- Nobody is going to still be doing this!
-<sect2 renderas="sect3" id="newinstall"><title>Can I install
+<sect2 renderas="sect3" id="newinstall"><title>Can I install
Privoxy over Junkbuster?</title>
<para>
We recommend you un-install <application>Junkbuster</application>
- first to minimize conflicts and confusion. You may want to
+ first to minimize conflicts and confusion. You may want to
save your old configuration files for future reference. The configuration
files and syntax have substantially changed, so you will need to manually
port your old patterns. See the <ulink url="../user-manual/upgradersnote.html">note
-->
<sect2 renderas="sect3" id="firststep">
-<title>I just installed Privoxy. Is there anything
+<title>I just installed Privoxy. Is there anything
special I have to do now?</title>
<para>
- All browsers should be told to use <application>Privoxy</application>
- as a proxy by specifying the correct proxy address and port number
+ All browsers should be told to use <application>Privoxy</application>
+ as a proxy by specifying the correct proxy address and port number
in the appropriate configuration area for the browser. It's possible
to combine &my-app; with a packet filter to intercept HTTP requests
even if the client isn't explicitly configured to use &my-app;,
- but where possible, configuring the client is recommended. See
+ but where possible, configuring the client is recommended. See
<ulink url="../user-manual/startup.html">the User Manual for more
details</ulink>. You should also flush your browser's memory and disk
- cache to get rid of any cached junk items, and remove any stored
+ cache to get rid of any cached junk items, and remove any stored
<ulink url="http://en.wikipedia.org/wiki/Browser_cookie">cookies</ulink>.
</para>
<para>
If you set up the <application>Privoxy</application> to run on
the computer you browse from (rather than your ISP's server or some
- networked computer on a LAN), the proxy will be on <literal>127.0.0.1</literal>
+ networked computer on a LAN), the proxy will be on <literal>127.0.0.1</literal>
(sometimes referred to as <quote>localhost</quote>,
which is the special name used by every computer on the Internet to refer
to itself) and the port will be 8118 (unless you used the <ulink
When configuring your browser's proxy settings you typically enter
the word <quote>localhost</quote> or the IP address <quote>127.0.0.1</quote>
in the boxes next to <quote>HTTP</quote> and <quote>Secure</quote> (HTTPS) and
- then the number <quote>8118</quote> for <quote>port</quote>.
+ then the number <quote>8118</quote> for <quote>port</quote>.
This tells your browser to send all web requests to <application>Privoxy</application>
instead of directly to the Internet.
</para>
<para>
- <application>Privoxy</application> 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 <application>Privoxy</application>
+ <application>Privoxy</application> 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 <application>Privoxy</application>
is running, or the equivalent hostname, e.g. <literal>192.168.1.1</literal>.
Port assignment would be same as above. Note that
<application>Privoxy</application> doesn't listen on any LAN interfaces by
All the ads are there. What's wrong?</title>
<para>
- Did you configure your browser to use <application>Privoxy</application>
+ Did you configure your browser to use <application>Privoxy</application>
as a proxy? It does not sound like it. See above. You might also try flushing
- the browser's caches to force a full re-reading of pages. You can verify
- that <application>Privoxy</application> is running, and your browser
- is correctly configured by entering the special URL:
- <ulink url="http://p.p/">http://p.p/</ulink>.
+ the browser's caches to force a full re-reading of pages. You can verify
+ that <application>Privoxy</application> is running, and your browser
+ is correctly configured by entering the special URL:
+ <ulink url="http://p.p/">http://p.p/</ulink>.
<!-- Use http://p.p/ instead of http://config.privoxy.org/ here because
of potential redirect caching problem (see next Q). -->
This should take you to a page titled <quote>This is Privoxy..</quote> with
access to <application>Privoxy's</application> internal configuration.
- If you see this, then you are good to go. If you receive a page saying
+ If you see this, then you are good to go. If you receive a page saying
<quote>Privoxy is not running</quote>, then the browser is not set up to use
your <application>Privoxy</application> installation.
If you receive anything else (probably nothing at all), it could either
<para>
The procedure for clearing the cache varies from browser to browser. For
- example, <application>Mozilla/Netscape</application> users would click
+ example, <application>Mozilla/Netscape</application> users would click
<guibutton>Edit</guibutton> --> <guibutton>Preferences</guibutton> -->
<guibutton>Advanced</guibutton> --> <guibutton>Cache</guibutton> and
then click both <quote><guibutton>Clear Memory Cache</guibutton></quote>
<para>
&my-app; utilizes the concept of <quote>
- <ulink url="../user-manual/actions-file.html#ACTIONS">actions</ulink></quote>
+ <ulink url="../user-manual/actions-file.html#ACTIONS">actions</ulink></quote>
that are used to manipulate and control web page data.
<ulink url="../user-manual/actions-file.html">Actions files</ulink>
are where these <ulink url="../user-manual/actions-file.html#ACTIONS">actions</ulink>
There is a wide array of actions available that give the user a high degree
of control and flexibility on how to process each and every web page.
</para>
-
+
<para>
Actions can be defined on a <ulink
url="../user-manual/actions-file.html#AF-PATTERNS">URL pattern</ulink> basis, i.e.
</sect2>
<sect2 renderas="sect3" id="actionss">
-<title>The <quote>actions</quote> concept confuses me. Please list
+<title>The <quote>actions</quote> concept confuses me. Please list
some of these <quote>actions</quote>.</title>
<para>
For a comprehensive discussion of the actions concept, please refer
<sect2 renderas="sect3">
<title id="actconfig">How are actions files configured? What is the easiest
-way to do this?</title>
+way to do this?</title>
<para>
Actions files are just text files in a special syntax and can be edited
at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
(Shortcut: <ulink url="http://p.p/">http://p.p/</ulink>) and then select
<quote><ulink url="http://config.privoxy.org/show-status">View &
- change the current configuration</ulink></quote> from the menu. Note
- that this feature must be explicitly enabled in the main config file
+ change the current configuration</ulink></quote> from the menu. Note
+ that this feature must be explicitly enabled in the main config file
(see <ulink
url="../user-manual/config.html#ENABLE-EDIT-ACTIONS">enable-edit-actions</ulink>).
</para>
<sect2 renderas="sect3" id="getupdates"><title>Where can I get updated Actions Files?</title>
<para>
- Based on your feedback and the continuing development, updates of
+ Based on your feedback and the continuing development, updates of
<filename>default.action</filename> will be
made available from time to time on the <ulink
url="http://sourceforge.net/project/showfiles.php?group_id=11118">files section</ulink> of
<sect2 renderas="sect3" id="difficult">
<title>Why is the configuration so complicated?</title>
<para>
- <quote>Complicated</quote> is in the eye of the beholder. Those that are
+ <quote>Complicated</quote> is in the eye of the beholder. Those that are
familiar with some of the underlying concepts, such as regular expression
syntax, take to it like a fish takes to water. Also, software that tries
hard to be <quote>user friendly</quote>, often lacks sophistication and
flexibility. There is always that trade-off there between power vs.
easy-of-use. Furthermore, anyone is welcome to contribute ideas and
- implementations to enhance &my-app;.
+ implementations to enhance &my-app;.
</para>
</sect2>
<sect2 renderas="sect3" id="yahoo"><title>How can I make my Yahoo/Hotmail/Gmail account work?</title>
<para>
The default configuration shouldn't impact the usability of any of these services.
- It may, however, make all <ulink
- url="http://en.wikipedia.org/wiki/Browser_cookie">cookies</ulink>
+ It may, however, make all <ulink
+ url="http://en.wikipedia.org/wiki/Browser_cookie">cookies</ulink>
temporary, so that your browser will forget your
login credentials in between browser sessions. If you would like not to have to log
in manually each time you access those websites, simply turn off all cookie handling
.login.yahoo.com</screen>
</para>
<para>
- These kinds of sites are often quite complex and heavy with
- <ulink url="http://en.wikipedia.org/wiki/Javascript">Javascript</ulink> and
- thus <quote>fragile</quote>. So if <emphasis>still</emphasis> a problem,
+ These kinds of sites are often quite complex and heavy with
+ <ulink url="http://en.wikipedia.org/wiki/Javascript">Javascript</ulink> and
+ thus <quote>fragile</quote>. So if <emphasis>still</emphasis> a problem,
we have an <ulink
url="../user-manual/actions-file.html#ALIASES">alias</ulink> just for such
sticky situations:
</para>
<para>
Make sure the domain, host and path are appropriate as well. Your browser can
- tell you where you are specifically and you should use that information for
- your configuration settings. Note that above it is not referenced as
+ tell you where you are specifically and you should use that information for
+ your configuration settings. Note that above it is not referenced as
<literal>gmail.com</literal>, which is a valid domain name.
</para>
<quote>profiles</quote> in the web based actions file editor at <ulink
url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>.
See the <ulink url="../user-manual/actions-file.html"><citetitle>User
- Manual</citetitle></ulink> for a list of actions, and how the default
+ Manual</citetitle></ulink> for a list of actions, and how the default
profiles are set.
</para>
Where the defaults are likely to break some sites, exceptions for
known popular <quote>problem</quote> sites are included, but in
general, the more aggressive your default settings are, the more exceptions
- you will have to make later. New users are best to start off in
- <quote>Cautious</quote> setting. This is safest and will have the fewest
+ you will have to make later. New users are best to start off in
+ <quote>Cautious</quote> setting. This is safest and will have the fewest
problems. See the <ulink
url="../user-manual/index.html"><citetitle>User Manual</citetitle></ulink>
for a more detailed discussion.
</para>
<para>
- It should be noted that the <quote>Advanced</quote> profile (formerly known
+ It should be noted that the <quote>Advanced</quote> profile (formerly known
as the <quote>Adventuresome</quote> profile) is more
- aggressive, and will make use of some of
+ aggressive, and will make use of some of
<application>Privoxy's</application> advanced features. Use at your own risk!
</para>
</sect2>
-<sect2 renderas="sect3" id="browseconfig"> <title>Why can I change the configuration
+<sect2 renderas="sect3" id="browseconfig"> <title>Why can I change the configuration
with a browser? Does that not raise security issues?</title>
<para>
It may seem strange that regular users can edit the config files with their
</para>
<para>
- If you are familiar with regular expressions, and HTML, you can look at
+ If you are familiar with regular expressions, and HTML, you can look at
the provided <filename>default.filter</filename> with a text editor and define
your own filters. This is potentially a very powerful feature, but
- requires some expertise in both regular expressions and HTML/HTTP.
- <![%p-newstuff;[ You should
- place any modifications to the default filters, or any new ones you create
- in a separate file, such as <filename>user.filter</filename>, so they won't
- be overwritten during upgrades.
- The ability to define multiple filter files
+ requires some expertise in both regular expressions and HTML/HTTP.
+ <![%p-newstuff;[ You should
+ place any modifications to the default filters, or any new ones you create
+ in a separate file, such as <filename>user.filter</filename>, so they won't
+ be overwritten during upgrades.
+ The ability to define multiple filter files
in <filename>config</filename> is a new feature as of v. 3.0.5.]]>
</para>
<para>
- 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
+ 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
<filename>default.filter</filename> file with the <ulink
url="http://config.privoxy.org/show-status">web-based actions file editor</ulink>.
Note that the custom actions editor must be explicitly enabled in
</sect2>
<sect2 renderas="sect3" id="lanconfig">
-<title>How can I set up Privoxy to act as a proxy for my
+<title>How can I set up Privoxy to act as a proxy for my
LAN?</title>
<para>
- By default, <application>Privoxy</application> only responds to requests
+ By default, <application>Privoxy</application> only responds to requests
from <literal>127.0.0.1</literal> (localhost). To have it act as a server for
a network, this needs to be changed in the <ulink
url="../user-manual/config.html">main configuration file</ulink>. Look for
</para>
<para>
- Save the file, and restart <application>Privoxy</application>. Configure
+ Save the file, and restart <application>Privoxy</application>. Configure
all browsers on the network then to use this address and port number.
</para>
<para>
- Alternately, you can have <application>Privoxy</application> listen on
+ Alternately, you can have <application>Privoxy</application> listen on
all available interfaces:
</para>
</para>
<para>
- And then use <application>Privoxy's</application>
+ And then use <application>Privoxy's</application>
<ulink
- url="../user-manual/config.html#PERMIT-ACCESS">permit-access</ulink>
- feature to limit connections. A firewall in this situation is recommended
+ url="../user-manual/config.html#PERMIT-ACCESS">permit-access</ulink>
+ feature to limit connections. A firewall in this situation is recommended
as well.
</para>
<para>
If you want to see nothing, then change the <ulink
url="../user-manual/actions-file.html#SET-IMAGE-BLOCKER"><literal>set-image-blocker</literal>
- action</ulink> to <quote>blank</quote>. This can be done by editing the
+ action</ulink> to <quote>blank</quote>. This can be done by editing the
<filename>user.action</filename> file, or through the <ulink
url="http://config.privoxy.org/show-status">web-based actions file editor</ulink>.
</para>
is rather smart, it will make occasional mistakes. The checkerboard image is visually
decent, and it shows you where images have been blocked, which can be very
helpful in case some navigation aid or otherwise innocent image was
- erroneously blocked. It is recommended for new users so they can
+ erroneously blocked. It is recommended for new users so they can
<quote>see</quote> what is happening. Some people might also enjoy seeing how
many banners they <emphasis>don't</emphasis> have to see.
</para>
or (i)layers, and these external HTML documents are blocked. Being non-images
they get replaced by a substitute HTML page rather than a substitute image,
which wouldn't work out technically, since the browser expects and accepts
- only HTML when it has requested an HTML document.
+ only HTML when it has requested an HTML document.
</para>
<para>
The substitute page adapts to the available space and shows itself as a
<sect2 renderas="sect3" id="srvany">
-<title>Can Privoxy run as a service
+<title>Can Privoxy run as a service
on Win2K/NT/XP?</title>
<para>
<![%p-newstuff;[
Yes. Version 3.0.5 introduces full <application>Windows</application> service
functionality. See <ulink url="../user-manual/installation.html#installation-pack-win">
- the <citetitle>User Manual</citetitle></ulink> for details on how to install and configure
+ the <citetitle>User Manual</citetitle></ulink> for details on how to install and configure
<application>Privoxy</application> as a service.
-</para>
+</para>
<para>
Earlier ]]>3.x versions could run as a system service using <command>srvany.exe</command>.
See the discussion at <ulink
and thus avoid individual browser configuration?</title>
<para>
- No, its more complicated than that. This only works with special kinds
+ No, its more complicated than that. This only works with special kinds
of proxies known as <quote>intercepting</quote> proxies
(<link linkend="INTERCEPTING">see below</link>).
</para>
but it can handle requests that where intercepted and redirected
with a packet filter (like <application>PF</application> or
<application>iptables</application>), as long as the <literal>Host</literal>
- header is present.
+ header is present.
</para>
<para>
As the <literal>Host</literal> header is required by HTTP/1.1 and as most
of knowing which particular application makes a request, so there is no way to
distinguish between web pages and HTML mail.
<application>Privoxy</application> just blindly proxies all requests. In the
- case of <application>Outlook Express</application> (see above), OE uses
- IE anyway, and there is no way for <application>Privoxy</application> to ever
+ case of <application>Outlook Express</application> (see above), OE uses
+ IE anyway, and there is no way for <application>Privoxy</application> to ever
be able to distinguish between them (nor could any other proxy type application for
that matter).
</para>
<para>
- For a good discussion of some of the issues involved (including privacy and
- security issues), see
+ For a good discussion of some of the issues involved (including privacy and
+ security issues), see
<ulink url="http://sourceforge.net/tracker/?func=detail&atid=211118&aid=629518&group_id=11118">http://sourceforge.net/tracker/?func=detail&atid=211118&aid=629518&group_id=11118</ulink>.
</para>
</sect2>
<title>I sometimes notice cookies sneaking through. How?</title>
<para>
<ulink
- url="http://en.wikipedia.org/wiki/Browser_cookie">Cookies</ulink> can be
- set in several ways. The classic method is via the
+ url="http://en.wikipedia.org/wiki/Browser_cookie">Cookies</ulink> can be
+ set in several ways. The classic method is via the
<literal>Set-Cookie</literal> HTTP header. This is straightforward, and an
- easy one to manipulate, such as the &my-app; concept of
+ easy one to manipulate, such as the &my-app; concept of
<ulink url="../user-manual/actions-file.html#SESSION-COOKIES-ONLY">session-cookies-only</ulink>.
- There is also the possibility of using
+ There is also the possibility of using
<ulink url="http://en.wikipedia.org/wiki/Javascript">Javascript</ulink> to
set cookies (&my-app; calls these <literal>content-cookies</literal>). This
is trickier because the syntax can vary widely, and thus requires a certain
<sect2 renderas="sect3" id="evil-cookies">
<title>Are all cookies bad? Why?</title>
<para>
- No, in fact there are many beneficial uses of
+ No, in fact there are many beneficial uses of
<ulink
url="http://en.wikipedia.org/wiki/Browser_cookie">cookies</ulink>. Cookies are just a
method that browsers can use to store data between pages, or between browser
sessions. Sometimes there is a good reason for this, and the user's life is a
bit easier as a result. But there is a long history of some websites taking
- advantage of this layer of trust, and using the data they glean from you and
+ advantage of this layer of trust, and using the data they glean from you and
your browsing habits for their own purposes, and maybe to your potential
detriment. Such sites are using you and storing their data on your system.
That is why the privacy conscious watch from whom those cookies come, and why
they really <emphasis>need</emphasis> to be there.
</para>
<para>
- See the
+ See the
<ulink url="http://en.wikipedia.org/wiki/Browser_cookie">Wikipedia cookie
definition</ulink> for more.
</para>
<title>How can I allow permanent cookies for my trusted sites?</title>
<para>
- There are several actions that relate to cookies. The default behavior is to
+ There are several actions that relate to cookies. The default behavior is to
allow only <quote>session cookies</quote>, which means the cookies only last
- for the current browser session. This eliminates most kinds of abuse related
+ for the current browser session. This eliminates most kinds of abuse related
to cookies. But there may be cases where you want cookies to last.
</para>
<para>
To disable all cookie actions, so that cookies are allowed unrestricted,
- both in and out, for <literal>example.com</literal>:
+ both in and out, for <literal>example.com</literal>:
</para>
<para>
<screen>
<para>
Each instance of <application>Privoxy</application> has its own
configuration, including such attributes as the TCP port that it listens on.
- What you can do is run multiple instances of <application>Privoxy</application>, each with
- a unique
+ What you can do is run multiple instances of <application>Privoxy</application>, each with
+ a unique
<ulink url="../user-manual/config.html#LISTEN-ADDRESS">listen-address</ulink>
configuration setting, and configuration path, and then
each of these can have their own configurations. Think of it as per-port
configuration.
</para>
-<para>
+<para>
Simple enough for a few users, but for large installations, consider having
groups of users that might share like configurations.
</para>
############################################################
{ <ulink url="../user-manual/actions-file.html#BLOCK">+block</ulink> }
/ # Block *all* URLs
-
+
############################################################
# Whitelist
############################################################
toys.example.com
games.example.com</screen>
<para>
- This allows access to only those three sites by first blocking all URLs, and
+ This allows access to only those three sites by first blocking all URLs, and
then subsequently allowing three specific exceptions.
</para>
<para>
- Another approach is <application>Privoxy's</application>
- <literal>trustfile</literal> concept, which incorporates the notion of
+ Another approach is <application>Privoxy's</application>
+ <literal>trustfile</literal> concept, which incorporates the notion of
<quote>trusted referrers</quote>. See the <ulink
url="../user-manual/config.html#TRUSTFILE">Trust documentation</ulink>
for details.
<sect2 renderas="sect3" id="no-adblock">
<title>How can I turn off ad-blocking?</title>
<para>
- Ad blocking is achieved through a complex application of various &my-app;
- <ulink url="../user-manual/actions-file.html">actions</ulink>. These
- actions are deployed against simple images, banners, flash animations,
+ Ad blocking is achieved through a complex application of various &my-app;
+ <ulink url="../user-manual/actions-file.html">actions</ulink>. These
+ actions are deployed against simple images, banners, flash animations,
text pages, JavaScript, pop-ups and pop-unders, etc., so its not as simple as
just turning one or two actions off. The various actions that make up
&my-app; ad blocking are hard-coded into the default configuration files. It
has been assumed that everyone using &my-app; is interested in this
- particular feature.
+ particular feature.
</para>
<para>
If you want to do without this, there are several approaches you can take:
blocking rules, and corresponding exceptions. Or lastly, if you are not
concerned about the additional blocks that are done for privacy reasons, you
can very easily over-ride <emphasis>all</emphasis> blocking with the
- following very simple rule in your <filename>user.action</filename>:
+ following very simple rule in your <filename>user.action</filename>:
</para>
<para>
<screen>
{ <ulink url="../user-manual/actions-file.html#BLOCK">-block</ulink> }
/ # UN-Block *all* URLs</screen>
</para>
-<para>
+<para>
Or even a more comprehensive reversing of various ad related actions:
</para>
<para>
</sect2>
<sect2 renderas="sect3" id="templates">
-<title>How can I have custom template pages, like the
+<title>How can I have custom template pages, like the
<emphasis>BLOCKED</emphasis> page?</title>
<para>
&my-app; <quote>templates</quote> are specialized text files utilized by
during upgrades. You can, however, create completely new templates,
place them in another directory and specify the alternate path in the main
<filename>config</filename>. For details, have a look at the <ulink
- url="../user-manual/config.html#templdir">templdir</ulink> option.
+ url="../user-manual/config.html#templdir">templdir</ulink> option.
</para>
</sect2>
<sect2 renderas="sect3" id="blockall">
-<title>How can I remove the <quote>Go There Anyway</quote> link from
+<title>How can I remove the <quote>Go There Anyway</quote> link from
the <emphasis>BLOCKED</emphasis> page?</title>
<para>
There is more than one way to do it (although Perl is not involved).
Editing the BLOCKED template page (see above) may dissuade some users, but
this method is easily circumvented. Where you need this level of control, you
might want to build &my-app; from source, and disable various features that are
- available as compile-time options. You should
+ available as compile-time options. You should
<command>configure</command> the sources as follows:
</para>
<para>
<sect1 id="misc"><title>Miscellaneous</title>
<sect2 renderas="sect3">
-<title id="slowsme">How much does Privoxy slow my browsing down? This
+<title id="slowsme">How much does Privoxy slow my browsing down? This
has to add extra time to browsing.</title>
<para>
How much of an impact depends on many things, including the CPU of the host
- system, how aggressive the configuration is, which specific actions are being triggered,
+ system, how aggressive the configuration is, which specific actions are being triggered,
the size of the page, the bandwidth of the connection, etc.
</para>
<para>
- Overall, it should not slow you down any in real terms, and may actually help
+ Overall, it should not slow you down any in real terms, and may actually help
speed things up since ads, banners and other junk are not typically being
retrieved and displayed. The actual processing time required by
<application>Privoxy</application> itself for each page, is relatively small
url="../user-manual/actions-file.html#FILTER">filter</ulink></literal> action,
such as filtering banners by size, web-bugs etc, or the <literal><ulink
url="../user-manual/actions-file.html#DEANIMATE-GIFS">deanimate-gifs</ulink></literal>
- action, the entire document must be loaded into memory in order for the filtering
+ action, the entire document must be loaded into memory in order for the filtering
mechanism to work, and nothing is sent to the browser during this time.
</para>
<para>
anti-virus software).
</para>
<para>
- Filtering is automatically disabled for inappropriate MIME types. But note
+ Filtering is automatically disabled for inappropriate MIME types. But note
that if the web server mis-reports the MIME type, then content that should
not be filtered, could be. <application>Privoxy</application> only knows how
to differentiate filterable content because of the MIME type as reported by
"http://p.p/"?</title>
<para>
<ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink> is the
- address of <application>Privoxy</application>'s built-in user interface, and
+ address of <application>Privoxy</application>'s built-in user interface, and
<ulink url="http://p.p/">http://p.p/</ulink> is a shortcut for it.
</para>
<para>
- Since <application>Privoxy</application> sits between your web browser and the Internet,
+ Since <application>Privoxy</application> sits between your web browser and the Internet,
it can simply intercept requests for these addresses and answer them with its built-in
<quote>web server</quote>.
</para>
<sect2 renderas="sect3" id="blocklist"><title>Do you still maintain the blocklists?</title>
<para>
No. The patterns for blocking now reside (among other things) in the <ulink
- url="../user-manual/actions-file.html">actions files</ulink>, which are
+ url="../user-manual/actions-file.html">actions files</ulink>, which are
actively maintained instead. See next question ...
</para>
</sect2>
</sect2>
-<sect2 renderas="sect3" id="newads2"><title>If I do submit missed ads, will
+<sect2 renderas="sect3" id="newads2"><title>If I do submit missed ads, will
they be included in future updates?</title>
<para>
Whether such submissions are eventually included in the
- <filename>default.action</filename> configuration file depends on how
- significant the issue is. We of course want to address any potential
- problem with major, high-profile sites such as <citetitle>Google</citetitle>,
- <citetitle>Yahoo</citetitle>, etc. Any site with global or regional reach,
+ <filename>default.action</filename> configuration file depends on how
+ significant the issue is. We of course want to address any potential
+ problem with major, high-profile sites such as <citetitle>Google</citetitle>,
+ <citetitle>Yahoo</citetitle>, etc. Any site with global or regional reach,
has a good chance of being a candidate. But at the other end of the spectrum
are any number of smaller, low-profile sites such as for local clubs or
schools. Since their reach and impact are much less, they are best handled by
inclusion in the user's <filename>user.action</filename>, and thus would be
- unlikely to be included.
+ unlikely to be included.
</para>
</sect2>
-<sect2 renderas="sect3" id="noonecares"><title>Why doesn't anyone answer my support
+<sect2 renderas="sect3" id="noonecares"><title>Why doesn't anyone answer my support
request?</title>
<para>
Rest assured that it has been read and considered. Why it is not answered,
If you run both the browser and &my-app; locally, you cannot hide your IP
address with <application>Privoxy</application> or ultimately any other
software alone. The server needs to know your IP address so that it knows
- where to send the responses back.
+ where to send the responses back.
</para>
<para>
There are many publicly usable "anonymous" proxies out there, which
</para>
<para>
<application>Privoxy</application> can remove various information about you,
- and allows <emphasis>you</emphasis> more freedom to decide which sites
- you can trust, and what details you want to reveal. But it neither
+ and allows <emphasis>you</emphasis> more freedom to decide which sites
+ you can trust, and what details you want to reveal. But it neither
hides your IP address, nor can it guarantee that the rest of the system
behaves correctly. There are several possibilities how a web sites can find
out who you are, even if you are using a strict <application>Privoxy</application>
<ulink url="../user-manual/startup.html">5. Startup</ulink> to make sure
<application>Privoxy</application> itself is setup correctly.
</para>
-<para>
+<para>
If it is, refer to <ulink url="https://www.torproject.org/documentation.html">Tor's
extensive documentation</ulink> to learn how to install <application>Tor</application>,
and make sure <application>Tor</application>'s logfile says that
content is being altered?</title>
<para>
- Definitely. It is common for sites to use browser type, browser version,
+ Definitely. It is common for sites to use browser type, browser version,
HTTP header content, and various other techniques in order to dynamically
decide what to display and how to display it. What you see, and what I see,
might be very different. There are many, many ways that this can be handled,
many other ways things can go wrong when trying to fool a web server. The
results of which could inadvertently cause pages to load incorrectly,
partially, or even not at all. And there may be no obvious clues as to just
- what went wrong, or why. Nowhere will there be a message that says
- <quote><emphasis>Turn off <literal>fast-redirects</literal> or else!</emphasis>
+ what went wrong, or why. Nowhere will there be a message that says
+ <quote><emphasis>Turn off <literal>fast-redirects</literal> or else!</emphasis>
</quote>
</para>
</para>
<para>
- If you have problems with a site, you will have to adjust your configuration
- accordingly. Cookies are probably the most likely adjustment that may
+ 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.
</para>
<sect2 renderas="sect3">
-<title id="caching">Can Privoxy act as a <quote>caching</quote> proxy to
+<title id="caching">Can Privoxy act as a <quote>caching</quote> proxy to
speed up web browsing?</title>
<para>
- No, it does not have this ability at all. You want something like
+ No, it does not have this ability at all. You want something like
<ulink url="http://www.squid-cache.org/">Squid</ulink> or
<ulink url="http://www.pps.jussieu.fr/~jch/software/polipo/">Polipo</ulink> for this.
- And, yes, before you ask, <application>Privoxy</application> can co-exist
+ And, yes, before you ask, <application>Privoxy</application> can co-exist
with other kinds of proxies like <application>Squid</application>.
See the <ulink url="../user-manual/config.html#FORWARDING">forwarding
chapter</ulink> in the <ulink url="../user-manual/index.html">user
<sect2 renderas="sect3">
<title id="firewall">What about as a firewall? Can Privoxy protect me?</title>
<para>
- Not in the way you mean, or in the way some firewall vendors claim they can.
+ Not in the way you mean, or in the way some firewall vendors claim they can.
<application>Privoxy</application> can help protect your privacy, but can't
protect your system from intrusion attempts. It is, of course, perfectly possible
to use <emphasis>both</emphasis>.
ads used to be. Why?</title>
<para>
It is technically possible to eliminate banners and ads in a way that frees
- their allocated page space. This could easily be done by blocking with
+ their allocated page space. This could easily be done by blocking with
<application>Privoxy's</application> filters,
and eliminating the <emphasis>entire</emphasis> image references from the
- HTML page source.
+ HTML page source.
</para>
<para>
But, this would consume considerably more CPU resources (IOW, slow things
As far as ad blocking is concerned, this is less of a restriction than it may
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
+ for efficiency reasons, which exposes them to the full power of
<application>Privoxy</application>'s ad blocking.
</para>
<para>
<quote>Content cookies</quote> (those that are embedded in the actual HTML or
JS page content, see <literal><ulink
- url="../user-manual/actions-file.html#FILTER-CONTENT-COOKIES">filter{content-cookies}</ulink></literal>),
- in an SSL transaction will be impossible to block under these conditions.
- Fortunately, this does not seem to be a very common scenario since most
+ url="../user-manual/actions-file.html#FILTER-CONTENT-COOKIES">filter{content-cookies}</ulink></literal>),
+ in an SSL transaction will be impossible to block under these conditions.
+ Fortunately, this does not seem to be a very common scenario since most
cookies come by traditional means.
</para>
</sect2>
<sect2 renderas="sect3">
-<title id="secure">Privoxy runs as a <quote>server</quote>. How
+<title id="secure">Privoxy runs as a <quote>server</quote>. How
secure is it? Do I need to take any special precautions?</title>
<para>
- On Unix-like systems, <application>Privoxy</application> can run as a non-privileged
+ On Unix-like systems, <application>Privoxy</application> can run as a non-privileged
user, which is how we recommend it be run. Also, by default
<application>Privoxy</application> listens to requests from <quote>localhost</quote>
only.
</para>
<para>
- The server aspect of <application>Privoxy</application> is not itself directly
+ The server aspect of <application>Privoxy</application> is not itself directly
exposed to the Internet in this configuration. If you want to have
<application>Privoxy</application> serve as a LAN proxy, this will have to
be opened up to allow for LAN requests. In this case, we'd recommend
- you specify only the LAN gateway address, e.g. 192.168.1.1, in the main
+ you specify only the LAN gateway address, e.g. 192.168.1.1, in the main
<application>Privoxy</application> configuration file and check all <ulink
url="../user-manual/config.html#ACCESS-CONTROL">access control and security
options</ulink>. All LAN hosts can then use this as their proxy address
url="http://config.privoxy.org/toggle">http://config.privoxy.org/toggle</ulink>.
</para>
<para>
- See the <ulink url="../user-manual/appendix.html#BOOKMARKLETS">Bookmarklets section</ulink>
- of the <citetitle>User Manual</citetitle> for an easy way to access this
- feature. Note that this is a feature that may need to be enabled in the main
+ See the <ulink url="../user-manual/appendix.html#BOOKMARKLETS">Bookmarklets section</ulink>
+ of the <citetitle>User Manual</citetitle> for an easy way to access this
+ feature. Note that this is a feature that may need to be enabled in the main
<filename>config</filename> file.
</para>
</sect2>
<sect2 renderas="sect3" id="reallyoff">
-<title>When <quote>disabled</quote> is Privoxy totally
+<title>When <quote>disabled</quote> is Privoxy totally
out of the picture?</title>
<para>
No, this just means all optional filtering and actions are disabled.
- <application>Privoxy</application> is still acting as a proxy, but just
+ <application>Privoxy</application> is still acting as a proxy, but just
doing less of the things that <application>Privoxy</application> would
- normally be expected to do. It is still a <quote>middle-man</quote> in
- the interaction between your browser and web sites. See below to bypass
+ normally be expected to do. It is still a <quote>middle-man</quote> in
+ the interaction between your browser and web sites. See below to bypass
the proxy.
</para>
</sect2>
<sect2 renderas="sect3" id="crunch">
-<title>My logs show Privoxy <quote>crunches</quote>
+<title>My logs show Privoxy <quote>crunches</quote>
ads, but also its own internal CGI pages. What is a <quote>crunch</quote>?</title>
<para>
- A <quote>crunch</quote> simply means <application>Privoxy</application> intercepted
+ A <quote>crunch</quote> simply means <application>Privoxy</application> intercepted
<emphasis>something</emphasis>, nothing more. Often this is indeed ads or
banners, but <application>Privoxy</application> uses the same mechanism for
trapping requests for its own internal pages. For instance, a request for
viewing a document (i.e. a page), and downloading a file. The same is true of
<application>Privoxy</application>. If there is a match for a <literal><ulink
url="../user-manual/actions-file.html#BLOCK">block</ulink></literal> pattern,
- it will still be blocked, and of course this is obvious.
+ it will still be blocked, and of course this is obvious.
</para>
<para>
Filtering is potentially more of a concern since the results are not always
altered by filtering, will be saved too, for these (probably rare) cases.
</para>
<para>
- Note that versions later than 3.0.2 do NOT filter document types reported as
+ Note that versions later than 3.0.2 do NOT filter document types reported as
<quote>text/plain</quote>. Prior to this, <application>Privoxy</application>
did filter this document type.
</para>
all to the content is to be avoided.
</para>
<para>
- <application>Privoxy</application> does not do FTP at all, only HTTP
+ <application>Privoxy</application> does not do FTP at all, only HTTP
and HTTPS (SSL) protocols.
</para>
</sect2>
<title>Should I continue to use a <quote>HOSTS</quote> file for ad-blocking?</title>
<para>
One time-tested technique to defeat common ads is to trick the local DNS
- system by giving a phony IP address for the ad generator in the local
- <filename>HOSTS</filename> file, typically using <literal>127.0.0.1</literal>, aka
+ system by giving a phony IP address for the ad generator in the local
+ <filename>HOSTS</filename> file, typically using <literal>127.0.0.1</literal>, aka
<literal>localhost</literal>. This effectively blocks the ad.
</para>
<para>
- There is no reason to use this technique in conjunction with
+ There is no reason to use this technique in conjunction with
<application>Privoxy</application>. <application>Privoxy</application>
- does essentially the same thing, much more elegantly and with much more
+ does essentially the same thing, much more elegantly and with much more
flexibility. A large <filename>HOSTS</filename> file, in fact, not only
duplicates effort, but may get in the way and seriously slow down your system.
- It is recommended to remove such entries from your <filename>HOSTS</filename> file. If you think
- your hosts list is neglected by <application>Privoxy's </application>
+ It is recommended to remove such entries from your <filename>HOSTS</filename> file. If you think
+ your hosts list is neglected by <application>Privoxy's </application>
configuration, consider adding your list to your <filename>user.action</filename> file:
</para>
<para>
<!--
<para>
- Please see the
- <ulink url="../user-manual/seealso.html">user-manual</ulink> for
+ Please see the
+ <ulink url="../user-manual/seealso.html">user-manual</ulink> for
others references.
</para>
-->
</sect2>
<sect2 renderas="sect3" id="microsuck">
-<title>I've noticed that Privoxy changes <quote>Microsoft</quote> to
+<title>I've noticed that Privoxy changes <quote>Microsoft</quote> to
<quote>MicroSuck</quote>! Why are you manipulating my browsing?</title>
<para>
Privoxy generates HTML in both its own <quote>templates</quote>, and possibly
whenever there are text substitutions via a &my-app; filter. While this
should always conform to the HTML 4.01 specifications, it has not been
- validated against this or any other standard.
+ validated against this or any other standard.
</para>
</sect2>
<para>
<itemizedlist>
<listitem><para>
-<application>Privoxy</application> is not running. Solution: verify
+<application>Privoxy</application> is not running. Solution: verify
that &my-app; is installed correctly, has not crashed, and is indeed running.
Turn on <application>Privoxy's</application> logging, and look at the logs to see what they say.
</para></listitem>
configuration and take the forwarders out of the equation.
</para></listitem>
<listitem><para>
- Or you have a firewall that is interfering and blocking you. Solution:
+ Or you have a firewall that is interfering and blocking you. Solution:
try disabling or removing the firewall as a simple test.
</para></listitem>
</itemizedlist>
</sect2>
<sect2 renderas="sect3">
-<title id="flushit">I just added a new rule, but the steenkin ad is
+<title id="flushit">I just added a new rule, but the steenkin ad is
still getting through. How?</title>
<para>
If the ad had been displayed before you added its URL, it will probably be
applied. Try pasting the full URL of the offending ad into <ulink
url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
and see if it really matches your new rule. Blocking ads is like blocking
- spam: a lot of tinkering is required to stay ahead of the game. And
- remember you need to block the URL of the ad in question, which may be
+ spam: a lot of tinkering is required to stay ahead of the game. And
+ remember you need to block the URL of the ad in question, which may be
entirely different from the site URL itself. Most ads are hosted on different
servers than the main site itself. If you right-click on the ad, you should
- be able to get all the relevant information you need. Alternately, you can
+ be able to get all the relevant information you need. Alternately, you can
find the correct URL by looking at <application>Privoxy's</application> logs
(you may need to enable logging in the main config file if its disabled).
</para>
<para>
- Below is a slightly modified real-life log snippet that originates with one
+ Below is a slightly modified real-life log snippet that originates with one
requested URL: <literal>www.example.com</literal> (name of site was changed
for this example, the number of requests is real). You can see in this the
complexity of what goes into making up this one <quote>page</quote>. There
content is obviously <quote>good</quote> or <quote>bad</quote>, but not all.
Many of the more questionable looking requests, are going to outside domains
that seem to be identifying themselves with suspicious looking names, making
- our job a little easier. &my-app; has <quote>crunched</quote> (meaning caught
- and BLOCKED) quite a few items in this example, but perhaps missed a few as well.
+ our job a little easier. &my-app; has <quote>crunched</quote> (meaning caught
+ and BLOCKED) quite a few items in this example, but perhaps missed a few as well.
</para>
<para>
<screen>
What can I do?</title>
<para>
- First verify that it is indeed a <application>Privoxy</application> problem,
+ First verify that it is indeed a <application>Privoxy</application> problem,
by toggling off <application>Privoxy</application> through <ulink
url="http://config.privoxy.org/toggle">http://config.privoxy.org/toggle</ulink>
(the toggle feature may need to be enabled in the main
on again. Remember to flush your browser's caches in between any such changes!
</para>
<para>
- Alternately, if you are comfortable with a text editor, you can accomplish
- the same thing by editing the appropriate actions file. Probably the easiest
+ Alternately, if you are comfortable with a text editor, you can accomplish
+ the same thing by editing the appropriate actions file. Probably the easiest
way to deal with such problems when editing by hand is to add your
site to a <literal>{ fragile }</literal> section in <filename>user.action</filename>,
which is an alias that turns off most <quote>dangerous</quote>
actions, but is also likely to turn off more actions then needed, and thus lower
- your privacy and protection more than necessary,
+ your privacy and protection more than necessary,
</para>
<para>
Troubleshooting actions is discussed in more detail in the <ulink
with general configuration information and examples.
</para>
<para>
- As a last resort, you can always see if your browser has a setting that will
+ As a last resort, you can always see if your browser has a setting that will
bypass the proxy setting for selective sites. Modern browsers can do this.
</para>
set-up DUN connection and each LAN connection in IE store the settings for
each user individually. As such this enforces individual configurations
rather than common ones. Hence the first time you use a DUN connection after
- re-booting your system it may not perform as you expect, and prompt you for
+ re-booting 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.
</para>
<title>I cannot connect to any FTP sites. Privoxy
is blocking me.</title>
<para>
- <application>Privoxy</application> cannot act as a proxy for FTP traffic,
+ <application>Privoxy</application> cannot act as a proxy for FTP traffic,
so do not configure your browser to use <application>Privoxy</application>
as an FTP proxy. The same is true for <emphasis>any protocol other than HTTP
- or HTTPS (SSL)</emphasis>.
+ or HTTPS (SSL)</emphasis>.
</para>
<para>
Most browsers understand FTP as well as HTTP. If you connect to a site, with
a URL like <literal>ftp://ftp.example.com</literal>, your browser is making
- an FTP connection, and not a HTTP connection. So while your browser may
- speak FTP, <application>Privoxy</application> does not, and cannot proxy
+ an FTP connection, and not a HTTP connection. So while your browser may
+ speak FTP, <application>Privoxy</application> does not, and cannot proxy
such traffic.
</para>
<para>
accidentally enable FTP proxying in these cases. And of course, if this
happens, <application>Privoxy</application> will indeed cause problems since
it does not know FTP. <![%p-newstuff;[Newer version will give a sane error
- message if a FTP connection is attempted.]]> Just disable the FTP setting
+ message if a FTP connection is attempted.]]> Just disable the FTP setting
and all will be well again.
</para>
<para>
<!-- ~~~~~ New section ~~~~~ -->
<sect2 id="macosxie" renderas="sect3">
-<title>In Mac OS X, I can't configure Microsoft Internet Explorer to use
+<title>In Mac OS X, I can't configure Microsoft Internet Explorer to use
Privoxy as the HTTP proxy.</title>
<para>
Microsoft Internet Explorer (in versions like 5.1) respects system-wide
network settings. In order to change the HTTP proxy, open System
Preferences, and click 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 <literal>127.0.0.1</literal> in the entry field.
+ comes up, click on the Proxies tab. Ensure the "Web Proxy (HTTP)" checkbox
+ is checked and enter <literal>127.0.0.1</literal> in the entry field.
Enter <literal>8118</literal> in the Port field. The next time you start
IE, it should reflect these values.
</para>
<!-- ~~~~~ New section ~~~~~ -->
<sect2 renderas="sect3" id="macosxuninstall">
-<title>In Mac OS X, I dragged the Privoxy folder to the trash in order to
+<title>In Mac OS X, 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.</title>
<para>
Note: This ONLY applies to privoxy 3.0.6 and earlier.
- </para>
+ </para>
<para>
Just dragging the <application>Privoxy</application> folder to the trash is
not enough to delete it. <application>Privoxy</application> supplies an
these details. Open the trash, drag the <application>uninstall.command</application>
file out of the trash and double-click on it. You will be prompted for
confirmation and the administration password.
- </para>
+ </para>
<para>
- The trash may still appear full after this command; emptying the trash
+ The trash may still appear full after this command; emptying the trash
from the desktop should make it appear empty again.
</para>
</sect2>
<literal>localhost</literal> as my browser's proxy setting.</title>
<para>
We believe this is due to an IPv6-related bug in Mac OS X, but don't fully
- understand the issue yet. In any case, changing the proxy setting to
+ understand the issue yet. In any case, changing the proxy setting to
<literal>127.0.0.1</literal> instead of <literal>localhost</literal>
works around the problem.
</para>
<filename>user.action</filename>:
</para>
<screen>
- # Make exceptions for ill-behaved sites:
- #
- {-prevent-compression}
+ # Make exceptions for ill-behaved sites:
+ #
+ {-prevent-compression}
.example.com</screen>
<para>
If that works, you may also want to report the problem to the
its running on from the IP address of the system interface it is bound to
(from the <filename>config</filename> file
<emphasis>listen-address</emphasis> setting). If the system cannot supply
- this information, <application>Privoxy</application> logs this condition.
+ this information, <application>Privoxy</application> logs this condition.
</para>
<para>
Typically, this would be considered a minor system configuration error. It is
</sect2>
<sect2 renderas="sect3" id="inuse">
-<title>When I try to launch Privoxy, I get an
+<title>When I try to launch Privoxy, I get an
error message <quote>port 8118 is already in use</quote> (or similar wording).
Why?</title>
<para>
- Port 8118 is <application>Privoxy's</application> default TCP
+ Port 8118 is <application>Privoxy's</application> default TCP
<quote>listening</quote> port. Typically this message would mean that there
is already one instance of <application>Privoxy</application> running, and
your system is actually trying to start a second
is used?
</title>
<para>
- This may also be caused by the <quote>demoronizer</quote> filter,
- in conjunction with a web server that is misreporting the content type. Binary
+ This may also be caused by the <quote>demoronizer</quote> filter,
+ in conjunction with a web server that is misreporting the content type. Binary
files are exempted from <application>Privoxy's</application> filtering
(unless the web server by mistake says the file is something else). Either
upgrade <application>Privoxy</application>, or go to the most recent
What is the <quote>demoronizer</quote> and why is it there?
</title>
<para>
- The original demoronizer was a Perl script that cleaned up HTML pages which
- were created with certain Microsoft products. MS has used proprietary extensions
+ The original demoronizer was a Perl script that cleaned up HTML pages which
+ were created with certain Microsoft products. MS has used proprietary extensions
to standardized font encodings (ISO 8859-1), which has caused problems for pages
that are viewed with non-Microsoft products (and are expecting to see a
standard set of fonts). The demoronizer corrected these errors so the pages
displayed correctly. <application>Privoxy</application> borrowed from this
script, introducing a filter based on the original demoronizer, which in turn could
- correct these errors on the fly.
+ correct these errors on the fly.
</para>
<para>
- But this is only needed in some situations, and will cause serious problems in some
+ But this is only needed in some situations, and will cause serious problems in some
other situations.
</para>
<para>
- If you are using Microsoft products, you do not need it. If you need to view
- pages with UTF-8 characters (such as Cyrillic or Chinese), then it will
+ If you are using Microsoft products, you do not need it. If you need to view
+ pages with UTF-8 characters (such as Cyrillic or Chinese), then it will
cause corruption of the fonts, and thus <emphasis>should not be on</emphasis>.
</para>
<para>
- On the other hand, if you use non-Microsoft products, and you occasionally
+ On the other hand, if you use non-Microsoft products, and you occasionally
notice weird characters on pages, you might want to try it.
</para>
</sect2>
Why do I keep seeing <quote>PrivoxyWindowOpen()</quote> in raw source code?
</title>
<para>
- <application>Privoxy</application> is attempting to disable malicious
- <ulink url="http://en.wikipedia.org/wiki/Javascript">Javascript</ulink>
+ <application>Privoxy</application> is attempting to disable malicious
+ <ulink url="http://en.wikipedia.org/wiki/Javascript">Javascript</ulink>
in this case, with the <literal>unsolicited-popups</literal>
- filter. <application>Privoxy</application> cannot tell very well
+ filter. <application>Privoxy</application> cannot tell very well
<quote>good</quote> code snippets from <quote>bad</quote> code snippets.
</para>
<para>
- If you see this in HTML source, and the page displays without problems, then
- this is good, and likely some pop-up window was disabled. If you see this
- where it is causing a problem, such as a downloaded program source code file,
+ If you see this in HTML source, and the page displays without problems, then
+ this is good, and likely some pop-up window was disabled. If you see this
+ where it is causing a problem, such as a downloaded program source code file,
then you should set an exception for this site or page such that the
integrity of the page stays in tact by disabling all filtering.
</para>
<sect2 renderas="sect3" id="allcpu">
<title>
- At one site Privoxy just hangs, and starts taking
+ At one site Privoxy just hangs, and starts taking
all CPU. Why is this?
</title>
<para>
This is probably a manifestation of the <quote>100% cpu</quote> problem that
- occurs on pages containing many (thousands upon thousands) of blank lines. The blank lines
- are in the raw HTML source of the page, and the browser just ignores them. But the
+ occurs on pages containing many (thousands upon thousands) of blank lines. The blank lines
+ are in the raw HTML source of the page, and the browser just ignores them. But the
pattern matching in <application>Privoxy's</application> page filtering
mechanism is trying to match against absurdly long strings and this becomes
very CPU-intensive, taking a long, long time to complete.
If you compiled &my-app; with threading support (on POSIX-based systems),
the <quote>Conditional #defines</quote> section on <ulink
url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
- will list <quote>FEATURE_PTHREAD</quote> as <quote>enabled</quote>.
+ will list <quote>FEATURE_PTHREAD</quote> as <quote>enabled</quote>.
</para>
</sect2>
&contacting;
<!-- end contacting -->
</sect1>
-
+
<!-- ~~~~~ New section ~~~~~ -->
<sect1 id="copyright"><title>Privoxy Copyright, License and History</title>
<!-- Include copyright.sgml -->
©right;
<!-- end -->
-
+
<para>
Portions of this document are <quote>borrowed</quote> from the original
- <application>Junkbuster</application> (tm) FAQ, and modified as
+ <application>Junkbuster</application> (tm) FAQ, and modified as
appropriate for <application>Privoxy</application>.
</para>
</sect1>
<!-- ~ End section ~ -->
-
-
+
+
<!-- ~~~~~ New section ~~~~~ -->
<!--
<sect1 id="seealso"><title>See also</title>
<!-- hhmts end -->
<!--
Tue 09/11/01 06:38:14 PM EST: Test SGML doc by Hal Burgiss.
-
- This program is free software; you can redistribute it
+
+ 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
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.,
+ or write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
$Log: faq.sgml,v $
+Revision 2.80 2011/08/18 11:42:50 fabiankeil
+Bump some more documentation copyright ranges.
+
Revision 2.79 2011/08/17 10:40:07 fabiankeil
Update the entities.
File : $Source: /cvsroot/ijbswa/current/doc/source/history.sgml,v $
Purpose : Entity included in other project documents.
-
- $Id: history.sgml,v 2.6 2006/09/24 20:14:04 hal9 Exp $
+
+ $Id: history.sgml,v 2.7 2009/02/22 11:05:21 fabiankeil Exp $
Copyright (C) 2001-2009 Privoxy Developers http://www.privoxy.org/
See LICENSE.
This file used for inclusion with other documents only.
======================================================================
- If you make changes to this file, please verify the finished
+ If you make changes to this file, please verify the finished
docs all display as intended.
This file is included into:
<para>
A long time ago, there was the
- <ulink url="http://www.junkbusters.com/ijb.html"><application>Internet Junkbuster</application></ulink>,
+ <ulink url="http://www.junkbusters.com/ijb.html"><application>Internet Junkbuster</application></ulink>,
by Anonymous Coders and <ulink url="http://www.junkbusters.com/">Junkbusters
Corporation</ulink>. This saved many users a lot of pain in the early days of
web advertising and user tracking.
But the web, its protocols and standards, and with it, the techniques for
forcing ads on users, give up autonomy over their browsing, and
for tracking them, keeps evolving. Unfortunately, the <application>Internet
- Junkbuster</application> did not. Version 2.0.2, published in 1998, was
+ Junkbuster</application> did not. Version 2.0.2, published in 1998, was
(and is) the last official
<ulink url="http://www.junkbusters.com/ijbdist.html#release">release</ulink>
available from <ulink url="http://www.junkbusters.com">Junkbusters Corporation</ulink>.
<para>
The result of this is <application>Privoxy</application>, whose first
- stable version, 3.0, was released August, 2002.
+ stable version, 3.0, was released August, 2002.
<!-- Cautious!!!!!!!!! ;) -->
</para>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
-<!entity % dummy "IGNORE">
+<!entity % dummy "IGNORE">
<!entity buildsource SYSTEM "buildsource.sgml">
<!entity p-version "3.0.18">
<!entity p-status "UNRELEASED">
File : $Source: /cvsroot/ijbswa/current/doc/source/install.sgml,v $
Purpose : INSTALL file for Privoxy
-
- $Id: install.sgml,v 2.17 2010/11/06 12:55:48 fabiankeil Exp $
+
+ $Id: install.sgml,v 2.18 2011/08/17 10:40:07 fabiankeil Exp $
Copyright (C) 2001-2009 Privoxy Developers http://www.privoxy.org/
See LICENSE.
========================================================================
- NOTE: Please read developer-manual/documentation.html before touching
+ NOTE: Please read developer-manual/documentation.html before touching
anything in this, or other Privoxy documentation. You have been warned!
- Failure to abide by this rule will result in the revocation of your license
+ Failure to abide by this rule will result in the revocation of your license
to live a peaceful existence!
========================================================================
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
* The GNU General Public License should be included with
* this file. If not, you can view it at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * or write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA
*
*********************************************************************/
File : $Source: /cvsroot/ijbswa/current/doc/source/license.sgml,v $
Purpose : Entity included in other project documents.
-
- $Id: license.sgml,v 2.5 2006/09/22 01:27:55 hal9 Exp $
+
+ $Id: license.sgml,v 2.6 2008/05/23 15:09:48 fabiankeil Exp $
Copyright (C) 2001-2008 Privoxy Developers http://www.privoxy.org/
See LICENSE.
-
+
======================================================================
This file used for inclusion with other documents only.
======================================================================
- If you make changes to this file, please verify the finished
+ If you make changes to this file, please verify the finished
docs all display as intended.
This file is included into:
<para>
<application>Privoxy</application> is free software; you can
- redistribute it and/or modify it under the terms of the
+ redistribute it and/or modify it under the terms of the
<citetitle>GNU General Public License</citetitle>, version 2,
as published by the Free Software Foundation.
</para>
File : $Source: /cvsroot/ijbswa/current/doc/source/p-authors.sgml,v $
Purpose : Entity included in other project documents.
-
- $Id: p-authors.sgml,v 2.40 2009/10/24 12:28:02 fabiankeil Exp $
+
+ $Id: p-authors.sgml,v 2.41 2009/12/16 08:28:11 fabiankeil Exp $
Copyright (C) 2001-2009 Privoxy Developers http://www.privoxy.org/
See LICENSE.
This file used for inclusion with other documents only.
======================================================================
- If you make changes to this file, please verify the finished
+ If you make changes to this file, please verify the finished
docs all display as intended.
This file is included into:
Purpose : Used with other docs and files only.
- $Id: p-config.sgml,v 2.77 2011/08/17 10:30:36 fabiankeil Exp $
+ $Id: p-config.sgml,v 2.78 2011/08/18 11:42:50 fabiankeil Exp $
Copyright (C) 2001-2011 Privoxy Developers http://www.privoxy.org/
See LICENSE.
========================================================================
- NOTE: Please read developer-manual/documentation.html before touching
+ NOTE: Please read developer-manual/documentation.html before touching
anything in this, or other Privoxy documentation.
========================================================================
-
- This file contains all the config file comments and options. It used to
+
+ This file contains all the config file comments and options. It used to
build both the user-manual config sections, and all of config (yes, the main
config file) itself.
- Rationale: This is broken up into two files since a file with a prolog
+ Rationale: This is broken up into two files since a file with a prolog
(DTD, etc) cannot be sourced as a secondary file. config.sgml is basically
a wrapper for this file.
IMPORTANT:
- OPTIONS: The actual options are included in this file and prefixed with
- '@@', and processed by the Makefile to strip the '@@'. Default options
- that should appear commented out should be listed as: '@@#OPTION'.
+ OPTIONS: The actual options are included in this file and prefixed with
+ '@@', and processed by the Makefile to strip the '@@'. Default options
+ that should appear commented out should be listed as: '@@#OPTION'.
Otherwise, as '@@OPTION'. Example:
@@listen-address 127.0.0.1:8118
- The Makefile does significant other processing too. The final results
- should be checked to make sure that the perl processing does not
+ The Makefile does significant other processing too. The final results
+ should be checked to make sure that the perl processing does not
fubar something!!! Makefile processing requires w3m, fmt (shell line
formatter), and perl.
-
+
This file is included into:
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
<emphasis>confdir /etc/privoxy</emphasis></literallayout>
</msgtext>
- </literal>
+ </literal>
</para>
<para>
Sample Configuration File for Privoxy v&p-version;
</title>
<para>
- $Id: p-config.sgml,v 2.77 2011/08/17 10:30:36 fabiankeil Exp $
+ $Id: p-config.sgml,v 2.78 2011/08/18 11:42:50 fabiankeil Exp $
</para>
<para>
Copyright (C) 2001-2011 Privoxy Developers http://www.privoxy.org/
</para>
<para>
Thus, by placing a # at the start of an existing configuration line,
- you can make it a comment and it will be treated as if it weren't there.
+ you can make it a comment and it will be treated as if it weren't there.
This is called "commenting out" an option and can be useful. Removing
the # again is called "uncommenting".
</para>
<term>Notes:</term>
<listitem>
<para>
- The User Manual URI is the single best source of information on
+ The User Manual URI is the single best source of information on
<application>Privoxy</application>, and 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 copy.
+ installed copy.
</para>
<para>
Examples:
<para>
<screen> user-manual file://///some-server/some-path/privoxy-&p-version;/user-manual/</screen>
</para>
- -->
+ -->
<para>
The best all purpose solution is simply to put the full local
<literal>PATH</literal> to where the <citetitle>User Manual</citetitle> is
(or the shortcut: <literal>http://p.p/user-manual/</literal>).
</para>
<para>
- If the documentation is not on the local system, it can be accessed
+ If the documentation is not on the local system, it can be accessed
from a remote server, as:
</para>
<para>
file</emphasis>, because it is used while the config file is being read
on start-up.
</para>
- </warning>
+ </warning>
]]>
<![%config-file;[
WARNING!!!
</para>
<blockquote>
- <para>
+ <para>
If set, this option should be the first option in the config
file, because it is used while the config file is being read.
</para>
<term>Specifies:</term>
<listitem>
<para>
- A URL to be displayed in the error page that users will see if access to an untrusted page is denied.
+ A URL to be displayed in the error page that users will see if access to an untrusted page is denied.
</para>
</listitem>
</varlistentry>
If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
are unset, the whole "Local Privoxy Support" box on all generated pages will
not be shown.
- </para>
+ </para>
</listitem>
</varlistentry>
</variablelist>
If both <literal>admin-address</literal> and <literal>proxy-info-url</literal>
are unset, the whole "Local Privoxy Support" box on all generated pages will
not be shown.
- </para>
+ </para>
<para>
This URL shouldn't be blocked ;-)
- </para>
+ </para>
</listitem>
</varlistentry>
</variablelist>
<application>Privoxy</application> can (and normally does) use a number of
other files for additional configuration, help and logging.
This section of the configuration file tells <application>Privoxy</application>
- where to find those other files.
+ where to find those other files.
</para>
<para>
<para>
No trailing <quote><literal>/</literal></quote>, please.
</para>
- <!--
+ <!--
This is really outdated and not likely to happen. HB 09/20/06
<para>
When development goes modular and multi-user, the blocker, filter, and
per-user config will be stored in subdirectories of <quote>confdir</quote>.
- For now, the configuration directory structure is flat, except for
- <filename>confdir/templates</filename>, where the HTML templates for CGI
- output reside (e.g. <application>Privoxy's</application> 404 error page).
+ For now, the configuration directory structure is flat, except for
+ <filename>confdir/templates</filename>, where the HTML templates for CGI
+ output reside (e.g. <application>Privoxy's</application> 404 error page).
</para>
- -->
+ -->
</listitem>
</varlistentry>
</variablelist>
<term>Effect if unset:</term>
<listitem>
<para>
- No actions are taken at all. More or less neutral proxying.
+ No actions are taken at all. More or less neutral proxying.
</para>
</listitem>
</varlistentry>
<para>
Multiple <literal>actionsfile</literal> lines are permitted, and are in fact recommended!
</para>
- <para>
+ <para>
The default values are <filename>default.action</filename>, which is the
<quote>main</quote> actions file maintained by the developers, and
<filename>user.action</filename>, where you can make your personal additions.
</para>
- <para>
- Actions files contain all the per site and per URL configuration for
+ <para>
+ Actions files contain all the per site and per URL configuration for
ad blocking, cookie management, privacy considerations, etc.
- There is no point in using <application>Privoxy</application> without at
+ There is no point in using <application>Privoxy</application> without at
least one actions file.
</para>
<para>
rules that use <link linkend="regex">regular expressions</link>. These rules permit
powerful changes on the content of Web pages, and optionally the headers
as well, e.g., you could try to disable your favorite JavaScript annoyances,
- re-write the actual displayed text, or just have some fun
+ re-write the actual displayed text, or just have some fun
playing buzzword bingo with web pages.
</para>
<para>
periodically remove it. On Unix systems, you can do this with a cron job
(see <quote>man cron</quote>). For Red Hat based Linux distributions, a
<command>logrotate</command> script has been included.
- </para>
+ </para>
<para>
Any log files must be writable by whatever user <application>Privoxy</application>
is being run as (on Unix, default user id is <quote>privoxy</quote>).
</para>
<para>
If you specify a trust file, <application>Privoxy</application> will only allow
- access to sites that are specified in the trustfile. Sites can be listed
+ access to sites that are specified in the trustfile. Sites can be listed
in one of two ways:
</para>
<para>
- Prepending a <literal>~</literal> character limits access to this site
- only (and any sub-paths within this site), e.g.
+ Prepending a <literal>~</literal> character limits access to this site
+ only (and any sub-paths within this site), e.g.
<literal>~www.example.com</literal> allows access to
- <literal>~www.example.com/features/news.html</literal>, etc.
+ <literal>~www.example.com/features/news.html</literal>, etc.
</para>
<para>
Or, you can designate sites as <emphasis>trusted referrers</emphasis>, by
made.
</para>
<para>
- If you use the <literal>+</literal> operator in the trust file, it may grow
+ If you use the <literal>+</literal> operator in the trust file, it may grow
considerably over time.
</para>
<para>
<para>
Possible applications include limiting Internet access for children.
</para>
-
+
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
Note that you must have compiled <application>Privoxy</application> with
- support for this feature, otherwise this option has no effect.
+ support for this feature, otherwise this option has no effect.
</para>
</listitem>
</varlistentry>
</para>
<para>
Note that you must have compiled <application>Privoxy</application> with
- support for this feature, otherwise this option has no effect.
+ support for this feature, otherwise this option has no effect.
</para>
</listitem>
</varlistentry>
[<replaceable class="parameter">dst_addr</replaceable>[:<replaceable class="parameter">port</replaceable>][/<replaceable class="parameter">dst_masklen</replaceable>]]
</para>
<para>
- Where <replaceable class="parameter">src_addr</replaceable> and
+ Where <replaceable class="parameter">src_addr</replaceable> and
<replaceable class="parameter">dst_addr</replaceable> are IPv4 addresses in dotted decimal notation or valid
DNS names, <replaceable class="parameter">port</replaceable> is a port
number, and <replaceable class="parameter">src_masklen</replaceable> and
<para>
Access controls are included at the request of ISPs and systems
administrators, and <emphasis>are not usually needed by individual users</emphasis>.
- For a typical home user, it will normally suffice to ensure that
+ For a typical home user, it will normally suffice to ensure that
<application>Privoxy</application> only listens on the localhost
(127.0.0.1) or internal (home) network address by means of the
<link linkend="listen-address"><emphasis>listen-address</emphasis></link>
- option.
+ option.
</para>
<para>
Please see the warnings in the FAQ that <application>Privoxy</application>
<listitem>
<para>
For content filtering, i.e. the <literal>+filter</literal> and
- <literal>+deanimate-gif</literal> actions, it is necessary that
+ <literal>+deanimate-gif</literal> actions, it is necessary that
<application>Privoxy</application> buffers the entire document body.
This can be potentially dangerous, since a server could just keep sending
data indefinitely and wait for your RAM to exhaust -- with nasty consequences.
<replaceable class="parameter">http_parent</replaceable>[:<replaceable class="parameter">port</replaceable>]
</para>
<para>
- where <replaceable class="parameter">target_pattern</replaceable> is a <link linkend="af-patterns">URL pattern</link>
+ where <replaceable class="parameter">target_pattern</replaceable> is a <link linkend="af-patterns">URL pattern</link>
that specifies to which requests (i.e. URLs) this forward rule shall apply. Use <literal>/</literal> to
denote <quote>all URLs</quote>.
<replaceable class="parameter">http_parent</replaceable>[:<replaceable class="parameter">port</replaceable>]
and <replaceable class="parameter">socks_proxy</replaceable>
are IP addresses in dotted decimal notation or valid DNS names
(<replaceable class="parameter">http_parent</replaceable>
- may be <quote>.</quote> to denote <quote>no HTTP forwarding</quote>), and the optional
+ may be <quote>.</quote> to denote <quote>no HTTP forwarding</quote>), and the optional
<replaceable class="parameter">port</replaceable> parameters are TCP ports,
i.e. integer values from 1 to 65535
</para>
forward-socks4 / socks-gw.example.com:1080 .
</screen>
</para>
-
+
<para>
- To chain Privoxy and Tor, both running on the same system, you would use
+ To chain Privoxy and Tor, both running on the same system, you would use
something like:
</para>
<para>
<sect3 renderas="sect4" id="advanced-forwarding-examples"><title>Advanced Forwarding Examples</title>
<para>
- If you have links to multiple ISPs that provide various special content
+ If you have links to multiple ISPs that provide various special content
only to their subscribers, you can configure multiple <application>Privoxies</application>
which have connections to the respective ISPs to act as forwarders to each other, so that
<emphasis>your</emphasis> users can see the internal content of all ISPs.
</para>
<para>
- If you intend to chain <application>Privoxy</application> and
- <application>squid</application> locally, then chaining as
- <literal>browser -> squid -> privoxy</literal> is the recommended way.
+ If you intend to chain <application>Privoxy</application> and
+ <application>squid</application> locally, then chaining as
+ <literal>browser -> squid -> privoxy</literal> is the recommended way.
</para>
<para>
<para>
<screen>
- # Define Privoxy as parent proxy (without ICP)
- cache_peer 127.0.0.1 parent 8118 7 no-query
+ # Define Privoxy as parent proxy (without ICP)
+ cache_peer 127.0.0.1 parent 8118 7 no-query
- # Define ACL for protocol FTP
- acl ftp proto FTP
+ # Define ACL for protocol FTP
+ acl ftp proto FTP
# Do not forward FTP requests to Privoxy
- always_direct allow ftp
+ always_direct allow ftp
# Forward all the rest to Privoxy
never_direct allow all</screen>
<para>
<screen>
forward / .
- forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010</screen>
+ forward /.*\.(exe|com|dll|zip)$ antivir.example.com:8010</screen>
</para>
</sect3>
<term>Specifies:</term>
<listitem>
<para>
- How often Privoxy retries if a forwarded connection request fails.
+ How often Privoxy retries if a forwarded connection request fails.
</para>
</listitem>
</varlistentry>
If you don't trust your clients and want to force them
to use <application>Privoxy</application>, enable this
option and configure your packet filter to redirect outgoing
- HTTP connections into <application>Privoxy</application>.
+ HTTP connections into <application>Privoxy</application>.
</para>
<para>
Make sure that <application>Privoxy's</application> own requests
<![%user-man;[
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
<emphasis>activity-animation 1</emphasis>
</literallayout>
- </msgtext>
+ </msgtext>
</literal>
</para>
]]>
<![%user-man;[
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
<emphasis>log-messages 1</emphasis>
</literallayout>
- </msgtext>
+ </msgtext>
</literal>
</para>
]]>
<anchor id="log-buffer-size">
<![%config-file;[<para>@@</para>]]> <!-- for spacing -->
-<para>
+<para>
If <quote>log-buffer-size</quote> 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 limited to <quote>log-max-lines</quote> (see below).
<![%user-man;[
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
<emphasis>log-buffer-size 1</emphasis>
</literallayout>
- </msgtext>
+ </msgtext>
</literal>
</para>
]]>
<![%user-man;[
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
<emphasis>log-max-lines 200</emphasis>
</literallayout>
- </msgtext>
+ </msgtext>
</literal>
</para>
]]>
<![%user-man;[
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
<emphasis>log-highlight-messages 1</emphasis>
</literallayout>
- </msgtext>
+ </msgtext>
</literal>
</para>
]]>
<![%user-man;[
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
<emphasis>log-font-name Comic Sans MS</emphasis>
</literallayout>
- </msgtext>
+ </msgtext>
</literal>
</para>
]]>
<![%user-man;[
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
<emphasis>log-font-size 8</emphasis>
</literallayout>
- </msgtext>
+ </msgtext>
</literal>
</para>
]]>
<anchor id="show-on-task-bar">
<![%config-file;[<para>@@</para>]]> <!-- for spacing -->
-<para>
+<para>
<quote>show-on-task-bar</quote> controls whether or not
<application>Privoxy</application> will appear as a button on the Task bar
when minimized:
<![%user-man;[
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
<emphasis>show-on-task-bar 0</emphasis>
</literallayout>
- </msgtext>
+ </msgtext>
</literal>
</para>
]]>
<![%user-man;[
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
<emphasis>close-button-minimizes 1</emphasis>
</literallayout>
- </msgtext>
+ </msgtext>
</literal>
</para>
]]>
<![%user-man;[
<para>
<literal>
- <msgtext>
+ <msgtext>
<literallayout>
#<emphasis>hide-console</emphasis>
</literallayout>
- </msgtext>
+ </msgtext>
</literal>
</para>
]]>
Purpose : Manual Page
This file belongs into
ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
-
- $Id: privoxy-man-page.sgml,v 2.36 2010/11/06 12:55:48 fabiankeil Exp $
+
+ $Id: privoxy-man-page.sgml,v 2.37 2011/08/17 10:40:07 fabiankeil Exp $
Copyright (C) 2001-2009 Privoxy Developers http://www.privoxy.org/
See LICENSE.
========================================================================
- NOTE: Please read developer-manual/documentation.html before touching
- anything in this, or other Privoxy documentation.
+ NOTE: Please read developer-manual/documentation.html before touching
+ anything in this, or other Privoxy documentation.
========================================================================
Doc NOTES: This is some tricky markup! There are some quirks
to how this markup is handled. It is not always so co-operative.
- Please don't change the markup unless you can verify the changes
- will improve finished output!
-
+ Please don't change the markup unless you can verify the changes
+ will improve finished output!
+
literallayout tags are particularly sensitive to where they are placed.
The 'replaceable' and 'command' tags are used here somewhat unconventionally,
since it seems to generate the proper formatting (at least for me :).
Requires docbook2man (short perl script), see CVS
http://sources.redhat.com/docbook-tools/. Also requires openjade and SGMLSpm
- perl module.
-
+ perl module.
+
For man page references, see:
http://www.linuxdoc.org/HOWTO/mini/DocBook-Install/using.html
http://docbook.org/tdg/en/html/ch02.html#making-refentry
-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"[
-<!entity % dummy "IGNORE">
+<!entity % dummy "IGNORE">
<!entity p-intro SYSTEM "privoxy.sgml">
<!entity seealso SYSTEM "seealso.sgml">
<!entity copyright SYSTEM "copyright.sgml">
<date>2009-02-15</date>
</refentryinfo>
<refmeta>
- <refentrytitle>privoxy</refentrytitle>
+ <refentrytitle>privoxy</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo>
Privoxy &p-version;<![%p-not-stable;[ &p-status;]]>
</refnamediv>
<refsynopsisdiv>
- <cmdsynopsis>
+ <cmdsynopsis>
<command>privoxy</command>
<arg><option>--help</option></arg>
<arg><option>--version</option></arg>
<arg><option>--no-daemon</option></arg>
- <arg><option>--pidfile </option><replaceable class="parameter">pidfile</replaceable></arg>
- <arg><option>--user </option><replaceable class="parameter">user[.group]</replaceable></arg>
+ <arg><option>--pidfile </option><replaceable class="parameter">pidfile</replaceable></arg>
+ <arg><option>--user </option><replaceable class="parameter">user[.group]</replaceable></arg>
<arg><option>--chroot</option></arg>
- <arg><option>--pre-chroot-nslookup </option><replaceable class="parameter">hostname</replaceable></arg>
- <arg><replaceable class="parameter">configfile</replaceable></arg>
+ <arg><option>--pre-chroot-nslookup </option><replaceable class="parameter">hostname</replaceable></arg>
+ <arg><replaceable class="parameter">configfile</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
options:
</para>
- <variablelist>
+ <variablelist>
<varlistentry>
<term>--help</term>
<listitem>
<command>Privoxy</command> process that the directory tree starts
there. If set up carefully, this can limit the impact of possible
vulnerabilities in <command>Privoxy</command> to the files contained in
- that hierarchy.
+ that hierarchy.
</para>
</listitem>
</varlistentry>
If the <filename>configfile</filename> is not specified on the command line,
<command>Privoxy</command> will look for a file named
<filename>config</filename> in the current directory. If no
- <filename>configfile</filename> is found, <command>Privoxy</command> will
+ <filename>configfile</filename> is found, <command>Privoxy</command> will
fail to start.
</para>
filter to build an intercepting proxy
(see <filename>config</filename>). The default setting is for
localhost, on port 8118 (configurable in the main config file). To set the
- HTTP proxy in Firefox, go through: <command>Tools</command>;
+ HTTP proxy in Firefox, go through: <command>Tools</command>;
<command>Options</command>; <command>General</command>;
<command>Connection Settings</command>;
- <command>Manual Proxy Configuration</command>.
+ <command>Manual Proxy Configuration</command>.
</para>
<para>
- For Internet Explorer, go through: <command>Tools</command>;
+ For Internet Explorer, go through: <command>Tools</command>;
<command>Internet Properties</command>; <command>Connections</command>;
- <command>LAN Settings</command>.
+ <command>LAN Settings</command>.
</para>
<para>
The Secure (SSL) Proxy should also be set to the same values, otherwise
https: URLs will not be proxied. Note: <command>Privoxy</command> can only
proxy HTTP and HTTPS traffic. Do not try it with FTP or other protocols.
- HTTPS presents some limitations, and not all features will work with HTTPS
+ HTTPS presents some limitations, and not all features will work with HTTPS
connections.
</para>
<command>Privoxy</command> can be configured with the various configuration
files. The default configuration files are: <filename>config</filename>,
<filename>default.filter</filename>, <filename>default.action</filename> and
- <filename>default.action</filename>. <filename>user.action</filename> should
+ <filename>default.action</filename>. <filename>user.action</filename> should
be used for locally defined exceptions to the default rules in
<filename>match-all.action</filename> and <filename>default.action</filename>,
and <filename>user.filter</filename> for locally defined filters. These are
well commented. On Unix and Unix-like systems, these are located in
- <filename>/etc/privoxy/</filename> by default.
+ <filename>/etc/privoxy/</filename> by default.
</para>
-<para>
- <command>Privoxy</command> uses the concept of <command>actions</command>
+<para>
+ <command>Privoxy</command> uses the concept of <command>actions</command>
in order to manipulate the data stream between the browser and remote sites.
- There are various actions available with specific functions for such things
+ There are various actions available with specific functions for such things
as blocking web sites, managing cookies, etc. These actions can be invoked
- individually or combined, and used against individual URLs, or groups of URLs
+ individually or combined, and used against individual URLs, or groups of URLs
that can be defined using wildcards and regular expressions. The result is
that the user has greatly enhanced control and freedom.
</para>
<para>
The actions list (ad blocks, etc) can also be configured with your
- web browser at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
+ web browser at <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
(assuming the configuration allows it).
<command>Privoxy's</command> configuration parameters can also be viewed at
the same page. In addition, <command>Privoxy</command> can be toggled on/off.
<!-- ~~~~~ New section ~~~~~ -->
<refsect1><title>Files</title>
<!-- this is a cheesy way to do this, but WTF. -->
-<literallayout>
+<literallayout>
<filename>/usr/sbin/privoxy</filename>
<filename>/etc/privoxy/config</filename>
<filename>/etc/privoxy/match-all.action</filename>
<!-- command tag is used here to get proper looking format -->
<command>Privoxy</command> terminates on the <command>SIGINT</command>,
<command>SIGTERM</command> and <command>SIGABRT</command> signals. Log
- rotation scripts may cause a re-opening of the logfile by sending a
+ rotation scripts may cause a re-opening of the logfile by sending a
<command>SIGHUP</command> to <command>Privoxy</command>. Note that unlike
other daemons, <command>Privoxy</command> does not need to be made aware of
config file changes by <command>SIGHUP</command> -- it will detect them
- automatically.
+ automatically.
</para>
</refsect1>
File : $Source: /cvsroot/ijbswa/current/doc/source/privoxy.sgml,v $
Purpose : Entity included in other project documents.
-
- $Id: privoxy.sgml,v 2.10 2010/02/19 16:44:42 fabiankeil Exp $
+
+ $Id: privoxy.sgml,v 2.11 2011/08/18 11:42:50 fabiankeil Exp $
Copyright (C) 2001-2011 Privoxy Developers http://www.privoxy.org/
See LICENSE.
This file used for inclusion with other documents only.
======================================================================
- If you make changes to this file, please verify the finished
+ If you make changes to this file, please verify the finished
docs all display as intended.
This file is included into:
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
-<!entity % dummy "IGNORE">
+<!entity % dummy "IGNORE">
<!entity supported SYSTEM "supported.sgml">
<!entity p-intro SYSTEM "privoxy.sgml">
<!entity contacting SYSTEM "contacting.sgml">
File : $Source: /cvsroot/ijbswa/current/doc/source/readme.sgml,v $
Purpose : README for Privoxy
-
- $Id: readme.sgml,v 2.44 2011/08/17 10:40:07 fabiankeil Exp $
+
+ $Id: readme.sgml,v 2.45 2011/08/18 11:42:50 fabiankeil Exp $
Copyright (C) 2001-2011 Privoxy Developers http://www.privoxy.org/
See LICENSE.
========================================================================
- NOTE: Please read developer-manual/documentation.html before touching
+ NOTE: Please read developer-manual/documentation.html before touching
anything in this, or other Privoxy documentation. You have been warned!
- Failure to abide by this rule will result in the revocation of your license
+ Failure to abide by this rule will result in the revocation of your license
to live a peaceful existence!
========================================================================
===================================================================
- READ: Document Note: This file generates the README in the top level
- source directory. It is generated as only a plain text file. The
- current markup is not suitable for other formats. Build from
+ READ: Document Note: This file generates the README in the top level
+ source directory. It is generated as only a plain text file. The
+ current markup is not suitable for other formats. Build from
Makefile with 'make dok-readme'.
===================================================================
======================================================================
NOTE: The left margin spacing is *important* when using 'literallayout'
- WYSISWYG!!! Don't mess this up!!! Careful with linebreaks too, ie
+ WYSISWYG!!! Don't mess this up!!! Careful with linebreaks too, ie
the para tag forces a linebreak. Tags need to be carefully placed as a result
- to avoid extra blank lines, etc.
+ to avoid extra blank lines, etc.
======================================================================
- For stable releases, change
-
- entity % p-not-stable "INCLUDE"
-
- to
-
- entity % p-not-stable "IGNORE"
-
+ For stable releases, change
+
+ entity % p-not-stable "INCLUDE"
+
+ to
+
+ entity % p-not-stable "IGNORE"
+
in the DTD at the top. This will toggle various text 'off'. BOTH
- MUST be toggled in this case or you will get both text referencing
+ MUST be toggled in this case or you will get both text referencing
stable and unstable versions. You only want one or the other!
-->
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
* 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.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA
*
*********************************************************************/
<!-- ~~~~~ New section ~~~~~ -->
<sect1 id="install" ><title>INSTALL</title>
-<para>
+<para>
See the <filename>INSTALL</filename> file in this directory, for installing
from raw source, and the <citetitle>User Manual</citetitle>, for all other
- installation types.
+ installation types.
</para>
</sect1>
HOSTNAME ][config_file]
</para>
<para>
- See the man page or <citetitle>User Manual</citetitle> for an explanation of each option, and
+ See the man page or <citetitle>User Manual</citetitle> for an explanation of each option, and
other configuration and usage issues.
</para>
<para>
<sect1 id="documentation"><title>DOCUMENTATION</title>
<para>
There should be documentation in the 'doc' subdirectory<![%p-not-stable;[, but it
- may not be completed at this point]]>. In particular, see the
+ may not be completed at this point]]>. In particular, see the
<citetitle>User Manual</citetitle> there,
the <citetitle>FAQ</citetitle>, and those interested in Privoxy development, should look at
- <citetitle>developer-manual</citetitle>.
+ <citetitle>developer-manual</citetitle>.
</para>
<para>
<![%p-not-stable;[
may still be either comments in the source code, or the included
configuration files. ]]>The source and configuration files are all well
commented. The main configuration files are: 'config', 'default.action', and
- 'default.filter'<![%p-not-stable;[ in the top-level source directory]]>.
+ 'default.filter'<![%p-not-stable;[ in the top-level source directory]]>.
</para>
<para>
- Included documentation may vary according to platform and packager. All
- documentation is posted on http://www.privoxy.org, in case you don't have it,
+ Included documentation may vary according to platform and packager. All
+ documentation is posted on http://www.privoxy.org, in case you don't have it,
or can't find it.
</para>
</sect1>
<!-- </LiteralLayout> -->
<!-- </para> -->
<!-- <para> -->
-<!-- $Id: readme.sgml,v 2.44 2011/08/17 10:40:07 fabiankeil Exp $ -->
+<!-- $Id: readme.sgml,v 2.45 2011/08/18 11:42:50 fabiankeil Exp $ -->
<!-- </para> -->
</article>
File : $Source: /cvsroot/ijbswa/current/doc/source/seealso.sgml,v $
Purpose : Entity included in other project documents.
-
- $Id: seealso.sgml,v 2.11 2009/02/19 02:20:22 hal9 Exp $
+
+ $Id: seealso.sgml,v 2.12 2009/02/23 10:42:58 fabiankeil Exp $
Copyright (C) 2001-2009 Privoxy Developers http://www.privoxy.org/
See LICENSE.
This file used for inclusion with other documents only.
======================================================================
- If you make changes to this file, please verify the finished
+ If you make changes to this file, please verify the finished
docs all display as intended.
This file is included into:
faq
developer-manual
- NOTE: 04/05/02, HB Removed tags. They were causing docbook2man
+ NOTE: 04/05/02, HB Removed tags. They were causing docbook2man
to barf.
-->
<simplelist>
<member>
<ulink
- url="http://www.privoxy.org/">http://www.privoxy.org/</ulink>,
- the <application>Privoxy</application> Home page.
+ url="http://www.privoxy.org/">http://www.privoxy.org/</ulink>,
+ the <application>Privoxy</application> Home page.
</member>
</simplelist>
<simplelist>
<member>
<ulink
- url="http://www.privoxy.org/faq/">http://www.privoxy.org/faq/</ulink>,
- the <application>Privoxy</application> FAQ.
+ url="http://www.privoxy.org/faq/">http://www.privoxy.org/faq/</ulink>,
+ the <application>Privoxy</application> FAQ.
</member>
</simplelist>
<simplelist>
<member>
<ulink
- url="http://www.privoxy.org/developer-manual/">http://www.privoxy.org/developer-manual/</ulink>,
- the <application>Privoxy</application> developer manual.
+ url="http://www.privoxy.org/developer-manual/">http://www.privoxy.org/developer-manual/</ulink>,
+ the <application>Privoxy</application> developer manual.
</member>
</simplelist>
<simplelist>
<member>
- <ulink url="https://sourceforge.net/projects/ijbswa/">https://sourceforge.net/projects/ijbswa/</ulink>,
- the Project Page for <application>Privoxy</application> on
+ <ulink url="https://sourceforge.net/projects/ijbswa/">https://sourceforge.net/projects/ijbswa/</ulink>,
+ the Project Page for <application>Privoxy</application> on
<ulink url="http://sourceforge.net">SourceForge</ulink>.
</member>
</simplelist>
<simplelist>
<member>
<ulink url="https://sourceforge.net/tracker/?group_id=11118&atid=460288">https://sourceforge.net/tracker/?group_id=11118&atid=460288</ulink>, to submit <quote>misses</quote> and other
- configuration related suggestions to the developers.
+ configuration related suggestions to the developers.
</member>
</simplelist>
<![%seealso-extra;[
</simplelist>
<simplelist>
<member>
- <ulink url="https://www.torproject.org/">https://www.torproject.org/</ulink>,
- <application>Tor</application> can help anonymize web browsing,
+ <ulink url="https://www.torproject.org/">https://www.torproject.org/</ulink>,
+ <application>Tor</application> can help anonymize web browsing,
web publishing, instant messaging, IRC, SSH, and other applications.
</member>
</simplelist>
File : $Source: /cvsroot/ijbswa/current/doc/source/supported.sgml,v $
Purpose : Entity included in other project documents.
-
- $Id: supported.sgml,v 2.8 2007/10/30 17:49:04 fabiankeil Exp $
+
+ $Id: supported.sgml,v 2.9 2008/01/17 01:49:51 hal9 Exp $
Copyright (C) 2001-2008 Privoxy Developers http://www.privoxy.org/
See LICENSE.
This file used for inclusion with other documents only.
======================================================================
- If you make changes to this file, please verify the finished
+ If you make changes to this file, please verify the finished
docs all display as intended.
This file is included into:
<para>
But any operating system that runs TCP/IP, can conceivably take advantage of
<application>Privoxy</application> in a networked situation where
- <application>Privoxy</application> would run as a server on a LAN gateway.
+ <application>Privoxy</application> would run as a server on a LAN gateway.
Then only the <quote>gateway</quote> needs to be running one of the above
operating systems.
</para>
<para>
- Source code is freely available, so porting to other operating systems
+ Source code is freely available, so porting to other operating systems
is always a possibility.
</para>
]]>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
-<!entity % dummy "IGNORE">
+<!entity % dummy "IGNORE">
<!entity supported SYSTEM "supported.sgml">
<!entity newfeatures SYSTEM "newfeatures.sgml">
<!entity p-intro SYSTEM "privoxy.sgml">
This file belongs into
ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
- $Id: user-manual.sgml,v 2.133 2011/08/18 11:42:50 fabiankeil Exp $
+ $Id: user-manual.sgml,v 2.134 2011/08/18 11:45:02 fabiankeil Exp $
Copyright (C) 2001-2011 Privoxy Developers http://www.privoxy.org/
See LICENSE.
========================================================================
- NOTE: Please read developer-manual/documentation.html before touching
+ NOTE: Please read developer-manual/documentation.html before touching
anything in this, or other Privoxy documentation.
========================================================================
</subscript>
</pubdate>
-<pubdate>$Id: user-manual.sgml,v 2.133 2011/08/18 11:42:50 fabiankeil Exp $</pubdate>
+<pubdate>$Id: user-manual.sgml,v 2.134 2011/08/18 11:45:02 fabiankeil Exp $</pubdate>
<!--
<![%p-not-stable;[
<para>
Since this is a &p-status; version, not all new features are well tested. This
- documentation may be slightly out of sync as a result (especially with
+ documentation may be slightly out of sync as a result (especially with
CVS sources). And there <emphasis>may be</emphasis> bugs, though hopefully
- not many!
+ not many!
</para>
]]>
<!-- ~~~~~ New section ~~~~~ -->
<sect2 id="features"><title>Features</title>
<para>
- In addition to the core
- features of ad blocking and
+ In addition to the core
+ features of ad blocking and
<ulink url="http://en.wikipedia.org/wiki/Browser_cookie">cookie</ulink> management,
<application>Privoxy</application> provides many supplemental
- features<![%p-not-stable;[, some of them currently under development]]>,
+ features<![%p-not-stable;[, some of them currently under development]]>,
that give the end-user more control, more privacy and more freedom:
</para>
<!-- Include newfeatures.sgml boilerplate here: -->
</para>
<para>
- Note:
- On some platforms, the installer may remove previously installed versions, if
+ Note:
+ On some platforms, the installer may remove previously installed versions, if
found. (See below for your platform). In any case <emphasis>be sure to backup
your old configuration if it is valuable to you.</emphasis> See the <link
linkend="upgradersnote">note to upgraders</link> section below.
</para>
-<!-- ~~~~~ New section ~~~~~ -->
+<!-- ~~~~~ New section ~~~~~ -->
<sect2 id="installation-packages"><title>Binary Packages</title>
<para>
How to install the binary packages depends on your operating system:
<para>
RPMs can be installed with <literal>rpm -Uvh privoxy-&p-version;-1.rpm</literal>,
- and will use <filename>/etc/privoxy</filename> for the location
+ and will use <filename>/etc/privoxy</filename> for the location
of configuration files.
</para>
Note that on Red Hat, <application>Privoxy</application> will
<emphasis>not</emphasis> be automatically started on system boot. You will
need to enable that using <command>chkconfig</command>,
- <command>ntsysv</command>, or similar methods.
+ <command>ntsysv</command>, or similar methods.
</para>
<para>
- If you have problems with failed dependencies, try rebuilding the SRC RPM:
- <literal>rpm --rebuild privoxy-&p-version;-1.src.rpm</literal>. This
- will use your locally installed libraries and RPM version.
+ If you have problems with failed dependencies, try rebuilding the SRC RPM:
+ <literal>rpm --rebuild privoxy-&p-version;-1.src.rpm</literal>. This
+ will use your locally installed libraries and RPM version.
</para>
<para>
<sect3 id="installation-deb"><title>Debian and Ubuntu</title>
<para>
DEBs can be installed with <literal>apt-get install privoxy</literal>,
- and will use <filename>/etc/privoxy</filename> for the location of
+ and will use <filename>/etc/privoxy</filename> for the location of
configuration files.
</para>
</sect3>
<para>
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 <application>Privoxy</application> in.
+ in the same directory as you installed <application>Privoxy</application> in.
</para>
<para>
Version 3.0.5 beta introduced full <application>Windows</application> service
command: <command>services.msc</command>. If you do not take the manual step
of modifying <application>Privoxy's</application> service settings, it will
not start. Note too that you will need to give Privoxy a user account that
- actually exists, or it will not be permitted to
+ actually exists, or it will not be permitted to
write to its log and configuration files.
</para>
<para>
First, make sure that no previous installations of
- <application>Junkbuster</application> and / or
+ <application>Junkbuster</application> and / or
<application>Privoxy</application> are left on your
system. Check that no <application>Junkbuster</application>
or <application>Privoxy</application> objects are in
installation (in addition to every time your computer starts up). To
prevent the privoxy service from automatically starting when your
computer starts up, remove or rename the folder named
- <literal>/Library/StartupItems/Privoxy</literal>.
+ <literal>/Library/StartupItems/Privoxy</literal>.
</para>
<para>
To manually start or stop the privoxy service, use the Privoxy Utility
<!-- ~~~~~ New section ~~~~~ -->
<sect3 id="installation-amiga"><title>AmigaOS</title>
<para>
- Copy and then unpack the <filename>lha</filename> archive to a suitable location.
+ Copy and then unpack the <filename>lha</filename> archive to a suitable location.
All necessary files will be installed into <application>Privoxy</application>
- directory, including all configuration and log files. To uninstall, just
+ directory, including all configuration and log files. To uninstall, just
remove this directory.
</para>
</sect3>
<!-- ~~~~~ New section ~~~~~ -->
<sect3 id="installattion-gentoo"><title>Gentoo</title>
<para>
- Gentoo source packages (Ebuilds) for <application>Privoxy</application> are
- contained in the Gentoo Portage Tree (they are not on the download page,
- but there is a Gentoo section, where you can see when a new
+ Gentoo source packages (Ebuilds) for <application>Privoxy</application> are
+ contained in the Gentoo Portage Tree (they are not on the download page,
+ but there is a Gentoo section, where you can see when a new
<application>Privoxy</application> Version is added to the Portage Tree).
</para>
<para>
- Before installing <application>Privoxy</application> under Gentoo just do
- first <literal>emerge --sync</literal> to get the latest changes from the
- Portage tree. With <literal>emerge privoxy</literal> you install the latest
+ Before installing <application>Privoxy</application> under Gentoo just do
+ first <literal>emerge --sync</literal> to get the latest changes from the
+ Portage tree. With <literal>emerge privoxy</literal> you install the latest
version.
</para>
<para>
- Configuration files are in <filename>/etc/privoxy</filename>, the
+ Configuration files are in <filename>/etc/privoxy</filename>, the
documentation is in <filename>/usr/share/doc/privoxy-&p-version;</filename>
and the Log directory is in <filename>/var/log/privoxy</filename>.
</para>
<para>
The most convenient way to obtain the <application>Privoxy</application> sources
- is to download the source tarball from our
+ is to download the source tarball from our
<ulink url="http://sourceforge.net/project/showfiles.php?group_id=11118&package_id=10571">project download
page</ulink>.
</para>
If you like to live on the bleeding edge and are not afraid of using
possibly unstable development versions, you can check out the up-to-the-minute
version directly from <ulink url="http://sourceforge.net/cvs/?group_id=11118">the
- CVS repository</ulink>.
-<!--
+ CVS repository</ulink>.
+<!--
deprecated...out of business.
or simply download <ulink
url="http://cvs.sourceforge.net/cvstarballs/ijbswa-cvsroot.tar.bz2">the nightly CVS
<!-- end boilerplate -->
</sect2>
-<!-- ~~~~~ New section ~~~~~ -->
+<!-- ~~~~~ New section ~~~~~ -->
<sect2 id="installation-keepupdated"><title>Keeping your Installation Up-to-Date</title>
<para>
As user feedback comes in and development continues, we will make updated versions
<para>
In order not to lose your personal changes and adjustments when updating
to the latest <literal>default.action</literal> file we <emphasis>strongly
- recommend</emphasis> that you use <literal>user.action</literal> and
+ recommend</emphasis> that you use <literal>user.action</literal> and
<literal>user.filter</literal> for your local
customizations of <application>Privoxy</application>. See the <link
linkend="actions-file">Chapter on actions files</link> for details.
<title>Note to Upgraders</title>
<para>
- A quick list of things to be aware of before upgrading from earlier
+ A quick list of things to be aware of before upgrading from earlier
versions of <application>Privoxy</application>:
</para>
<listitem>
<para>
- The recommended way to upgrade &my-app; is to backup your old
+ The recommended way to upgrade &my-app; is to backup your old
configuration files, install the new ones, verify that &my-app;
is working correctly and finally merge back your changes using
<application>diff</application> and maybe <application>patch</application>.
</para>
</listitem>
<listitem>
- <para>
+ <para>
Note that some installers remove earlier versions completely,
including configuration files, therefore you should really save
any important configuration files!
</para>
</listitem>
<listitem>
- <para>
- On the other hand, other installers don't overwrite existing configuration
+ <para>
+ On the other hand, other installers don't overwrite existing configuration
files, thinking you will want to do that yourself.
</para>
</listitem>
<listitem>
- <para>
+ <para>
<filename>standard.action</filename> has been merged into
the <filename>default.action</filename> file.
</para>
<listitem>
<para>
- Three other config file settings are now off by default:
+ Three other config file settings are now off by default:
<link linkend="enable-remote-toggle">enable-remote-toggle</link>,
<link linkend="enable-remote-http-toggle">enable-remote-http-toggle</link>,
- and <link linkend="enable-edit-actions">enable-edit-actions</link>.
+ and <link linkend="enable-edit-actions">enable-edit-actions</link>.
If you use or want these, you will need to explicitly enable them, and
- be aware of the security issues involved.
+ be aware of the security issues involved.
</para>
</listitem>
<!--
<listitem>
- <para>
- What constitutes a <quote>default</quote> configuration has changed,
- and you may want to review which actions are <quote>on</quote> by
- default. This is primarily a matter of emphasis, but some features
+ <para>
+ What constitutes a <quote>default</quote> configuration has changed,
+ and you may want to review which actions are <quote>on</quote> by
+ default. This is primarily a matter of emphasis, but some features
you may have been used to, may now be <quote>off</quote> by default.
There are also a number of new actions and filters you may want to
consider, most of which are not fully incorporated into the default
Or if you use a number of filters, or filter many sites, you may just want
to turn off compression for all sites in
<filename>default.action</filename> (or
- <filename>user.action</filename>).
+ <filename>user.action</filename>).
</para>
</listitem>
<listitem>
<para>
- Also, <link linkend="SESSION-COOKIES-ONLY">session-cookies-only</link> is
- off by default now. If you've liked this feature in the past, you may want
+ Also, <link linkend="SESSION-COOKIES-ONLY">session-cookies-only</link> is
+ off by default now. If you've liked this feature in the past, you may want
to turn it back on in <filename>user.action</filename> now.
</para>
</listitem>
Some installers may not automatically start
<application>Privoxy</application> after installation.
</para>
- </listitem>
+ </listitem>
-->
</itemizedlist>
<para>
Install <application>Privoxy</application>. See the <link
linkend="installation">Installation Section</link> below for platform specific
- information.
+ information.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Advanced users and those who want to offer <application>Privoxy</application>
service to more than just their local machine should check the <link
linkend="config">main config file</link>, especially the <link
- linkend="access-control">security-relevant</link> options. These are
+ linkend="access-control">security-relevant</link> options. These are
off by default.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
HTTPS (SSL) <ulink url="http://en.wikipedia.org/wiki/Proxy_server">proxy</ulink>
by setting the proxy configuration for address of
<literal>127.0.0.1</literal> and port <literal>8118</literal>.
- <emphasis>DO NOT</emphasis> activate proxying for <literal>FTP</literal> or
+ <emphasis>DO NOT</emphasis> activate proxying for <literal>FTP</literal> or
any protocols besides HTTP and HTTPS (SSL) unless you intend to prevent your
browser from using these protocols.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Flush your browser's disk and memory caches, to remove any cached ad images.
- If using <application>Privoxy</application> to manage
+ If using <application>Privoxy</application> to manage
<ulink url="http://en.wikipedia.org/wiki/Browser_cookie">cookies</ulink>,
you should remove any currently stored cookies too.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- A default installation should provide a reasonable starting point for
+ 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
+ configuration, but that can be dealt with as the need arises. Little
to no initial configuration is required in most cases, you may want
to enable the
<ulink url="config.html#ENABLE-EDIT-ACTIONS">web-based action editor</ulink> though.
introduction to how <application>Privoxy</application> blocks ads and
banners.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Action</link></quote> has hints on how to understand and debug actions that
<quote>misbehave</quote>.
</para>
- </listitem>
+ </listitem>
<!--
Did anyone test these lately?
<link linkend="bookmarklets">Bookmarklets</link> into your browser's
personal toolbar.
</para>
- </listitem>
+ </listitem>
-->
<listitem>
<para>
Please see the section <link linkend="contact">Contacting the
Developers</link> on how to report bugs, problems with websites or to get
- help.
+ help.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Now enjoy surfing with enhanced control, comfort and privacy!
</para>
- </listitem>
+ </listitem>
</itemizedlist>
</para>
<sect2 id="quickstart-ad-blocking">
<title>Quickstart to Ad Blocking</title>
<!--
- NOTE: This section is deliberately redundant for those that don't
+ NOTE: This section is deliberately redundant for those that don't
want to read the whole thing (which is getting lengthy).
-->
<para>
Ad blocking is but one of <application>Privoxy's</application>
- array of features. Many of these features are for the technically minded advanced
+ array of features. Many of these features are for the technically minded advanced
user. But, ad and banner blocking is surely common ground for everybody.
</para>
-<para>
- This section will provide a quick summary of ad blocking so
+<para>
+ This section will provide a quick summary of ad blocking so
you can get up to speed quickly without having to read the more extensive
information provided below, though this is highly recommended.
</para>
<para>
First a bit of a warning ... blocking ads is much like blocking SPAM: the
- more aggressive you are about it, the more likely you are to block
- things that were not intended. And the more likely that some things
+ more aggressive you are about it, the more likely you are to block
+ things that were not intended. And the more likely that some things
may not work as intended. So there is a trade off here. If you want
extreme ad free browsing, be prepared to deal with more
<quote>problem</quote> sites, and to spend more time adjusting the
- configuration to solve these unintended consequences. In short, there is
- not an easy way to eliminate <emphasis>all</emphasis> ads. Either take
+ configuration to solve these unintended consequences. In short, there is
+ not an easy way to eliminate <emphasis>all</emphasis> ads. Either take
the easy way and settle for <emphasis>most</emphasis> ads blocked with the
default configuration, or jump in and tweak it for your personal surfing
habits and preferences.
</para>
<para>
Secondly, a brief explanation of <application>Privoxy's </application>
- <quote>actions</quote>. <quote>Actions</quote> in this context, are
+ <quote>actions</quote>. <quote>Actions</quote> in this context, are
the directives we use to tell <application>Privoxy</application> to perform
some task relating to HTTP transactions (i.e. web browsing). We tell
<application>Privoxy</application> to take some <quote>action</quote>. Each
</para>
<para>
Actions are specified in <application>Privoxy's</application> configuration,
- followed by one or more URLs to which the action should apply. URLs
+ followed by one or more URLs to which the action should apply. URLs
can actually be URL type <link linkend="af-patterns">patterns</link> that use
wildcards so they can apply potentially to a range of similar URLs. The
actions, together with the URL patterns are called a section.
<para>
The most important actions for basic ad blocking are: <literal><link
linkend="block">block</link></literal>, <literal><link
- linkend="handle-as-image">handle-as-image</link></literal>,
+ linkend="handle-as-image">handle-as-image</link></literal>,
<literal><link
linkend="handle-as-empty-document">handle-as-empty-document</link></literal>,and
<literal><link linkend="set-image-blocker">set-image-blocker</link></literal>:
<para>
<itemizedlist>
-
+
<listitem>
<para>
- <literal><link linkend="block">block</link></literal> - this is perhaps
+ <literal><link linkend="block">block</link></literal> - this is perhaps
the single most used action, and is particularly important for ad blocking.
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,
<application>Privoxy</application>'s own built-in BLOCKED page instead to
let you now what has happened (with some exceptions, see below).
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- <literal><link linkend="handle-as-image">handle-as-image</link></literal> -
+ <literal><link linkend="handle-as-image">handle-as-image</link></literal> -
tells <application>Privoxy</application> to treat this URL as an image.
<application>Privoxy</application>'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 blocking, since only if we know that it's an image of
- some kind, can we replace it with an image of our choosing, instead of the
+ some kind, can we replace it with an image of our choosing, instead of the
<application>Privoxy</application> BLOCKED page (which would only result in
a <quote>broken image</quote> icon). There are some limitations to this
though. For instance, you can't just brute-force an image substitution for
an entire HTML page in most situations.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- <literal><link linkend="handle-as-empty-document">handle-as-empty-document</link></literal> -
- sends an empty document instead of <application>Privoxy's</application>
- normal BLOCKED HTML page. This is useful for file types that are neither
+ <literal><link linkend="handle-as-empty-document">handle-as-empty-document</link></literal> -
+ sends an empty document instead of <application>Privoxy's</application>
+ normal BLOCKED HTML page. This is useful for file types that are neither
HTML nor images, such as blocking JavaScript files.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
</para>
<simplelist>
<member>
- <emphasis>pattern</emphasis> - a checkerboard pattern, so that an ad
+ <emphasis>pattern</emphasis> - a checkerboard pattern, so that an ad
replacement is obvious. This is the default.
</member>
</simplelist>
of the user's choosing (advanced usage).
</member>
</simplelist>
- </listitem>
+ </listitem>
</itemizedlist>
</para>
<para>
Advanced users will eventually want to explore &my-app;
- <literal><link linkend="filter">filters</link></literal> as well. Filters
+ <literal><link linkend="filter">filters</link></literal> as well. Filters
are very different from <literal><link
linkend="block">blocks</link></literal>.
A <quote>block</quote> blocks a site, page, or unwanted contented. Filters
The quickest way to adjust any of these settings is with your browser through
the special <application>Privoxy</application> editor at <ulink
url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
- (shortcut: <ulink url="http://p.p/">http://p.p/show-status</ulink>). This
+ (shortcut: <ulink url="http://p.p/">http://p.p/show-status</ulink>). This
is an internal page, and does not require Internet access.
</para>
<listitem>
<para>
- Right click on the ad image to be blocked, then select
+ Right click on the ad image to be blocked, then select
<quote><guimenuitem>Copy Link Location</guimenuitem></quote> from the
- pop-up menu.
+ pop-up menu.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Set your browser to
+ Set your browser to
<ulink
url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Find <filename>user.action</filename> in the top section, and click
+ Find <filename>user.action</filename> in the top section, and click
on <quote><guibutton>Edit</guibutton></quote>:
</para>
<mediaobject>
<imageobject>
<imagedata fileref="files-in-use.jpg" format="jpg">
- </imageobject>
+ </imageobject>
<textobject>
<phrase>[ Screenshot of Actions Files in Use ]</phrase>
</textobject>
</mediaobject>
</figure>
</para>
- </listitem>
-
+ </listitem>
+
<listitem>
<para>
You should have a section with only
- <literal><link linkend="block">block</link></literal> listed under
+ <literal><link linkend="block">block</link></literal> listed under
<quote>Actions:</quote>.
If not, click a <quote><guibutton>Insert new section below</guibutton></quote>
- button, and in the new section that just appeared, click the
+ button, and in the new section that just appeared, click the
<guibutton>Edit</guibutton> button right under the word <quote>Actions:</quote>.
This will bring up a list of all actions. Find
<literal><link linkend="block">block</link></literal> near the top, and click
in the <quote>Enabled</quote> column, then <quote><guibutton>Submit</guibutton></quote>
just below the list.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Now, in the <literal><link linkend="block">block</link></literal> actions section,
<quote><guibutton>Submit</guibutton></quote> (or
<quote><guibutton>OK</guibutton></quote> if in a pop-up window).
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Now go back to the original page, and press <keycap>SHIFT-Reload</keycap>
(or flush all browser caches). The image should be gone now.
</para>
- </listitem>
-
+ </listitem>
+
</itemizedlist>
</para>
<para>
- This is a very crude and simple example. There might be good reasons to use a
+ 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 <quote>patterns</quote>, and
+ site. For a more extensive explanation of <quote>patterns</quote>, and
the entire actions concept, see <link linkend="actions-file">the Actions
section</link>.
</para>
The ideas explained therein also apply to the web-based editor.
</para>
<para>
- There are also various
- <link linkend="filter">filters</link> that can be used for ad blocking
- (filters are a special subset of actions). These
+ There are also various
+ <link linkend="filter">filters</link> that can be used for ad blocking
+ (filters are a special subset of actions). These
fall into the <quote>advanced</quote> usage category, and are explained in
- depth in later sections.
+ depth in later sections.
</para>
</sect2>
<para>
Before launching <application>Privoxy</application> for the first time, you
will want to configure your browser(s) to use
- <application>Privoxy</application> as a HTTP and HTTPS (SSL)
+ <application>Privoxy</application> as a HTTP and HTTPS (SSL)
<ulink url="http://en.wikipedia.org/wiki/Proxy_server">proxy</ulink>. The default is
127.0.0.1 (or localhost) for the proxy address, and port 8118 (earlier versions
used port 8000). This is the one configuration step <emphasis>that must be done
</emphasis>!
</para>
<para>
- Please note that <application>Privoxy</application> can only proxy HTTP and
+ Please note that <application>Privoxy</application> can only proxy HTTP and
HTTPS traffic. It will not work with FTP or other protocols.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="proxy_setup.jpg" format="jpg">
- </imageobject>
+ </imageobject>
<textobject>
<phrase>[ Screenshot of Mozilla Proxy Configuration ]</phrase>
</textobject>
</mediaobject>
</figure>
</para>
-
-<para>
+
+<para>
With <application>Firefox</application>, this is typically set under:
</para>
-
+
<literallayout>
<guibutton>Tools</guibutton> -> <guibutton>Options</guibutton> -> <guibutton>Advanced</guibutton> -> <guibutton>Network</guibutton> -><guibutton>Connection</guibutton> -> <guibutton>Settings</guibutton>
</literallayout>
-<para>
+<para>
Or optionally on some platforms:
</para>
-
+
<literallayout>
<guibutton>Edit</guibutton> -> <guibutton>Preferences</guibutton> -> <guibutton>General</guibutton> -> <guibutton>Connection Settings</guibutton> -> <guibutton>Manual Proxy Configuration</guibutton>
</literallayout>
-<para>
+<para>
With <application>Netscape</application> (and
<application>Mozilla</application>), this can be set under:
</para>
</literallayout>
<para>
- For <application>Internet Explorer v.5-7</application>:
+ For <application>Internet Explorer v.5-7</application>:
</para>
<literallayout>
<mediaobject>
<imageobject>
<imagedata fileref="proxy2.jpg" format="jpg">
- </imageobject>
+ </imageobject>
<textobject>
<phrase>[ Screenshot of IE Proxy Configuration ]</phrase>
</textobject>
<para>
After doing this, flush your browser's disk and memory caches to force a
- re-reading of all pages and to get rid of any ads that may be cached. Remove
+ re-reading of all pages and to get rid of any ads that may be cached. Remove
any <ulink url="http://en.wikipedia.org/wiki/Browser_cookie">cookies</ulink>,
if you want <application>Privoxy</application> to manage that. You are now
ready to start enjoying the benefits of using
<para>
<application>Privoxy</application> can run with full Windows service functionality.
On Windows only, the &my-app; program has two new command line arguments
- to install and uninstall &my-app; as a service. See the
+ to install and uninstall &my-app; as a service. See the
<link linkend="installation-pack-win">Windows Installation
instructions</link> for details.
</para>
Start <application>Privoxy</application> (with RUN <>NIL:) in your
<filename>startnet</filename> script (AmiTCP), in
<filename>s:user-startup</filename> (RoadShow), as startup program in your
- startup script (Genesis), or as startup action (Miami and MiamiDx).
+ startup script (Genesis), or as startup action (Miami and MiamiDx).
<application>Privoxy</application> will automatically quit when you quit your
TCP/IP stack (just ignore the harmless warning your TCP/IP stack may display that
<application>Privoxy</application> is still running).
<sect2 id="start-gentoo">
<title>Gentoo</title>
<para>
- A script is again used. It will use the file <filename>/etc/privoxy/config
+ A script is again used. It will use the file <filename>/etc/privoxy/config
</filename> as its main configuration file.
</para>
<para>
</screen>
</para>
<para>
- Note that <application>Privoxy</application> is not automatically started at
- boot time by default. You can change this with the <literal>rc-update</literal>
+ Note that <application>Privoxy</application> is not automatically started at
+ boot time by default. You can change this with the <literal>rc-update</literal>
command.
</para>
-<para>
+<para>
<screen>
rc-update add privoxy default
</screen>
<ulink url="actions-file.html"><quote>actions</quote></ulink> files. These are
where various cookie actions are defined, ad and banner blocking, and other
aspects of <application>Privoxy</application> configuration. There are several
- such files included, with varying levels of aggressiveness.
+ such files included, with varying levels of aggressiveness.
</para>
<para>
sites is the popup-killing (through <ulink
url="actions-file.html#FILTER-POPUPS"><quote>+filter{popups}</quote></ulink>),
because your favorite shopping, banking, or leisure site may need
- popups (explained below).
+ popups (explained below).
</para>
<para>
</para>
<para>
- After running <application>Privoxy</application> for a while, you can
- start to fine tune the configuration to suit your personal, or site,
- preferences and requirements. There are many, many aspects that can
- be customized. <quote>Actions</quote>
- can be adjusted by pointing your browser to
+ After running <application>Privoxy</application> for a while, you can
+ start to fine tune the configuration to suit your personal, or site,
+ preferences and requirements. There are many, many aspects that can
+ be customized. <quote>Actions</quote>
+ can be adjusted by pointing your browser to
<ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
- (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
- and then follow the link to <quote>View & Change the Current Configuration</quote>.
+ (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
+ and then follow the link to <quote>View & Change the Current Configuration</quote>.
(This is an internal page and does not require Internet access.)
</para>
<para>
In fact, various aspects of <application>Privoxy</application>
- configuration can be viewed from this page, including
- current configuration parameters, source code version numbers,
- the browser's request headers, and <quote>actions</quote> that apply
- to a given URL. In addition to the actions file
- editor mentioned above, <application>Privoxy</application> can also
+ configuration can be viewed from this page, including
+ current configuration parameters, source code version numbers,
+ the browser's request headers, and <quote>actions</quote> that apply
+ to a given URL. In addition to the actions file
+ editor mentioned above, <application>Privoxy</application> can also
be turned <quote>on</quote> and <quote>off</quote> (toggled) from this page.
</para>
<para>
If you can't get rid of the problem at all, think you've found a bug in
- Privoxy, want to propose a new feature or smarter rules, please see the
+ Privoxy, want to propose a new feature or smarter rules, please see the
section <link linkend="contact"><quote>Contacting the
- Developers</quote></link> below.
+ Developers</quote></link> below.
</para>
-->
<para>
Print version info and exit. Unix only.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<emphasis>--help</emphasis>
<para>
Print short usage info and exit. Unix only.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<emphasis>--no-daemon</emphasis>
Don't become a daemon, i.e. don't fork and become process group
leader, and don't detach from controlling tty. Unix only.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<emphasis>--pidfile FILE</emphasis>
<emphasis>FILE</emphasis> is non-fatal. If no <emphasis>FILE</emphasis>
option is given, no PID file will be used. Unix only.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<emphasis>--user USER[.GROUP]</emphasis>
<emphasis>--chroot</emphasis>
</para>
<para>
- Before changing to the user ID given in the <emphasis>--user</emphasis> option,
+ Before changing to the user ID given in the <emphasis>--user</emphasis> option,
chroot to that user's home directory, i.e. make the kernel pretend to the &my-app;
- process that the directory tree starts there. If set up carefully, this can limit
+ process that the directory tree starts there. If set up carefully, this can limit
the impact of possible vulnerabilities in &my-app; to the files contained in that hierarchy.
Unix only.
</para>
<emphasis>configfile</emphasis>
</para>
<para>
- If no <emphasis>configfile</emphasis> is included on the command line,
- <application>Privoxy</application> will look for a file named
- <quote>config</quote> in the current directory (except on Win32
- where it will look for <quote>config.txt</quote> instead). Specify
- full path to avoid confusion. If no config file is found,
+ If no <emphasis>configfile</emphasis> is included on the command line,
+ <application>Privoxy</application> will look for a file named
+ <quote>config</quote> in the current directory (except on Win32
+ where it will look for <quote>config.txt</quote> instead). Specify
+ full path to avoid confusion. If no config file is found,
<application>Privoxy</application> will fail to start.
</para>
- </listitem>
+ </listitem>
</itemizedlist>
</para>
<para>
- On <application>MS Windows</application> only there are two additional
- command-line options to allow <application>Privoxy</application> to install and
- run as a <emphasis>service</emphasis>. See the
-<link linkend="installation-pack-win">Window Installation section</link>
+ On <application>MS Windows</application> only there are two additional
+ command-line options to allow <application>Privoxy</application> to install and
+ run as a <emphasis>service</emphasis>. See the
+<link linkend="installation-pack-win">Window Installation section</link>
for details.
</para>
<!-- ~~~~~ New section ~~~~~ -->
<sect1 id="configuration"><title>Privoxy Configuration</title>
<para>
- All <application>Privoxy</application> configuration is stored
+ All <application>Privoxy</application> configuration is stored
in text files. These files can be edited with a text editor.
- Many important aspects of <application>Privoxy</application> can
+ Many important aspects of <application>Privoxy</application> can
also be controlled easily with a web browser.
</para>
<sect2>
<title>Controlling Privoxy with Your Web Browser</title>
<para>
- <application>Privoxy</application>'s user interface can be reached through the special
+ <application>Privoxy</application>'s user interface can be reached through the special
URL <ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
- (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
+ (shortcut: <ulink url="http://p.p/">http://p.p/</ulink>),
which is a built-in page and works without Internet access.
You will see the following section:
cookie, and URL blocking magic is configured as well as other advanced features of
<application>Privoxy</application>. This is an easy way to adjust various
aspects of <application>Privoxy</application> configuration. The actions
- file, and other configuration files, are explained in detail below.
+ file, and other configuration files, are explained in detail below.
</para>
<para>
- <quote>Toggle Privoxy On or Off</quote> is handy for sites that might
+ <quote>Toggle Privoxy On or Off</quote> is handy for sites that might
have problems with your current actions and filters. You can in fact use
- it as a test to see whether it is <application>Privoxy</application>
- causing the problem or not. <application>Privoxy</application> continues
+ it as a test to see whether it is <application>Privoxy</application>
+ causing the problem or not. <application>Privoxy</application> continues
to run as a proxy in this case, but all manipulation is disabled, i.e.
<application>Privoxy</application> acts like a normal forwarding proxy. There
is even a toggle <link linkend="bookmarklets">Bookmarklet</link> offered, so
<para>
For Unix, *BSD and Linux, all configuration files are located in
<filename>/etc/privoxy/</filename> by default. For MS Windows, OS/2, and
- AmigaOS these are all in the same directory as the
+ AmigaOS these are all in the same directory as the
<application>Privoxy</application> executable. <![%p-not-stable;[ The name
and number of configuration files has changed from previous versions, and is
subject to change as development progresses.]]>
</para>
<para>
- The installed defaults provide a reasonable starting point, though
+ 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:
</para>
on Linux, Unix, BSD, OS/2, and AmigaOS and <filename>config.txt</filename>
on Windows. This is a required file.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
It should be the second actions file loaded and shouldn't be edited by the user.
</para>
<para>
- Multiple actions files may be defined in <filename>config</filename>. These
- are processed in the order they are defined. Local customizations and locally
+ Multiple actions files may be defined in <filename>config</filename>. These
+ are processed in the order they are defined. Local customizations and locally
preferred exceptions to the default policies as defined in
<filename>match-all.action</filename> (which you will most probably want
to define sooner or later) are best applied in <filename>user.action</filename>,
where you can preserve them across upgrades. The file isn't installed by all
installers, but you can easily create it yourself with a text editor.
</para>
- <para>
+ <para>
There is also a web based editor that can be accessed from
<ulink
url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
(Shortcut: <ulink
url="http://p.p/show-status">http://p.p/show-status</ulink>) for the
- various actions files.
+ various actions files.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
file</link>) 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.
- <filename>default.filter</filename> includes various filters made
- available for use by the developers. Some are much more intrusive than
- others, and all should be used with caution. You may define additional
- filter files in <filename>config</filename> as you can with
- actions files. We suggest <filename>user.filter</filename> for any
+ whether to apply them or not is up to the actions files.
+ <filename>default.filter</filename> includes various filters made
+ available for use by the developers. Some are much more intrusive than
+ others, and all should be used with caution. You may define additional
+ filter files in <filename>config</filename> as you can with
+ actions files. We suggest <filename>user.filter</filename> for any
locally defined filters or customizations.
</para>
- </listitem>
+ </listitem>
</itemizedlist>
</para>
</para>
<para>
- The actions files and filter files
+ The actions files and filter files
can use Perl style <link linkend="regex">regular expressions</link> for
- maximum flexibility.
+ maximum flexibility.
</para>
<para>
After making any changes, there is no need to restart
<application>Privoxy</application> in order for the changes to take
- effect. <application>Privoxy</application> detects such changes
+ effect. <application>Privoxy</application> detects such changes
automatically. Note, however, that it may take one or two additional
requests for the change to take effect. When changing the listening address
of <application>Privoxy</application>, these <quote>wake up</quote> requests
<![%p-not-stable;[
<para>
- 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 <quote>default</quote> setting, may change, so
+ 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 <quote>default</quote> setting, may change, so
please check all your configuration files on important issues.
</para>
]]>
The actions files are used to define what <emphasis>actions</emphasis>
<application>Privoxy</application> takes for which URLs, and thus determines
how ad images, cookies and various other aspects of HTTP content and
- transactions are handled, and on which sites (or even parts thereof).
+ transactions are handled, and on which sites (or even parts thereof).
There are a number of such actions, with a wide range of functionality.
Each action does something a little different.
- These actions give us a veritable arsenal of tools with which to exert
- our control, preferences and independence. Actions can be combined so that
+ These actions give us a veritable arsenal of tools with which to exert
+ our control, preferences and independence. Actions can be combined so that
their effects are aggregated when applied against a given set of URLs.
-</para>
+</para>
<para>
- There
+ There
are three action files included with <application>Privoxy</application> with
differing purposes:
</para>
content modification, cookie handling etc should be applied by default.
It should be the first actions file loaded
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<filename>default.action</filename> - defines many exceptions (both
work reasonably well as-is for most users. This file is only supposed to
be edited by the developers. It should be the second actions file loaded.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- <filename>user.action</filename> - is intended to be for local site
+ <filename>user.action</filename> - 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
+ has specific requirements, and need special handling, this kind of
thing should go here. This file will not be upgraded.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<guibutton>Edit</guibutton> <guibutton>Set to Cautious</guibutton> <guibutton>Set to Medium</guibutton> <guibutton>Set to Advanced</guibutton>
<para>
These have increasing levels of aggressiveness <emphasis>and have no
influence on your browsing unless you select them explicitly in the
- editor</emphasis>. A default installation should be pre-set to
+ editor</emphasis>. A default installation should be pre-set to
<literal>Cautious</literal>. New users should try this for a while before
- adjusting the settings to more aggressive levels. The more aggressive
- the settings, then the more likelihood there is of problems such as sites
+ adjusting the settings to more aggressive levels. The more aggressive
+ the settings, then the more likelihood there is of problems such as sites
not working as they should.
</para>
<para>
- The <guibutton>Edit</guibutton> button allows you to turn each
+ The <guibutton>Edit</guibutton> button allows you to turn each
action on/off individually for fine-tuning. The <guibutton>Cautious</guibutton>
- button changes the actions list to low/safe settings which will activate
+ button changes the actions list to low/safe settings which will activate
ad blocking and a minimal set of &my-app;'s features, and subsequently
there will be less of a chance for accidental problems. The
<guibutton>Medium</guibutton> button sets the list to a medium level of
<entry>blocks only</entry>
<entry>blocks only</entry>
</row>
-
+
<row>
<entry>Privacy Features</entry>
<entry>low</entry>
</table>
</para>
- </listitem>
+ </listitem>
</itemizedlist>
-</para>
+</para>
<para>
- The list of actions files to be used are defined in the main configuration
+ The list of actions files to be used are defined in the main configuration
file, and are processed in the order they are defined (e.g.
<filename>default.action</filename> is typically processed before
<filename>user.action</filename>). The content of these can all be viewed and
(defined in <filename>default.action</filename>),
followed by any exceptions (typically also in
<filename>default.action</filename>), which are then followed lastly by any
- local preferences (typically in <emphasis>user</emphasis><filename>.action</filename>).
+ local preferences (typically in <emphasis>user</emphasis><filename>.action</filename>).
Generally, <filename>user.action</filename> has the last word.
</para>
<link linkend="aliases">alias section</link> at the top of that file.
Then comes the default set of rules which will apply universally to all
sites and pages (be <emphasis>very careful</emphasis> with using such a
- universal set in <filename>user.action</filename> or any other actions file after
+ universal set in <filename>user.action</filename> or any other actions file after
<filename>default.action</filename>, because it will override the result
from consulting any previous file). And then below that,
exceptions to the defined universal policies. You can regard
personal settings across <application>Privoxy</application> upgrades easier.
</para>
-<para>
+<para>
Actions can be used to block anything you want, including ads, banners, or
just some obnoxious URL whose content you would rather not see. Cookies can be accepted
or rejected, or accepted only during the current browser session (i.e. not
Note that some <link linkend="actions">actions</link>, 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. And, things can always change, requiring
+ certainly a matter of personal taste. And, things can always change, requiring
refinements in the configuration. In general, it can be said that the more
<quote>aggressive</quote> your default settings (in the top section of the
actions file) are, the more exceptions for <quote>trusted</quote> sites you
like <quote>Cautious</quote>, <quote>Medium</quote> or
<quote>Advanced</quote>. Warning: the <quote>Advanced</quote> setting is more
aggressive, and will be more likely to cause problems for some sites.
- Experienced users only!
+ Experienced users only!
</para>
<para>
If you prefer plain text editing to GUIs, you can of course also directly edit the
the actions files with your favorite text editor. Look at
- <filename>default.action</filename> which is richly commented with many
+ <filename>default.action</filename> which is richly commented with many
good examples.
</para>
</sect2>
<para>
If multiple applying sections set the same action differently,
the last match wins. If not, the effects are aggregated.
- E.g. a URL might match a regular section with a heading line of <literal>{
+ E.g. a URL might match a regular section with a heading line of <literal>{
+<link linkend="handle-as-image">handle-as-image</link> }</literal>,
then later another one with just <literal>{
+<link linkend="block">block</link> }</literal>, resulting
- in <emphasis>both</emphasis> actions to apply. And there may well be
- cases where you will want to combine actions together. Such a section then
+ in <emphasis>both</emphasis> actions to apply. And there may well be
+ cases where you will want to combine actions together. Such a section then
might look like:
</para>
<!-- ~~~~~ New section ~~~~~ -->
<sect2 id="af-patterns">
<title>Patterns</title>
-<para>
+<para>
As mentioned, <application>Privoxy</application> uses <quote>patterns</quote>
to determine what <emphasis>actions</emphasis> might apply to which sites and
pages your browser attempts to access. These <quote>patterns</quote> use wild
flexibility. This allows one expression to be expanded and potentially match
against many similar patterns.
</para>
-
+
<para>
Generally, an URL pattern has the form
<literal><domain><port>/<path></literal>, where the
</para>
<para>
The pattern matching syntax is different for the domain and path parts of
- the URL. The domain part uses a simple globbing type matching technique,
- while the path part uses more flexible
+ the URL. The domain part uses a simple globbing type matching technique,
+ while the path part uses more flexible
<ulink url="http://en.wikipedia.org/wiki/Regular_expressions"><quote>Regular
Expressions</quote></ulink> (POSIX 1003.2).
</para>
<para>
is a domain-only pattern and will match any request to <literal>www.example.com</literal>,
regardless of which document on that server is requested. So ALL pages in
- this domain would be covered by the scope of this action. Note that a
+ this domain would be covered by the scope of this action. Note that a
simple <literal>example.com</literal> is different and would NOT match.
</para>
</listitem>
<listitem>
<para>
matches nothing, since it would be interpreted as a domain name and
- there is no top-level domain called <literal>.html</literal>. So its
+ there is no top-level domain called <literal>.html</literal>. So its
a mistake.
</para>
</listitem>
<para>
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.
+ domain starts or ends with a dot, it becomes unanchored at that end.
For example:
</para>
a domain.) This might be <literal>www.example.com</literal>,
<literal>news.example.de</literal>, or
<literal>www.example.net/cgi/testing.pl</literal> for instance. All these
- cases are matched.
+ cases are matched.
</para>
</listitem>
</varlistentry>
Additionally, there are wild-cards that you can use in the domain names
themselves. These work similarly to shell globbing type wild-cards:
<quote>*</quote> represents zero or more arbitrary characters (this is
- equivalent to the
+ equivalent to the
<ulink url="http://en.wikipedia.org/wiki/Regular_expressions"><quote>Regular
Expression</quote></ulink> based syntax of <quote>.*</quote>),
<quote>?</quote> represents any single character (this is equivalent to the
regular expression syntax of a simple <quote>.</quote>), and you can define
- <quote>character classes</quote> in square brackets which is similar to
+ <quote>character classes</quote> in square brackets which is similar to
the same regular expression technique. All of this can be freely mixed:
</para>
<term><literal>ad*.example.com</literal></term>
<listitem>
<para>
- matches <quote>adserver.example.com</quote>,
+ matches <quote>adserver.example.com</quote>,
<quote>ads.example.com</quote>, etc but not <quote>sfads.example.com</quote>
</para>
</listitem>
<listitem>
<para>
matches <literal>www.ipix.com</literal>,
- <literal>pictures.epix.com</literal>, <literal>a.b.c.d.e.upix.com</literal> etc.
+ <literal>pictures.epix.com</literal>, <literal>a.b.c.d.e.upix.com</literal> etc.
</para>
</listitem>
</varlistentry>
<term><literal>www[1-9a-ez].example.c*</literal></term>
<listitem>
<para>
- matches <literal>www1.example.com</literal>,
- <literal>www4.example.cc</literal>, <literal>wwwd.example.cy</literal>,
- <literal>wwwz.example.com</literal> etc., but <emphasis>not</emphasis>
+ matches <literal>www1.example.com</literal>,
+ <literal>www4.example.cc</literal>, <literal>wwwd.example.cy</literal>,
+ <literal>wwwz.example.com</literal> etc., but <emphasis>not</emphasis>
<literal>wwww.example.com</literal>.
</para>
</listitem>
<para>
Note that the path pattern is automatically left-anchored at the <quote>/</quote>,
- i.e. it matches as if it would start with a <quote>^</quote> (regular expression speak
+ i.e. it matches as if it would start with a <quote>^</quote> (regular expression speak
for the beginning of a line).
</para>
<para>
Please also note that matching in the path is <emphasis>CASE INSENSITIVE</emphasis>
- by default, but you can switch to case sensitive at any point in the pattern by using the
+ by default, but you can switch to case sensitive at any point in the pattern by using the
<quote>(?-i)</quote> switch: <literal>www.example.com/(?-i)PaTtErN.*</literal> will match
only documents whose path starts with <literal>PaTtErN</literal> in
<emphasis>exactly</emphasis> this capitalization.
<term><literal>.example.com/.*</literal></term>
<listitem>
<para>
- Is equivalent to just <quote>.example.com</quote>, since any documents
+ Is equivalent to just <quote>.example.com</quote>, since any documents
within that domain are matched with or without the <quote>.*</quote>
regular expression. This is redundant
</para>
named <quote>index.html</quote>, and that is part of some path. For
example, it matches <quote>www.example.com/testing/index.html</quote> but
NOT <quote>www.example.com/index.html</quote> because the regular
- expression called for at least two <quote>/'s</quote>, thus the path
- requirement. It also would match
- <quote>www.example.com/testing/index_html</quote>, because of the
+ expression called for at least two <quote>/'s</quote>, thus the path
+ requirement. It also would match
+ <quote>www.example.com/testing/index_html</quote>, because of the
special meta-character <quote>.</quote>.
</para>
</listitem>
<term><literal>.example.com/(.*/)?index\.html$</literal></term>
<listitem>
<para>
- This regular expression is conditional so it will match any page
- named <quote>index.html</quote> regardless of path which in this case can
- have one or more <quote>/'s</quote>. And this one must contain exactly
+ This regular expression is conditional so it will match any page
+ named <quote>index.html</quote> regardless of path which in this case can
+ have one or more <quote>/'s</quote>. And this one must contain exactly
<quote>.html</quote> (but does not have to end with that!).
</para>
</listitem>
<listitem>
<para>
This regular expression will match any path of <quote>example.com</quote>
- that contains any of the words <quote>ads</quote>, <quote>banner</quote>,
+ that contains any of the words <quote>ads</quote>, <quote>banner</quote>,
<quote>banners</quote> (because of the <quote>?</quote>) or <quote>junk</quote>.
The path does not have to end in these words, just contain them.
</para>
<term><literal>.example.com/(.*/)(ads|banners?|junk)/.*\.(jpe?g|gif|png)$</literal></term>
<listitem>
<para>
- This is very much the same as above, except now it must end in either
- <quote>.jpg</quote>, <quote>.jpeg</quote>, <quote>.gif</quote> or <quote>.png</quote>. So this
+ This is very much the same as above, except now it must end in either
+ <quote>.jpg</quote>, <quote>.jpeg</quote>, <quote>.gif</quote> or <quote>.png</quote>. So this
one is limited to common image formats.
</para>
</listitem>
</variablelist>
<para>
- There are many, many good examples to be found in <filename>default.action</filename>,
+ There are many, many good examples to be found in <filename>default.action</filename>,
and more tutorials below in <link linkend="regex">Appendix on regular expressions</link>.
</para>
</para>
-<para>
+<para>
Again, actions are invoked by placing them on a line, enclosed in curly braces and
- separated by whitespace, like in
+ separated by whitespace, like in
<literal>{+some-action -some-other-action{some-parameter}}</literal>,
followed by a list of URL patterns, one per line, to which they apply.
Together, the actions line and the following pattern lines make up a section
- of the actions file.
+ of the actions file.
</para>
-<para>
+<para>
Actions fall into three categories:
</para>
<para>
<itemizedlist>
<listitem>
- <para>
+ <para>
Boolean, i.e the action can only be <quote>enabled</quote> or
<quote>disabled</quote>. Syntax:
</para>
+<replaceable class="function">name</replaceable> # enable action <replaceable class="parameter">name</replaceable>
-<replaceable class="function">name</replaceable> # disable action <replaceable class="parameter">name</replaceable></screen>
</para>
- <para>
+ <para>
Example: <literal>+handle-as-image</literal>
</para>
</listitem>
<listitem>
- <para>
+ <para>
Parameterized, where some value is required in order to enable this type of action.
Syntax:
</para>
Note that if the URL matches multiple positive forms of a parameterized action,
the last match wins, i.e. the params from earlier matches are simply ignored.
</para>
- <para>
+ <para>
Example: <literal>+hide-user-agent{Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.4) Gecko/20070602 Firefox/2.0.0.4}</literal>
</para>
</listitem>
-
+
<listitem>
- <para>
+ <para>
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, <emphasis>all</emphasis> the parameters
# If it was the last one left, disable the action.
<replaceable class="parameter">-name</replaceable> # disable this action completely and remove all parameters from the list</screen>
</para>
- <para>
+ <para>
Examples: <literal>+add-header{X-Fun-Header: Some text}</literal> and
<literal>+filter{html-annoyances}</literal>
</para>
<para>
Later defined action sections always over-ride earlier ones of the same type.
- So exceptions to any rules you make, should come in the latter part of the file (or
- in a file that is processed later when using multiple actions files such
+ So exceptions to any rules you make, should come in the latter part of the file (or
+ in a file that is processed later when using multiple actions files such
as <filename>user.action</filename>). For multi-valued actions, the actions
are applied in the order they are specified. Actions files are processed in
the order they are defined in <filename>config</filename> (the default
<para>Multi-value.</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Parameter:</term>
<listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<para>
- 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
- <quote>HTTP headers</quote> are, you definitely don't need to worry about this
+ 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
+ <quote>HTTP headers</quote> are, you definitely don't need to worry about this
one.
</para>
<para>
the <literal><link
linkend="handle-as-image">handle-as-image</link></literal>,
<literal><link
- linkend="set-image-blocker">set-image-blocker</link></literal>, and
+ linkend="set-image-blocker">set-image-blocker</link></literal>, and
<literal><link
linkend="handle-as-empty-document">handle-as-empty-document</link></literal> actions.
-
+
</para>
</listitem>
</varlistentry>
<para>A block reason that should be given to the user.</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
to the blocked content (the latter only if the force feature is available and
enabled).
</para>
- <para>
- A very important exception occurs if <emphasis>both</emphasis>
+ <para>
+ A very important exception occurs if <emphasis>both</emphasis>
<literal>block</literal> and <literal><link linkend="handle-as-image">handle-as-image</link></literal>,
- apply to the same request: it will then be replaced by an image. If
+ apply to the same request: it will then be replaced by an image. If
<literal><link linkend="set-image-blocker">set-image-blocker</link></literal>
(see below) also applies, the type of image will be determined by its parameter,
if not, the standard checkerboard pattern is sent.
</para>
<para>
- It is important to understand this process, in order
- to understand how <application>Privoxy</application> deals with
- ads and other unwanted content. Blocking is a core feature, and one
+ It is important to understand this process, in order
+ to understand how <application>Privoxy</application> deals with
+ ads and other unwanted content. Blocking is a core feature, and one
upon which various other features depend.
</para>
<para>
# Block and replace with "blocked" page
.nasty-stuff.example.com
-{+block{Doubleclick banners.} +handle-as-image}
+{+block{Doubleclick banners.} +handle-as-image}
# Block and replace with image
.ad.doubleclick.net
.ads.r.us/banners/
-{+block{Layered ads.} +handle-as-empty-document}
+{+block{Layered ads.} +handle-as-empty-document}
# Block and then ignore
adserver.example.net/.*\.js$</screen>
</para>
</itemizedlist>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<para>
Client headers to which this action applies are filtered on-the-fly through
the specified regular expression based substitutions, the result is used as
- tag.
+ tag.
</para>
</listitem>
</varlistentry>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<term>Parameter:</term>
<listitem>
<para>
- Any string.
- </para>
+ Any string.
+ </para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
browser to decide what to do with the document. The value of this
header can cause the browser to open a download menu instead of
displaying the document by itself, even if the document's format is
- supported by the browser.
+ supported by the browser.
</para>
<para>
The declared content type can also affect which rendering mode
<quote>Content-Type: text/html</quote>, you can use &my-app;
to overwrite it with <quote>application/xml</quote> and validate
the web master's claim inside your XHTML-supporting browser.
- If the syntax is incorrect, the browser will complain loudly.
+ If the syntax is incorrect, the browser will complain loudly.
</para>
<para>
You can also go the opposite direction: if your browser prints
error messages instead of rendering a document falsely declared
as XHTML, you can overwrite the content type with
- <quote>text/html</quote> and have it rendered as broken HTML document.
+ <quote>text/html</quote> and have it rendered as broken HTML document.
</para>
<para>
By default <literal>content-type-overwrite</literal> only replaces
<para>
Of course you can apply <literal>content-type-overwrite</literal>
to a whole site and then make URL based exceptions, but it's a lot
- more work to get the same precision.
+ more work to get the same precision.
</para>
</listitem>
</varlistentry>
<listitem>
<para>
Any string.
- </para>
+ </para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<term>Example usage (section):</term>
<listitem>
<para>
- <screen># Block the non-existent "Privacy-Violation:" client header
+ <screen># Block the non-existent "Privacy-Violation:" client header
{ +crunch-client-header{Privacy-Violation:} }
/
</screen>
<listitem>
<para>
N/A
- </para>
+ </para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<para>
It makes <emphasis>no sense at all</emphasis> to use this action in conjunction
with the <literal><link linkend="session-cookies-only">session-cookies-only</link></literal> action,
- since it would prevent the session cookies from being set. See also
+ since it would prevent the session cookies from being set. See also
<literal><link linkend="filter-content-cookies">filter-content-cookies</link></literal>.
</para>
</listitem>
<listitem>
<para>
Any string.
- </para>
+ </para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<varlistentry>
<term>Notes:</term>
<listitem>
- <para>
+ <para>
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
<para>
This feature is currently not very smart and is scheduled for improvement.
If it is enabled by default, you will have to create some exceptions to
- this action. It can lead to failures in several ways:
+ this action. It can lead to failures in several ways:
</para>
<para>
Not every URLs with other URLs as parameters is evil.
<para>
<screen>
{ +fast-redirects{simple-check} }
- one.example.com
+ one.example.com
{ +fast-redirects{check-decoded-url} }
another.example.com/testing</screen>
<varlistentry>
<term>Typical use:</term>
<listitem>
- <para>Get rid of HTML and JavaScript annoyances, banner advertisements (by size),
+ <para>Get rid of HTML and JavaScript annoyances, banner advertisements (by size),
do fun text replacements, add personalized effects, etc.</para>
</listitem>
</varlistentry>
<para>Parameterized.</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Parameter:</term>
<listitem>
<para>
The name of a content filter, as defined in the <link linkend="filter-file">filter file</link>.
- Filters can be defined in one or more files as defined by the
+ Filters can be defined in one or more files as defined by the
<literal><link linkend="filterfile">filterfile</link></literal>
- option in the <link linkend="config">config file</link>.
- <filename>default.filter</filename> is the collection of filters
- supplied by the developers. Locally defined filters should go
+ option in the <link linkend="config">config file</link>.
+ <filename>default.filter</filename> is the collection of filters
+ supplied by the developers. Locally defined filters should go
in their own file, such as <filename>user.filter</filename>.
</para>
<para>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<para>
- For your convenience, there are a number of pre-defined filters available
+ 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.
</para>
</para>
<para>
<quote>Rolling your own</quote>
- filters requires a knowledge of
+ filters requires a knowledge of
<ulink url="http://en.wikipedia.org/wiki/Regular_expressions"><quote>Regular
- Expressions</quote></ulink> and
+ Expressions</quote></ulink> and
<ulink url="http://en.wikipedia.org/wiki/Html"><quote>HTML</quote></ulink>.
- This is very powerful feature, and potentially very intrusive.
+ This is very powerful feature, and potentially very intrusive.
Filters should be used with caution, and where an equivalent
<quote>action</quote> is not available.
</para>
<para>
- The amount of data that can be filtered is limited to the
+ The amount of data that can be filtered is limited to the
<literal><link linkend="buffer-limit">buffer-limit</link></literal>
- option in the main <link linkend="config">config file</link>. The
+ option in the main <link linkend="config">config file</link>. The
default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
- data, and all pending data, is passed through unfiltered.
+ data, and all pending data, is passed through unfiltered.
</para>
<para>
Inappropriate MIME types, such as zipped files, are not filtered at all.
action in conjunction with <literal>filter</literal>.
</para>
<para>
- Content filtering can achieve some of the same effects as the
+ Content filtering can achieve some of the same effects as the
<literal><link linkend="block">block</link></literal>
- action, i.e. it can be used to block ads and banners. But the mechanism
- works quite differently. One effective use, is to block ad banners
- based on their size (see below), since many of these seem to be somewhat
+ action, i.e. it can be used to block ads and banners. But the mechanism
+ works quite differently. One effective use, is to block ad banners
+ based on their size (see below), since many of these seem to be somewhat
standardized.
</para>
<para>
<varlistentry>
<term>Example usage (with filters from the distribution <filename>default.filter</filename> file).
- See <link linkend="PREDEFINED-FILTERS">the Predefined Filters section</link> for
+ See <link linkend="PREDEFINED-FILTERS">the Predefined Filters section</link> for
more explanation on each:</term>
<listitem>
<para>
<listitem>
<para>
Declares a document as text, even if the <quote>Content-Type:</quote> isn't detected as such.
- </para>
+ </para>
</listitem>
</varlistentry>
<literal>force-text-mode</literal> declares a document as text,
without looking at the <quote>Content-Type:</quote> first.
</para>
- <warning>
+ <warning>
<para>
Think twice before activating this action. Filtering binary data
with regular expressions can cause file damage.
</warning>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Example usage:</term>
<listitem>
<listitem>
<para>
Overrules the forward directives in the configuration file.
- </para>
+ </para>
</listitem>
</varlistentry>
file, but without the URL pattern. It can be used as replacement, but normally it's only
used in cases where matching based on the request URL isn't sufficient.
</para>
- <warning>
+ <warning>
<para>
Please read the description for the <link linkend="forwarding">forward</link> directives before
using this action. Forwarding to the wrong people will reduce your privacy and increase the
</warning>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Example usage:</term>
<listitem>
<listitem>
<para>
<screen># Block all documents on example.org that end with ".js",
-# but send an empty document instead of the usual HTML message.
+# but send an empty document instead of the usual HTML message.
{+block{Blocked JavaScript} +handle-as-empty-document}
example.org/.*\.js$
</screen>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<para>
The below generic example section is actually part of <filename>default.action</filename>.
It marks all URLs with well-known image file name extensions as images and should
- be left intact.
+ be left intact.
</para>
<para>
Users will probably only want to use the handle-as-image action in conjunction with
<listitem>
<para>
Keyword: <quote>block</quote>, or any user defined value.
- </para>
+ </para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
to a rare language, you should consider that it helps to
make your requests unique and thus easier to trace.
If you don't plan to change this header frequently,
- you should stick to a common language.
+ you should stick to a common language.
</para>
</listitem>
</varlistentry>
<listitem>
<para>
Keyword: <quote>block</quote>, or any user defined value.
- </para>
+ </para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<term>Effect:</term>
<listitem>
<para>
- Deletes the <quote>If-Modified-Since:</quote> HTTP client header or modifies its value.
+ Deletes the <quote>If-Modified-Since:</quote> HTTP client header or modifies its value.
</para>
</listitem>
</varlistentry>
<listitem>
<para>
Keyword: <quote>block</quote>, or a user defined value that specifies a range of hours.
- </para>
+ </para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<para>
- The keyword <quote>block</quote> will completely remove the header
+ The keyword <quote>block</quote> will completely remove the header
(not to be confused with the <literal><link linkend="block">block</link></literal>
action).
</para>
</itemizedlist>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
will work with referrer checks, as long as content and valid referring page
are on the same host. Most of the time that's the case.
</para>
- <para>
+ <para>
<literal>hide-referer</literal> is an alternate spelling of
<literal>hide-referrer</literal> and the two can be can be freely
substituted with each other. (<quote>referrer</quote> is the
correct English spelling, however the HTTP specification has a bug - it
- requires it to be spelled as <quote>referer</quote>.)
+ requires it to be spelled as <quote>referer</quote>.)
</para>
</listitem>
</varlistentry>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
- <warning>
+ <warning>
<para>
This can lead to problems on web sites that depend on looking at this header in
order to customize their content for different browsers (which, by the
way, is <emphasis>NOT</emphasis> the right thing to do: good web sites
- work browser-independently).
+ work browser-independently).
</para>
</warning>
<para>
<emphasis>not recommended</emphasis>. In single-user, single-browser
setups, you might use it to delete your OS version information from
the headers, because it is an invitation to exploit known bugs for your
- OS. It is also occasionally useful to forge this in order to access
- sites that won't let you in otherwise (though there may be a good
+ OS. It is also occasionally useful to forge this in order to access
+ sites that won't let you in otherwise (though there may be a good
reason in some cases).
</para>
<para>
- More information on known user-agent strings can be found at
+ More information on known user-agent strings can be found at
<ulink url="http://www.user-agents.org/">http://www.user-agents.org/</ulink>
- and
+ and
<ulink url="http://en.wikipedia.org/wiki/User_agent">http://en.wikipedia.org/wiki/User_agent</ulink>.
</para>
</listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<para>
Most text-based instances compress very well, the size is seldom decreased by less than 50%,
for markup-heavy instances like news feeds saving more than 90% of the original size isn't
- unusual.
+ unusual.
</para>
<para>
Not using compression will therefore slow down the transfer, and you should only
<term>Effect:</term>
<listitem>
<para>
- Deletes the <quote>Last-Modified:</quote> HTTP server header or modifies its value.
+ Deletes the <quote>Last-Modified:</quote> HTTP server header or modifies its value.
</para>
</listitem>
</varlistentry>
<para>
One of the keywords: <quote>block</quote>, <quote>reset-to-request-time</quote>
and <quote>randomize</quote>
- </para>
+ </para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
between the original value and the current time. In theory the server
could send each document with a different <quote>Last-Modified:</quote>
header to track visits without using cookies. <quote>Randomize</quote>
- makes it impossible and the browser can still revalidate cached documents.
+ makes it impossible and the browser can still revalidate cached documents.
</para>
<para>
<quote>reset-to-request-time</quote> overwrites the value of the
of the request, the random range becomes zero and the value stays the same.
Therefore you should later randomize it a second time with
<literal><link linkend="hide-if-modified-since">hided-if-modified-since</link></literal>,
- just to be sure.
+ just to be sure.
</para>
<para>
It is also recommended to use this action together with
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<listitem>
<para>
Allow only temporary <quote>session</quote> cookies (for the current
- browser session <emphasis>only</emphasis>).
+ browser session <emphasis>only</emphasis>).
</para>
</listitem>
</varlistentry>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>Notes:</term>
<listitem>
<para>
- This is less strict than <literal><link linkend="crunch-incoming-cookies">crunch-incoming-cookies</link></literal> /
+ This is less strict than <literal><link linkend="crunch-incoming-cookies">crunch-incoming-cookies</link></literal> /
<literal><link linkend="crunch-outgoing-cookies">crunch-outgoing-cookies</link></literal> and allows you to browse
websites that insist or rely on setting cookies, without compromising your privacy too badly.
</para>
Most browsers will not permanently store cookies that have been processed by
<literal>session-cookies-only</literal> and will forget about them between sessions.
This makes profiling cookies useless, but won't break sites which require cookies so
- that you can log in for transactions. This is generally turned on for all
+ that you can log in for transactions. This is generally turned on for all
sites, and is the recommended setting.
</para>
<para>
These would have to be removed manually.
</para>
<para>
- <application>Privoxy</application> also uses
- the <link linkend="filter-content-cookies">content-cookies filter</link>
- to block some types of cookies. Content cookies are not effected by
+ <application>Privoxy</application> also uses
+ the <link linkend="filter-content-cookies">content-cookies filter</link>
+ to block some types of cookies. Content cookies are not effected by
<literal>session-cookies-only</literal>.
</para>
</listitem>
<para>
<quote><replaceable class="parameter">target-url</replaceable></quote> to
send a redirect to <replaceable class="parameter">target-url</replaceable>. You can redirect
- to any image anywhere, even in your local filesystem via <quote>file:///</quote> URL.
+ to any image anywhere, even in your local filesystem via <quote>file:///</quote> URL.
(But note that not all browsers support redirecting to a local file system).
</para>
<para>
<title>Summary</title>
<para>
Note that many of these actions have the potential to cause a page to
- 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
+ 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 <link
linkend="ACTIONSANAT">Appendix</link> for a brief example on troubleshooting
These can in turn be invoked just like the built-in actions.
Currently, an alias name can contain any character except space, tab,
<quote>=</quote>,
- <quote>{</quote> and <quote>}</quote>, but we <emphasis>strongly
+ <quote>{</quote> and <quote>}</quote>, but we <emphasis>strongly
recommend</emphasis> that you only use <quote>a</quote> to <quote>z</quote>,
<quote>0</quote> to <quote>9</quote>, <quote>+</quote>, and <quote>-</quote>.
Alias names are not case sensitive, and are not required to start with a
</para>
<para>
- ...and put them to use. These sections would appear in the lower part of an
+ ...and put them to use. These sections would appear in the lower part of an
actions file and define exceptions to the default actions (as specified further
up for the <quote>/</quote> pattern):
</para>
# Shopping sites:
# Allow cookies (for setting and retrieving your customer data)
- #
+ #
{shop}
.quietpc.com
.worldpay.com # for quietpc.com
</para>
<para>
- Aliases like <quote>shop</quote> and <quote>fragile</quote> are typically used for
- <quote>problem</quote> sites that require more than one action to be disabled
+ Aliases like <quote>shop</quote> and <quote>fragile</quote> are typically used for
+ <quote>problem</quote> sites that require more than one action to be disabled
in order to function properly.
</para>
</sect2>
preceding the action name enables the action, a <quote>-</quote> disables!).
Also note how this long line has been made more readable by splitting it into
multiple lines with line continuation.
-</para>
+</para>
<para>
<screen>
require cookies to log in, and pop-up windows for shopping
carts or item details. Again, we'll use a pre-defined alias:
</para>
-
+
<para>
<screen>
# Shopping sites:
#
{ shop }
-.quietpc.com
+.quietpc.com
.worldpay.com # for quietpc.com
.jungle.com
.scan.co.uk</screen>
# Known ad generators:
#
{ +block-as-image }
-ar.atwola.com
+ar.atwola.com
.ad.doubleclick.net
.ad.*.doubleclick.net
.a.yimg.com/(?:(?!/i/).)*$
{ <link linkend="BLOCK">+block{Banner ads.}</link> }
# Generic patterns:
-#
+#
ad*.
.*ads.
banner?.
</para>
<para>
But being very generic, they necessarily also catch URLs that we don't want
- to block. The pattern <literal>.*ads.</literal> e.g. catches
+ to block. The pattern <literal>.*ads.</literal> e.g. catches
<quote>nasty-<emphasis>ads</emphasis>.nasty-corp.com</quote> as intended,
but also <quote>downlo<emphasis>ads</emphasis>.sourcefroge.net</quote> or
<quote><emphasis>ads</emphasis>l.some-provider.net.</quote> So here come some
##########################################################################
# By domain:
-#
+#
{ -<link linkend="BLOCK">block</link> }
adv[io]*. # (for advogato.org and advice.*)
adsl. # (has nothing to do with ads)
<para>
So far we are painting with a broad brush by setting general policies,
- which would be a reasonable starting point for many people. Now,
+ which would be a reasonable starting point for many people. Now,
you might want to be more specific and have customized rules that
are more suitable to your personal habits and preferences. These would
be for narrowly defined situations like your ISP or your bank, and should
- be placed in <filename>user.action</filename>, which is parsed after all other
+ be placed in <filename>user.action</filename>, which is parsed after all other
actions files and hence has the last word, over-riding any previously
- defined actions. <filename>user.action</filename> is also a
+ defined actions. <filename>user.action</filename> is also a
<emphasis>safe</emphasis> place for your personal settings, since
<filename>default.action</filename> is actively maintained by the
<application>Privoxy</application> developers and you'll probably want
<para>
So let's look at a few examples of things that one might typically do in
- <filename>user.action</filename>:
+ <filename>user.action</filename>:
</para>
# (Re-)define aliases for this file:
#
{{alias}}
-#
-# These aliases just save typing later, and the alias names should
+#
+# These aliases just save typing later, and the alias names should
# be self explanatory.
#
+crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
you don't want to have to log in manually each time. So you'd like
to allow persistent cookies for these sites. The
<literal>allow-all-cookies</literal> alias defined above does exactly
- that, i.e. it disables crunching of cookies in any direction, and the
+ that, i.e. it disables crunching of cookies in any direction, and the
processing of cookies to make them only temporary.
</para>
Example of a simple <link linkend="BLOCK">block</link> action. Say you've
seen an ad on your favourite page on example.com that you want to get rid of.
You have right-clicked the image, selected <quote>copy image location</quote>
- and pasted the URL below while removing the leading http://, into a
+ and pasted the URL below while removing the leading http://, into a
<literal>{ +block{} }</literal> section. Note that <literal>{ +handle-as-image
}</literal> need not be specified, since all URLs ending in
<literal>.gif</literal> will be tagged as images by the general rules as set
The URLs of dynamically generated banners, especially from large banner
farms, often don't use the well-known image file name extensions, which
makes it impossible for <application>Privoxy</application> to guess
- the file type just by looking at the URL.
+ the file type just by looking at the URL.
You can use the <literal>+block-as-image</literal> alias defined above for
these cases.
Note that objects which match this rule but then turn out NOT to be an
-- <emphasis>whoa!</emphasis> -- it worked. The <literal>fragile</literal>
aliases disables those actions that are most likely to break a site. Also,
good for testing purposes to see if it is <application>Privoxy</application>
- that is causing the problem or not. We later find other regular sites
+ that is causing the problem or not. We later find other regular sites
that misbehave, and add those to our personalized list of troublemakers:
</para>
{ allow-ads }
.sourceforge.net
.slashdot.org
- .osdn.net</screen>
+ .osdn.net</screen>
</para>
<para>
- Note that <literal>allow-ads</literal> has been aliased to
- <literal>-<link linkend="block">block</link></literal>,
- <literal>-<link linkend="filter-banners-by-size">filter{banners-by-size}</link></literal>, and
+ Note that <literal>allow-ads</literal> has been aliased to
+ <literal>-<link linkend="block">block</link></literal>,
+ <literal>-<link linkend="filter-banners-by-size">filter{banners-by-size}</link></literal>, and
<literal>-<link linkend="filter-banners-by-link">filter{banners-by-link}</link></literal> above.
</para>
<para>
Invoke another alias here to force an over-ride of the MIME type <literal>
- application/x-sh</literal> which typically would open a download type
+ application/x-sh</literal> which typically would open a download type
dialog. In my case, I want to look at the shell script, and then I can save
it should I choose to.
</para>
<para>
<screen>
{ handle-as-text }
- /.*\.sh$</screen>
+ /.*\.sh$</screen>
</para>
<para>
<para>
On-the-fly text substitutions need
- to be defined in a <quote>filter file</quote>. Once defined, they
+ to be defined in a <quote>filter file</quote>. Once defined, they
can then be invoked as an <quote>action</quote>.
</para>
<para>
Substitutions are made at the source level, so if you want to <quote>roll
- your own</quote> filters, you should first be familiar with HTML syntax,
+ your own</quote> filters, you should first be familiar with HTML syntax,
and, of course, regular expressions.
</para>
here. Each filter consists of a heading line, that starts with one of the
<emphasis>keywords</emphasis> <literal>FILTER:</literal>,
<literal>CLIENT-HEADER-FILTER:</literal> or <literal>SERVER-HEADER-FILTER:</literal>
- followed by the filter's <emphasis>name</emphasis>, and a short (one line)
+ followed by the filter's <emphasis>name</emphasis>, and a short (one line)
<emphasis>description</emphasis> of what it does. Below that line
come the <emphasis>jobs</emphasis>, i.e. lines that define the actual
text substitutions. By convention, the name of a filter
+<literal><link linkend="filter">filter</link>{<replaceable>name</replaceable>}</literal>
in any <link linkend="actions-file">actions file</link>.
</para>
-
+
<para>
Filter definitions start with a header line that contains the filter
type, the filter name and the filter description.
</para>
<para>
- If you are new to
+ If you are new to
<ulink url="http://en.wikipedia.org/wiki/Regular_expressions"><quote>Regular
Expressions</quote></ulink>, you might want to take a look at
the <link linkend="regex">Appendix on regular expressions</link>, and
see the <ulink url="http://perldoc.perl.org/perlre.html">Perl
manual</ulink> for
- <ulink url="http://perldoc.perl.org/perlop.html">the
+ <ulink url="http://perldoc.perl.org/perlop.html">the
<literal>s///</literal> operator's syntax</ulink> and <ulink
url="http://perldoc.perl.org/perlre.html">Perl-style regular
expressions</ulink> in general.
<para>
Now the pattern is deciphered, but wasn't this about substituting things? So
lets look at the substitute: <literal>$1"Not Your Business!"$2</literal> is
- easy to read: The text remembered as <literal>$1</literal>, followed by
+ easy to read: The text remembered as <literal>$1</literal>, followed by
<literal>"Not Your Business!"</literal> (<emphasis>including</emphasis>
the quotation marks!), followed by the text remembered as <literal>$2</literal>.
This produces an exact copy of the original string, with the middle part
Note that the <literal>i</literal> option makes the pattern matching
case-insensitive. Also note that ungreedy matching alone doesn't always guarantee
a minimal match: In the first parenthesis, we had to use <literal>[^>]*</literal>
- instead of <literal>.*</literal> to prevent the match from exceeding the
+ instead of <literal>.*</literal> to prevent the match from exceeding the
<body> tag if it doesn't contain <quote>OnUnload</quote>, but the page's
content does.
</para>
<para>
Note the <literal>(?!\.com)</literal> part (a so-called negative lookahead)
- in the job's pattern, which means: Don't match, if the string
+ in the job's pattern, which means: Don't match, if the string
<quote>.com</quote> appears directly following <quote>microsoft</quote>
in the page. This prevents links to microsoft.com from being trashed, while
still replacing the word everywhere else.
<para>
The <literal>x</literal> option in this job turns on extended syntax, and allows for
- e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting.
+ e.g. the liberal use of (non-interpreted!) whitespace for nicer formatting.
</para>
<para>
<sect2 id="predefined-filters"><title>The Pre-defined Filters</title>
-<!--
+<!--
Note each filter is also listed in the +filter action section above. Please
keep these listings in sync.
-
+
-->
<para>
</itemizedlist>
</para>
<para>
- Use with caution. This is an aggressive filter, and can break sites that
+ Use with caution. This is an aggressive filter, and can break sites that
rely heavily on JavaScript.
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><emphasis>js-events</emphasis></term>
<listitem>
This filter will undo many common instances of HTML based abuse.
</para>
<para>
- The <literal>BLINK</literal> and <literal>MARQUEE</literal> tags
+ The <literal>BLINK</literal> and <literal>MARQUEE</literal> tags
are neutralized (yeah baby!), and browser windows will be created as
resizeable (as of course they should be!), and will have location,
scroll and menu bars -- even if specified otherwise.
</para>
<para>
This filter disables most HTML and JavaScript code that reads or sets
- cookies. It cannot detect all clever uses of these types of code, so it
+ cookies. It cannot detect all clever uses of these types of code, so it
should not be relied on as an absolute fix. Use it wherever you would also
- use the cookie crunch actions.
+ use the cookie crunch actions.
</para>
</listitem>
</varlistentry>
<term><emphasis>refresh tags</emphasis></term>
<listitem>
<para>
- Disable any refresh tags if the interval is greater than nine seconds (so
- that redirections done via refresh tags are not destroyed). This is useful
+ Disable any refresh tags if the interval is greater than nine seconds (so
+ that redirections done via refresh tags are not destroyed). This is useful
for dial-on-demand setups, or for those who find this HTML feature
annoying.
</para>
<term><emphasis>unsolicited-popups</emphasis></term>
<listitem>
<para>
- This filter attempts to prevent only <quote>unsolicited</quote> pop-up
- windows from opening, yet still allow pop-up windows that the user
- has explicitly chosen to open. It was added in version 3.0.1,
+ This filter attempts to prevent only <quote>unsolicited</quote> pop-up
+ windows from opening, yet still allow pop-up windows that the user
+ has explicitly chosen to open. It was added in version 3.0.1,
as an improvement over earlier such filters.
</para>
<para>
</para>
<para>
This is recommended only for browsers that cannot perform this function
- reliably themselves. And be aware that some sites require such windows
+ reliably themselves. And be aware that some sites require such windows
in order to function normally. Use with caution.
</para>
</listitem>
<term><emphasis>banners-by-size</emphasis></term>
<listitem>
<para>
- This filter removes image tags purely based on what size they are. Fortunately
+ This filter removes image tags purely based on what size they are. Fortunately
for us, many ads and banner images tend to conform to certain standardized
sizes, which makes this filter quite effective for ad stripping purposes.
</para>
but just happen to be of one of the standard banner sizes.
</para>
<para>
- Recommended only for those who require extreme ad blocking. The default
+ Recommended only for those who require extreme ad blocking. The default
block rules should catch 95+% of all ads <emphasis>without</emphasis> this filter enabled.
</para>
</listitem>
<term><emphasis>banners-by-link</emphasis></term>
<listitem>
<para>
- This is an experimental filter that attempts to kill any banners if
+ This is an experimental filter that attempts to kill any banners if
their URLs seem to point to known or suspected click trackers. It is currently
not of much value and is not recommended for use by default.
</para>
<term><emphasis>webbugs</emphasis></term>
<listitem>
<para>
- Webbugs are small, invisible images (technically 1X1 GIF images), that
+ Webbugs are small, invisible images (technically 1X1 GIF images), that
are used to track users across websites, and collect information on them.
As an HTML page is loaded by the browser, an embedded image tag causes the
browser to contact a third-party site, disclosing the tracking information
<listitem>
<para>
A rather special-purpose filter that can be used to enlarge textareas (those
- multi-line text boxes in web forms) and turn off hard word wrap in them.
+ multi-line text boxes in web forms) and turn off hard word wrap in them.
It was written for the sourceforge.net tracker system where such boxes are
a nuisance, but it can be handy on other sites, too.
</para>
<para>
Many Microsoft products that generate HTML use non-standard extensions (read:
violations) of the ISO 8859-1 aka Latin-1 character set. This can cause those
- HTML documents to display with errors on standard-compliant platforms.
+ HTML documents to display with errors on standard-compliant platforms.
</para>
<para>
- This filter translates the MS-only characters into Latin-1 equivalents.
- It is not necessary when using MS products, and will cause corruption of
+ This filter translates the MS-only characters into Latin-1 equivalents.
+ It is not necessary when using MS products, and will cause corruption of
all documents that use 8-bit character sets other than Latin-1. It's mostly
worthwhile for Europeans on non-MS platforms, if weird garbage characters
- sometimes appear on some pages, or user agents that don't correct for this on
+ sometimes appear on some pages, or user agents that don't correct for this on
the fly.
<!--
My version of Mozilla (ancient) shows litte square boxes for quote
characters, and apostrophes on moronized pages. So many pages have this, I
can read them fine now. HB 08/27/06
--->
+-->
</para>
</listitem>
</varlistentry>
<listitem>
<para>
A filter for shockwave haters. As the name suggests, this filter strips code
- out of web pages that is used to embed shockwave flash objects.
+ out of web pages that is used to embed shockwave flash objects.
</para>
<para>
</para>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><emphasis>yahoo</emphasis></term>
<listitem>
<para>
- Another CSS based block, this time for Yahoo text ads. And removes
+ Another CSS based block, this time for Yahoo text ads. And removes
a width limitation as well.
</para>
</listitem>
<term><emphasis>msn</emphasis></term>
<listitem>
<para>
- Another CSS based block, this time for MSN text ads. And removes
+ Another CSS based block, this time for MSN text ads. And removes
tracking URLs, as well as a width limitation.
</para>
</listitem>
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><emphasis>html-to-xml</emphasis></term>
<listitem>
<sect1 id="templates">
<title>Privoxy's Template Files</title>
<para>
- All <application>Privoxy</application> built-in pages, i.e. error pages such as the
+ All <application>Privoxy</application> built-in pages, i.e. error pages such as the
<ulink url="http://show-the-404-error.page"><quote>404 - No Such Domain</quote>
error page</ulink>, the <ulink
url="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"><quote>BLOCKED</quote>
page</ulink>
and all pages of its <ulink url="http://config.privoxy.org/">web-based
- user interface</ulink>, are generated from <emphasis>templates</emphasis>.
+ user interface</ulink>, are generated from <emphasis>templates</emphasis>.
(<application>Privoxy</application> must be running for the above links to work as
intended.)
</para>
or exports), which <application>Privoxy</application> fills at run time. It
is possible to edit the templates with a normal text editor, should you want
to customize them. (<emphasis>Not recommended for the casual
- user</emphasis>). Should you create your own custom templates, you should use
+ user</emphasis>). Should you create your own custom templates, you should use
the <filename>config</filename> setting <link linkend="templdir">templdir</link>
to specify an alternate location, so your templates do not get overwritten
- during upgrades.
+ during upgrades.
</para>
<para>
Note that just like in configuration files, lines starting
expressions</quote> in its <link linkend="actions-file">actions
files</link> and <link linkend="filter-file">filter file</link>,
through the <ulink url="http://www.pcre.org/">PCRE</ulink> and
-<!--
+<!--
dead 08/27/06
<ulink url="http://www.oesterhelt.org/pcrs/">PCRS</ulink> libraries.
-->
<para>
To make a simple analogy, we do something similar when we use wild-card
- characters when listing files with the <command>dir</command> command in DOS.
+ characters when listing files with the <command>dir</command> command in DOS.
<literal>*.*</literal> matches all filenames. The <quote>special</quote>
character here is the asterisk which matches any and all characters. We can be
more specific and use <literal>?</literal> to match just individual
<para>
Regular expressions do essentially the same thing, but are much, much more
- powerful. There are many more <quote>special characters</quote> and ways of
+ powerful. There are many more <quote>special characters</quote> and ways of
building complex patterns however. Let's look at a few of the common ones,
and then some examples:
</para>
<para><simplelist>
<member>
<emphasis>\</emphasis> - The <quote>escape</quote> character denotes that
- the following character should be taken literally. This is used where one of the
+ the following character should be taken literally. This is used where one of the
special characters (e.g. <quote>.</quote>) needs to be taken literally and
- not as a special meta-character. Example: <quote>example\.com</quote>, makes
- sure the period is recognized only as a period (and not expanded to its
+ not as a special meta-character. Example: <quote>example\.com</quote>, makes
+ sure the period is recognized only as a period (and not expanded to its
meta-character meaning of any single character).
</member>
</simplelist></para>
<member>
<emphasis>[ ]</emphasis> - Characters enclosed in brackets will be matched if
any of the enclosed characters are encountered. For instance, <quote>[0-9]</quote>
- matches any numeric digit (zero through nine). As an example, we can combine
+ matches any numeric digit (zero through nine). As an example, we can combine
this with <quote>+</quote> to match any digit one of more times: <quote>[0-9]+</quote>.
</member>
</simplelist></para>
<emphasis>|</emphasis> - The <quote>bar</quote> character works like an
<quote>or</quote> conditional statement. A match is successful if the
sub-expression on either side of <quote>|</quote> matches. As an example:
- <quote>/(this|that) example/</quote> uses grouping and the bar character
+ <quote>/(this|that) example/</quote> uses grouping and the bar character
and would match either <quote>this example</quote> or <quote>that
example</quote>, and nothing else.
</member>
</simplelist></para>
<para>
- These are just some of the ones you are likely to use when matching URLs with
+ These are just some of the ones you are likely to use when matching URLs with
<application>Privoxy</application>, and is a long way from a definitive
list. This is enough to get us started with a few simple examples which may
be more illuminating:
<para>
<emphasis><literal>/.*/banners/.*</literal></emphasis> - A simple example
- that uses the common combination of <quote>.</quote> and <quote>*</quote> to
+ that uses the common combination of <quote>.</quote> and <quote>*</quote> to
denote any character, zero or more times. In other words, any string at all.
- So we start with a literal forward slash, then our regular expression pattern
+ So we start with a literal forward slash, then our regular expression pattern
(<quote>.*</quote>) another literal forward slash, the string
<quote>banners</quote>, another forward slash, and lastly another
- <quote>.*</quote>. We are building
+ <quote>.*</quote>. We are building
a directory path here. This will match any file with the path that has a
directory named <quote>banners</quote> in it. The <quote>.*</quote> matches
any characters, and this could conceivably be more forward slashes, so it
</para>
<para>
- <emphasis><literal>/.*/adv((er)?ts?|ertis(ing|ements?))?/</literal></emphasis> -
+ <emphasis><literal>/.*/adv((er)?ts?|ertis(ing|ements?))?/</literal></emphasis> -
We have several literal forward slashes again (<quote>/</quote>), so we are
- building another expression that is a file path statement. We have another
+ building another expression that is a file path statement. We have another
<quote>.*</quote>, so we are matching against any conceivable sub-path, just so
it matches our expression. The only true literal that <emphasis>must
match</emphasis> our pattern is <application>adv</application>, together with
the forward slashes. What comes after the <quote>adv</quote> string is the
- interesting part.
+ interesting part.
</para>
<para>
<quote>((er)?ts?|ertis(ing|ements?))</quote> is optional, as are the
individual sub-expressions: <quote>(er)</quote>,
<quote>(ing|ements?)</quote>, and the <quote>s</quote>. The <quote>|</quote>
- means <quote>or</quote>. We have two of those. For instance,
- <quote>(ing|ements?)</quote>, can expand to match either <quote>ing</quote>
+ means <quote>or</quote>. We have two of those. For instance,
+ <quote>(ing|ements?)</quote>, can expand to match either <quote>ing</quote>
<emphasis>OR</emphasis> <quote>ements?</quote>. What is being done here, is an
- attempt at matching as many variations of <quote>advertisement</quote>, and
+ attempt at matching as many variations of <quote>advertisement</quote>, and
similar, as possible. So this would expand to match just <quote>adv</quote>,
or <quote>advert</quote>, or <quote>adverts</quote>, or
<quote>advertising</quote>, or <quote>advertisement</quote>, or
- <quote>advertisements</quote>. You get the idea. But it would not match
+ <quote>advertisements</quote>. You get the idea. But it would not match
<quote>advertizements</quote> (with a <quote>z</quote>). We could fix that by
- changing our regular expression to:
+ changing our regular expression to:
<quote>/.*/adv((er)?ts?|erti(s|z)(ing|ements?))?/</quote>, which would then match
either spelling.
</para>
<para>
- <emphasis><literal>/.*/advert[0-9]+\.(gif|jpe?g)</literal></emphasis> - Again
- another path statement with forward slashes. Anything in the square brackets
+ <emphasis><literal>/.*/advert[0-9]+\.(gif|jpe?g)</literal></emphasis> - Again
+ another path statement with forward slashes. Anything in the square brackets
<quote>[ ]</quote> can be matched. This is using <quote>0-9</quote> as a
shorthand expression to mean any digit one through nine. It is the same as
saying <quote>0123456789</quote>. So any digit matches. The <quote>+</quote>
- means one or more of the preceding expression must be included. The preceding
- expression here is what is in the square brackets -- in this case, any digit
- one through nine. Then, at the end, we have a grouping: <quote>(gif|jpe?g)</quote>.
+ means one or more of the preceding expression must be included. The preceding
+ expression here is what is in the square brackets -- in this case, any digit
+ one through nine. Then, at the end, we have a grouping: <quote>(gif|jpe?g)</quote>.
This includes a <quote>|</quote>, so this needs to match the expression on
either side of that bar character also. A simple <quote>gif</quote> on one side, and the other
side will in turn match either <quote>jpeg</quote> or <quote>jpg</quote>,
</para>
<para>
- More reading on Perl Compatible Regular expressions:
+ More reading on Perl Compatible Regular expressions:
<ulink url="http://perldoc.perl.org/perlre.html">http://perldoc.perl.org/perlre.html</ulink>
</para>
<title>Privoxy's Internal Pages</title>
<para>
- Since <application>Privoxy</application> proxies each requested
- web page, it is easy for <application>Privoxy</application> to
+ Since <application>Privoxy</application> proxies each requested
+ web page, it is easy for <application>Privoxy</application> to
trap certain special URLs. In this way, we can talk directly to
- <application>Privoxy</application>, and see how it is
- configured, see how our rules are being applied, change these
+ <application>Privoxy</application>, and see how it is
+ configured, see how our rules are being applied, change these
rules and other configuration options, and even turn
- <application>Privoxy's</application> filtering off, all with
+ <application>Privoxy's</application> filtering off, all with
a web browser.
</para>
<para>
- The URLs listed below are the special ones that allow direct access
+ The URLs listed below are the special ones that allow direct access
to <application>Privoxy</application>. Of course,
- <application>Privoxy</application> must be running to access these. If
- not, you will get a friendly error message. Internet access is not
+ <application>Privoxy</application> must be running to access these. If
+ not, you will get a friendly error message. Internet access is not
necessary either.
</para>
<itemizedlist>
<listitem>
- <para>
- Privoxy main page:
+ <para>
+ Privoxy main page:
</para>
<blockquote>
- <para>
+ <para>
<ulink url="http://config.privoxy.org/">http://config.privoxy.org/</ulink>
</para>
</blockquote>
</listitem>
<listitem>
- <para>
- Show information about the current configuration, including viewing and
+ <para>
+ Show information about the current configuration, including viewing and
editing of actions files:
</para>
<blockquote>
- <para>
+ <para>
<ulink url="http://config.privoxy.org/show-status">http://config.privoxy.org/show-status</ulink>
</para>
</blockquote>
</listitem>
-
+
<listitem>
- <para>
+ <para>
Show the source code version numbers:
</para>
<blockquote>
- <para>
+ <para>
<ulink url="http://config.privoxy.org/show-version">http://config.privoxy.org/show-version</ulink>
</para>
</blockquote>
</listitem>
-
+
<listitem>
- <para>
+ <para>
Show the browser's request headers:
</para>
<blockquote>
- <para>
+ <para>
<ulink url="http://config.privoxy.org/show-request">http://config.privoxy.org/show-request</ulink>
</para>
</blockquote>
</listitem>
-
+
<listitem>
- <para>
+ <para>
Show which actions apply to a URL and why:
</para>
<blockquote>
- <para>
+ <para>
<ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
</para>
</blockquote>
</listitem>
-
+
<listitem>
- <para>
- Toggle Privoxy on or off. This feature can be turned off/on in the main
+ <para>
+ Toggle Privoxy on or off. This feature can be turned off/on in the main
<filename>config</filename> file. When toggled <quote>off</quote>, <quote>Privoxy</quote>
continues to run, but only as a pass-through proxy, with no actions taking
place:
</para>
<blockquote>
- <para>
+ <para>
<ulink url="http://config.privoxy.org/toggle">http://config.privoxy.org/toggle</ulink>
</para>
</blockquote>
<para>
- Short cuts. Turn off, then on:
+ Short cuts. Turn off, then on:
</para>
<blockquote>
- <para>
+ <para>
<ulink url="http://config.privoxy.org/toggle?set=disable">http://config.privoxy.org/toggle?set=disable</ulink>
</para>
</blockquote>
<blockquote>
- <para>
+ <para>
<ulink url="http://config.privoxy.org/toggle?set=enable">http://config.privoxy.org/toggle?set=enable</ulink>
</para>
</blockquote>
</listitem>
-
+
</itemizedlist>
</para>
the bookmark <quote>may not be safe</quote> - just click OK. Then you can run the
Bookmarklet directly from your favorites/bookmarks. For even faster access,
you can put them on the <quote>Links</quote> bar (IE) or the <quote>Personal
- Toolbar</quote> (Netscape), and run them with a single click.
+ Toolbar</quote> (Netscape), and run them with a single click.
</para>
<para>
<ulink
url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y&set=enabled','ijbstatus','width=250,height=100,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Enable</ulink>
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<ulink
url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y&set=disabled','ijbstatus','width=250,height=100,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Disable</ulink>
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<ulink
url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y&set=toggle','ijbstatus','width=250,height=100,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Toggle Privoxy</ulink> (Toggles between enabled and disabled)
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
<ulink
url="javascript:void(window.open('http://config.privoxy.org/toggle?mini=y','ijbstatus','width=250,height=2,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy- View Status</ulink>
</para>
- </listitem>
+ </listitem>
<!--
<listitem>
<para>
<ulink url="javascript:w=Math.floor(screen.width/2);h=Math.floor(screen.height*0.9);void(window.open('http://www.privoxy.org/actions/index.php?url='+escape(location.href),'Feedback','screenx='+w+',width='+w+',height='+h+',scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no').focus());">Privoxy - Submit Actions File Feedback</ulink>
</para>
- </listitem>
- -->
+ </listitem>
+ -->
<listitem>
<para>
<ulink url="javascript:void(window.open('http://config.privoxy.org/show-url-info?url='+escape(location.href),'Why').focus());">Privoxy - Why?</ulink>
</para>
- </listitem>
+ </listitem>
</itemizedlist>
</para>
<para>
Credit: The site which gave us the general idea for these bookmarklets is
<ulink url="http://www.bookmarklets.com/">www.bookmarklets.com</ulink>. They
- have more information about bookmarklets.
+ have more information about bookmarklets.
</para>
<sect2 id="chain">
<title>Chain of Events</title>
<para>
- Let's take a quick look at how some of <application>Privoxy's</application>
+ Let's take a quick look at how some of <application>Privoxy's</application>
core features are triggered, and the ensuing sequence of events when a web
page is requested by your browser:
</para>
<itemizedlist>
<listitem>
<para>
- First, your web browser requests a web page. The browser knows to send
- the request to <application>Privoxy</application>, which will in turn,
- relay the request to the remote web server after passing the following
- tests:
+ First, your web browser requests a web page. The browser knows to send
+ the request to <application>Privoxy</application>, which will in turn,
+ relay the request to the remote web server after passing the following
+ tests:
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- <application>Privoxy</application> traps any request for its own internal CGI
+ <application>Privoxy</application> traps any request for its own internal CGI
pages (e.g <ulink url="http://p.p/">http://p.p/</ulink>) and sends the CGI page back to the browser.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- Next, <application>Privoxy</application> checks to see if the URL
+ Next, <application>Privoxy</application> checks to see if the URL
matches any <link
linkend="BLOCK"><quote>+block</quote></link> patterns. If
so, the URL is then blocked, and the remote web server will not be contacted.
- <link linkend="HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></link>
- and
+ <link linkend="HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></link>
+ and
<link linkend="HANDLE-AS-EMPTY-DOCUMENT"><quote>+handle-as-empty-document</quote></link>
- are then checked, and if there is no match, an
+ are then checked, and if there is no match, an
HTML <quote>BLOCKED</quote> page is sent back to the browser. Otherwise, if
it does match, an image is returned for the former, and an empty text
document for the latter. The type of image would depend on the setting of
<link linkend="SET-IMAGE-BLOCKER"><quote>+set-image-blocker</quote></link>
(blank, checkerboard pattern, or an HTTP redirect to an image elsewhere).
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Untrusted URLs are blocked. If URLs are being added to the
<filename>trust</filename> file, then that is done.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
If the URL pattern matches the <link
linkend="FAST-REDIRECTS"><quote>+fast-redirects</quote></link> action,
it is then processed. Unwanted parts of the requested URL are stripped.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Now the rest of the client browser's request headers are processed. If any
etc.), headers are suppressed or forged as determined by these actions and
their parameters.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
Now the web server starts sending its response back (i.e. typically a web
page).
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
First, the server headers are read and processed to determine, among other
things, the MIME type (document type) and encoding. The headers are then
- filtered as determined by the
+ filtered as determined by the
<link linkend="CRUNCH-INCOMING-COOKIES"><quote>+crunch-incoming-cookies</quote></link>,
<link linkend="SESSION-COOKIES-ONLY"><quote>+session-cookies-only</quote></link>,
and <link linkend="DOWNGRADE-HTTP-VERSION"><quote>+downgrade-http-version</quote></link>
actions.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
If any <link linkend="FILTER"><quote>+filter</quote></link> action
they are specified in one of the filter files. Animated GIFs, if present,
are reduced to either the first or last frame, depending on the action
setting.The entire page, which is now filtered, is then sent by
- <application>Privoxy</application> back to your browser.
+ <application>Privoxy</application> back to your browser.
</para>
<para>
If neither a <link linkend="FILTER"><quote>+filter</quote></link> action
or <link
linkend="DEANIMATE-GIFS"><quote>+deanimate-gifs</quote></link>
- matches, then <application>Privoxy</application> passes the raw data through
+ matches, then <application>Privoxy</application> passes the raw data through
to the client browser as it becomes available.
</para>
- </listitem>
+ </listitem>
<listitem>
<para>
- As the browser receives the now (possibly filtered) page content, it
+ As the browser receives the now (possibly filtered) page content, it
reads and then requests any URLs that may be embedded within the page
source, e.g. ad images, stylesheets, JavaScript, other HTML documents (e.g.
frames), sounds, etc. For each of these objects, the browser issues a
separate request (this is easily viewable in <application>Privoxy's</application>
logs). And each such request is in turn processed just as above. Note that a
- complex web page will have many, many such embedded URLs. If these
- secondary requests are to a different server, then quite possibly a very
+ complex web page will have many, many such embedded URLs. If these
+ secondary requests are to a different server, then quite possibly a very
differing set of actions is triggered.
</para>
- </listitem>
-
+ </listitem>
+
</itemizedlist>
</para>
<para>
NOTE: This is somewhat of a simplistic overview of what happens with each URL
- request. For the sake of brevity and simplicity, we have focused on
+ request. For the sake of brevity and simplicity, we have focused on
<application>Privoxy's</application> core features only.
</para>
<title>Troubleshooting: Anatomy of an Action</title>
<para>
- The way <application>Privoxy</application> applies
+ The way <application>Privoxy</application> applies
<link linkend="ACTIONS">actions</link> and <link linkend="FILTER">filters</link>
to any given URL can be complex, and not always so
easy to understand what is happening. And sometimes we need to be able to
is causing us a problem inadvertently. It can be a little daunting to look at
the actions and filters files themselves, since they tend to be filled with
<link linkend="regex">regular expressions</link> whose consequences are not
- always so obvious.
+ always so obvious.
</para>
<para>
- One quick test to see if <application>Privoxy</application> is causing a problem
- or not, is to disable it temporarily. This should be the first troubleshooting
- step. See <link linkend="bookmarklets">the Bookmarklets</link> section on a quick
- and easy way to do this (be sure to flush caches afterward!). Looking at the
- logs is a good idea too. (Note that both the toggle feature and logging are
- enabled via <filename>config</filename> file settings, and may need to be
+ One quick test to see if <application>Privoxy</application> is causing a problem
+ or not, is to disable it temporarily. This should be the first troubleshooting
+ step. See <link linkend="bookmarklets">the Bookmarklets</link> section on a quick
+ and easy way to do this (be sure to flush caches afterward!). Looking at the
+ logs is a good idea too. (Note that both the toggle feature and logging are
+ enabled via <filename>config</filename> file settings, and may need to be
turned <quote>on</quote>.)
</para>
<para>
</para>
<para>
- <application>Privoxy</application> also provides the
+ <application>Privoxy</application> also provides the
<ulink url="http://config.privoxy.org/show-url-info">http://config.privoxy.org/show-url-info</ulink>
page that can show us very specifically how <application>actions</application>
are being applied to any given URL. This is a big help for troubleshooting.
<para>
First, enter one URL (or partial URL) at the prompt, and then
- <application>Privoxy</application> will tell us
+ <application>Privoxy</application> will tell us
how the current configuration will handle it. This will not
help with filtering effects (i.e. the <link
linkend="FILTER"><quote>+filter</quote></link> action) from
</para>
<para>
- Let's try an example, <ulink url="http://google.com">google.com</ulink>,
- and look at it one section at a time in a sample configuration (your real
+ Let's try an example, <ulink url="http://google.com">google.com</ulink>,
+ and look at it one section at a time in a sample configuration (your real
configuration may vary):
</para>
+session-cookies-only
+set-image-blocker {pattern}
/
-
+
{ -session-cookies-only }
.google.com
.google.com
In file: user.action <guibutton>[ View ]</guibutton> <guibutton>[ Edit ]</guibutton>
-(no matches in this file)
+(no matches in this file)
</screen>
</para>
<para>
- This is telling us how we have defined our
+ This is telling us how we have defined our
<link linkend="ACTIONS"><quote>actions</quote></link>, and
- which ones match for our test case, <quote>google.com</quote>.
+ which ones match for our test case, <quote>google.com</quote>.
Displayed is all the actions that are available to us. Remember,
the <literal>+</literal> sign denotes <quote>on</quote>. <literal>-</literal>
- denotes <quote>off</quote>. So some are <quote>on</quote> here, but many
+ denotes <quote>off</quote>. So some are <quote>on</quote> here, but many
are <quote>off</quote>. Each example we try may provide a slightly different
end result, depending on our configuration directives.
</para>
action, allowing this to take place unmolested. Note that there is a leading
dot here -- <quote>.google.com</quote>. This will match any hosts and
sub-domains, in the google.com domain also, such as
- <quote>www.google.com</quote> or <quote>mail.google.com</quote>. But it would not
+ <quote>www.google.com</quote> or <quote>mail.google.com</quote>. But it would not
match <quote>www.google.de</quote>! So, apparently, we have these two actions
defined as exceptions to the general rules at the top somewhere in the lower
part of our <filename>default.action</filename> file, and
<para>
Then, for our <filename>user.action</filename> file, we again have no hits.
So there is nothing google-specific that we might have added to our own, local
- configuration. If there was, those actions would over-rule any actions from
+ configuration. If there was, those actions would over-rule any actions from
previously processed files, such as <filename>default.action</filename>.
<filename>user.action</filename> typically has the last word. This is the
best place to put hard and fast exceptions,
<para>
And finally we pull it all together in the bottom section and summarize how
- <application>Privoxy</application> is applying all its <quote>actions</quote>
+ <application>Privoxy</application> is applying all its <quote>actions</quote>
to <quote>google.com</quote>:
</para>
<screen>
Final results:
-
+
-add-header
-block
- +change-x-forwarded-for{block}
+ +change-x-forwarded-for{block}
-client-header-filter{hide-tor-exit-notation}
-content-type-overwrite
-crunch-client-header
-prevent-compression
-redirect
-server-header-filter{xml-to-html}
- -server-header-filter{html-to-xml}
+ -server-header-filter{html-to-xml}
-session-cookies-only
+set-image-blocker {pattern} </screen>
</para>
<para>
- Notice the only difference here to the previous listing, is to
+ Notice the only difference here to the previous listing, is to
<quote>fast-redirects</quote> and <quote>session-cookies-only</quote>,
- which are activated specifically for this site in our configuration,
+ which are activated specifically for this site in our configuration,
and thus show in the <quote>Final Results</quote>.
</para>
</para>
<para>
- We'll just show the interesting part here - the explicit matches. It is
- matched three different times. Two <quote>+block{}</quote> sections,
+ We'll just show the interesting part here - the explicit matches. It is
+ matched three different times. Two <quote>+block{}</quote> sections,
and a <quote>+block{} +handle-as-image</quote>,
- which is the expanded form of one of our aliases that had been defined as:
+ which is the expanded form of one of our aliases that had been defined as:
<quote>+block-as-image</quote>. (<link
linkend="ALIASES"><quote>Aliases</quote></link> are defined in
- the first section of the actions file and typically used to combine more
+ the first section of the actions file and typically used to combine more
than one action.)
</para>
<para>
- Any one of these would have done the trick and blocked this as an unwanted
- image. This is unnecessarily redundant since the last case effectively
- would also cover the first. No point in taking chances with these guys
- though ;-) Note that if you want an ad or obnoxious
+ Any one of these would have done the trick and blocked this as an unwanted
+ image. This is unnecessarily redundant since the last case effectively
+ would also cover the first. No point in taking chances with these guys
+ though ;-) Note that if you want an ad or obnoxious
URL to be invisible, it should be defined as <quote>ad.doubleclick.net</quote>
is done here -- as both a <link
linkend="BLOCK"><quote>+block{}</quote></link>
- <emphasis>and</emphasis> an
+ <emphasis>and</emphasis> an
<link linkend="HANDLE-AS-IMAGE"><quote>+handle-as-image</quote></link>.
The custom alias <quote><literal>+block-as-image</literal></quote> just
simplifies the process and make it more readable.
In file: default.action <guibutton>[ View ]</guibutton> <guibutton>[ Edit ]</guibutton>
- {-add-header
+ {-add-header
-block
- +change-x-forwarded-for{block}
+ +change-x-forwarded-for{block}
-client-header-filter{hide-tor-exit-notation}
-content-type-overwrite
-crunch-client-header
-crunch-incoming-cookies
-crunch-outgoing-cookies
-crunch-server-header
- +deanimate-gifs
- -downgrade-http-version
+ +deanimate-gifs
+ -downgrade-http-version
+fast-redirects {check-decoded-url}
-filter {js-events}
-filter {content-cookies}
-filter {no-ping}
-force-text-mode
-handle-as-empty-document
- -handle-as-image
+ -handle-as-image
-hide-accept-language
- -hide-content-disposition
- +hide-from-header{block}
- +hide-referer{forge}
- -hide-user-agent
+ -hide-content-disposition
+ +hide-from-header{block}
+ +hide-referer{forge}
+ -hide-user-agent
-overwrite-last-modified
- +prevent-compression
+ +prevent-compression
-redirect
-server-header-filter{xml-to-html}
- -server-header-filter{html-to-xml}
- +session-cookies-only
+ -server-header-filter{html-to-xml}
+ +session-cookies-only
+set-image-blocker{blank} }
/
</para>
<para>
- Ooops, the <quote>/adsl/</quote> is matching <quote>/ads</quote> in our
+ Ooops, the <quote>/adsl/</quote> is matching <quote>/ads</quote> in our
configuration! But we did not want this at all! Now we see why we get the
- blank page. It is actually triggering two different actions here, and
- the effects are aggregated so that the URL is blocked, and &my-app; is told
+ blank page. It is actually triggering two different actions here, and
+ the effects are aggregated so that the URL is blocked, and &my-app; is told
to treat the block as if it were an image. But this is, of course, all wrong.
We could now add a new action below this (or better in our own
<filename>user.action</filename> file) that explicitly
</para>
<para>
- Now the page displays ;-)
+ Now the page displays ;-)
Remember to flush your browser's caches when making these kinds of changes to
your configuration to insure that you get a freshly delivered page! Or, try
using <literal>Shift+Reload</literal>.
</para>
<para>
- But now what about a situation where we get no explicit matches like
+ But now what about a situation where we get no explicit matches like
we did with:
</para>
<para>
That actually was very helpful and pointed us quickly to where the problem
- was. If you don't get this kind of match, then it means one of the default
+ was. If you don't get this kind of match, then it means one of the default
rules in the first section of <filename>default.action</filename> is causing
the problem. This would require some guesswork, and maybe a little trial and
error to isolate the offending rule. One likely cause would be one of the
</para>
<para>
- <quote><literal>{ shop }</literal></quote> is an <quote>alias</quote> that expands to
+ <quote><literal>{ shop }</literal></quote> is an <quote>alias</quote> that expands to
<quote><literal>{ -filter -session-cookies-only }</literal></quote>.
Or you could do your own exception to negate filtering:
This would turn off all filtering for these sites. This is best
put in <filename>user.action</filename>, for local site
exceptions. Note that when a simple domain pattern is used by itself (without
- the subsequent path portion), all sub-pages within that domain are included
+ the subsequent path portion), all sub-pages within that domain are included
automatically in the scope of the action.
</para>
<para>
- Images that are inexplicably being blocked, may well be hitting the
+ Images that are inexplicably being blocked, may well be hitting the
<link linkend="FILTER-BANNERS-BY-SIZE"><quote>+filter{banners-by-size}</quote></link>
- rule, which assumes
- that images of certain sizes are ad banners (works well
+ rule, which assumes
+ that images of certain sizes are ad banners (works well
<emphasis>most of the time</emphasis> since these tend to be standardized).
</para>
<para>
<quote><literal>{ fragile }</literal></quote> is an alias that disables most
actions that are the most likely to cause trouble. This can be used as a
- last resort for problem sites.
-</para>
+ last resort for problem sites.
+</para>
<para>
<screen>
mail.google.
mybank.example.com</screen>
</para>
-
+
<para>
- <emphasis>Remember to flush caches!</emphasis> Note that the
- <literal>mail.google</literal> reference lacks the TLD portion (e.g.
- <quote>.com</quote>). This will effectively match any TLD with
- <literal>google</literal> in it, such as <literal>mail.google.de.</literal>,
+ <emphasis>Remember to flush caches!</emphasis> Note that the
+ <literal>mail.google</literal> reference lacks the TLD portion (e.g.
+ <quote>.com</quote>). This will effectively match any TLD with
+ <literal>google</literal> in it, such as <literal>mail.google.de.</literal>,
just as an example.
</para>
-<para>
+<para>
If this still does not work, you will have to go through the remaining
actions one by one to find which one(s) is causing the problem.
</para>
<!--
- This program is free software; you can redistribute it
+ 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
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.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ or write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA
$Log: user-manual.sgml,v $
+ Revision 2.134 2011/08/18 11:45:02 fabiankeil
+ Don't use unspecified MSN sites as examples for User-Agent-based descrimination
+
+ Without knowing the URLs, nobody can easily verify it and it could
+ be mistaken as FUD. I also assume that it's no longer an issue anyway.
+
Revision 2.133 2011/08/18 11:42:50 fabiankeil
Bump some more documentation copyright ranges.
clarification.
Revision 1.111 2002/05/14 23:01:36 oes
- Fixing the fixes
+ Fixing the fixes
Revision 1.110 2002/05/14 19:10:45 oes
Restored alphabetical order of actions
-const char encode_rcs[] = "$Id: encode.c,v 1.16 2010/06/13 12:27:39 fabiankeil Exp $";
+const char encode_rcs[] = "$Id: encode.c,v 1.17 2010/09/09 21:00:25 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/encode.c,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
* Parameters :
* 1 : s = String to encode. Null-terminated.
*
- * Returns : Encoded string, newly allocated on the heap.
+ * Returns : Encoded string, newly allocated on the heap.
* Caller is responsible for freeing it with free().
* If s is NULL, or on out-of memory, returns NULL.
*
{
char * buf;
size_t buf_size;
-
+
if (s == NULL)
{
return NULL;
* Parameters :
* 1 : s = String to encode. Null-terminated.
*
- * Returns : Encoded string, newly allocated on the heap.
+ * Returns : Encoded string, newly allocated on the heap.
* Caller is responsible for freeing it with free().
* If s is NULL, or on out-of memory, returns NULL.
*
char * html_encode_and_free_original(char *s)
{
char * result;
-
+
if (s == NULL)
{
return NULL;
* Parameters :
* 1 : s = String to encode. Null-terminated.
*
- * Returns : Encoded string, newly allocated on the heap.
+ * Returns : Encoded string, newly allocated on the heap.
* Caller is responsible for freeing it with free().
* If s is NULL, or on out-of memory, returns NULL.
*
{
return(d - '0');
}
- else if ((d >= 'a') && (d <= 'f'))
+ else if ((d >= 'a') && (d <= 'f'))
{
return(d - 'a' + 10);
}
* Parameters :
* 1 : s = String to decode. Null-terminated.
*
- * Returns : Decoded string, newly allocated on the heap.
+ * Returns : Decoded string, newly allocated on the heap.
* Caller is responsible for freeing it with free().
*
*********************************************************************/
#ifndef ENCODE_H_INCLUDED
#define ENCODE_H_INCLUDED
-#define ENCODE_H_VERSION "$Id: encode.h,v 1.9 2008/05/21 15:38:13 fabiankeil Exp $"
+#define ENCODE_H_VERSION "$Id: encode.h,v 1.10 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/encode.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char errlog_rcs[] = "$Id: errlog.c,v 1.110 2010/07/26 12:11:51 fabiankeil Exp $";
+const char errlog_rcs[] = "$Id: errlog.c,v 1.111 2011/06/25 12:39:18 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.c,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
#else /* ! MUTEX_LOCKS_AVAILABLE */
/*
* FIXME we need a cross-platform locking mechanism.
- * The locking/unlocking functions below should be
+ * The locking/unlocking functions below should be
* fleshed out for non-pthread implementations.
- */
+ */
static inline void lock_logfile() {}
static inline void unlock_logfile() {}
static inline void lock_loginit() {}
*
* Function : fatal_error
*
- * Description : Displays a fatal error to standard error (or, on
+ * Description : Displays a fatal error to standard error (or, on
* a WIN32 GUI, to a dialog box), and exits Privoxy
* with status code 1.
*
/* Shouldn't happen but ... */
box_message = error_message;
}
- MessageBox(g_hwndLogFrame, box_message, "Privoxy Error",
- MB_OK | MB_ICONERROR | MB_TASKMODAL | MB_SETFOREGROUND | MB_TOPMOST);
+ MessageBox(g_hwndLogFrame, box_message, "Privoxy Error",
+ MB_OK | MB_ICONERROR | MB_TASKMODAL | MB_SETFOREGROUND | MB_TOPMOST);
/* Cleanup - remove taskbar icon etc. */
TermLogWindow();
* XXX: we should only use the LOG_LEVEL_MINIMUM
* until the first time the configuration file has
* been parsed.
- *
+ *
* Parameters : 1: debug_level = The debug level to set.
*
* Returns : Nothing.
* Function : disable_logging
*
* Description : Disables logging.
- *
+ *
* Parameters : None.
*
* Returns : Nothing.
* Description : Returns a number that is different for each thread.
*
* XXX: Should be moved elsewhere (miscutil.c?)
- *
+ *
* Parameters : None
*
* Returns : thread_id
static inline size_t get_log_timestamp(char *buffer, size_t buffer_size)
{
size_t length;
- time_t now;
+ time_t now;
struct tm tm_now;
struct timeval tv_now; /* XXX: stupid name */
long msecs;
tm_now = *localtime_r(&now, &tm_now);
#elif defined(MUTEX_LOCKS_AVAILABLE)
privoxy_mutex_lock(&localtime_mutex);
- tm_now = *localtime(&now);
+ tm_now = *localtime(&now);
privoxy_mutex_unlock(&localtime_mutex);
#else
- tm_now = *localtime(&now);
+ tm_now = *localtime(&now);
#endif
length = strftime(buffer, buffer_size, "%Y-%m-%d %H:%M:%S", &tm_now);
if (length > (size_t)0)
{
- msecs_length = snprintf(buffer+length, buffer_size - length, ".%.3ld", msecs);
+ msecs_length = snprintf(buffer+length, buffer_size - length, ".%.3ld", msecs);
}
if (msecs_length > 0)
{
* the %z field in strftime()
*/
time_t now;
- struct tm *tm_now;
+ struct tm *tm_now;
struct tm gmt;
#ifdef HAVE_LOCALTIME_R
struct tm dummy;
size_t length;
int tz_length = 0;
- time (&now);
+ time (&now);
#ifdef HAVE_GMTIME_R
gmt = *gmtime_r(&now, &gmt);
#elif defined(MUTEX_LOCKS_AVAILABLE)
tm_now = localtime_r(&now, &dummy);
#elif defined(MUTEX_LOCKS_AVAILABLE)
privoxy_mutex_lock(&localtime_mutex);
- tm_now = localtime(&now);
+ tm_now = localtime(&now);
privoxy_mutex_unlock(&localtime_mutex);
#else
- tm_now = localtime(&now);
+ tm_now = localtime(&now);
#endif
- days = tm_now->tm_yday - gmt.tm_yday;
- hrs = ((days < -1 ? 24 : 1 < days ? -24 : days * 24) + tm_now->tm_hour - gmt.tm_hour);
- mins = hrs * 60 + tm_now->tm_min - gmt.tm_min;
+ days = tm_now->tm_yday - gmt.tm_yday;
+ hrs = ((days < -1 ? 24 : 1 < days ? -24 : days * 24) + tm_now->tm_hour - gmt.tm_hour);
+ mins = hrs * 60 + tm_now->tm_min - gmt.tm_min;
length = strftime(buffer, buffer_size, "%d/%b/%Y:%H:%M:%S ", tm_now);
*
* Description : Translates a numerical loglevel into a string.
*
- * Parameters :
+ * Parameters :
* 1 : loglevel = LOG_LEVEL_FOO
*
* Returns : Log level string.
/* protect the whole function because of the static buffer (outbuf) */
lock_logfile();
- if (NULL == outbuf_save)
+ if (NULL == outbuf_save)
{
outbuf_save = (char*)zalloc(log_buffer_size + 1); /* +1 for paranoia */
if (NULL == outbuf_save)
format_string = strerror(ival);
}
#else /* ifndef _WIN32 */
- ival = errno;
+ ival = errno;
#ifdef HAVE_STRERROR
format_string = strerror(ival);
#else /* ifndef HAVE_STRERROR */
#ifndef ERRLOG_H_INCLUDED
#define ERRLOG_H_INCLUDED
-#define ERRLOG_H_VERSION "$Id: errlog.h,v 1.25 2010/07/26 11:28:11 fabiankeil Exp $"
+#define ERRLOG_H_VERSION "$Id: errlog.h,v 1.26 2010/07/26 11:30:09 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char filters_rcs[] = "$Id: filters.c,v 1.143 2011/05/22 10:25:26 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.144 2011/07/30 15:15:25 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
}
if (csp->action->flags & ACTION_REDIRECT)
{
- log_error(LOG_LEVEL_ERROR, "redirect{} overruled by block.");
+ log_error(LOG_LEVEL_ERROR, "redirect{} overruled by block.");
}
/*
* Else, prepare a response
if(csp->action->flags & ACTION_HANDLE_AS_EMPTY_DOCUMENT)
{
/*
- * Send empty document.
+ * Send empty document.
*/
new_content_type = csp->action->string[ACTION_STRING_CONTENT_TYPE];
* Export the protocol, host, port, and referrer information
*/
err = map(exports, "hostport", 1, csp->http->hostport, 1);
- if (!err) err = map(exports, "protocol", 1, csp->http->ssl ? "https://" : "http://", 1);
+ if (!err) err = map(exports, "protocol", 1, csp->http->ssl ? "https://" : "http://", 1);
if (!err) err = map(exports, "path", 1, csp->http->path, 1);
if (NULL != (p = get_header_value(csp->headers, "Referer:")))
* 2 : b = The filter list to compile
*
* Returns : NULL in case of errors, otherwise the
- * pcrs job list.
+ * pcrs job list.
*
*********************************************************************/
pcrs_job *compile_dynamic_pcrs_job_list(const struct client_state *csp, const struct re_filterfile_spec *b)
* 2 : pcrs_command = pcrs command formatted as string (s@foo@bar@)
*
*
- * Returns : NULL if the pcrs_command didn't change the url, or
+ * Returns : NULL if the pcrs_command didn't change the url, or
* the result of the modification.
*
*********************************************************************/
*
* Parameters :
* 1 : subject = the string to check
- * 2 : redirect_mode = +fast-redirect{} mode
+ * 2 : redirect_mode = +fast-redirect{} mode
*
* Returns : NULL if no URL was found, or
* the last URL found.
}
if (0 == strcmpic(redirect_mode, "check-decoded-url"))
- {
+ {
log_error(LOG_LEVEL_REDIRECTS, "Decoding \"%s\" if necessary.", subject);
new_url = url_decode(subject);
if (new_url != NULL)
))
{
/*
- * Return new URL if we found a redirect
+ * Return new URL if we found a redirect
* or if the subject already was a URL.
*
* The second case makes sure that we can
#endif /* def FEATURE_FAST_REDIRECTS */
csp->action->flags &= ~ACTION_REDIRECT;
- /* Did any redirect action trigger? */
+ /* Did any redirect action trigger? */
if (new_url)
{
if (0 == strcmpic(new_url, csp->http->url))
struct re_filterfile_spec *b;
struct list_entry *filtername;
- /*
+ /*
* Sanity first
*/
if (csp->iob->cur >= csp->iob->eod)
break;
}
}
-
+
/* XXX: Should get its own loglevel. */
log_error(LOG_LEVEL_RE_FILTER, "De-chunking successful. Shrunk from %d to %d", *size, newsize);
/*********************************************************************
*
- * Function : direct_response
+ * Function : direct_response
*
* Description : Check if Max-Forwards == 0 for an OPTIONS or TRACE
* request and if so, return a HTTP 501 to the client.
* requests properly. Still, what we do here is rfc-
* compliant, whereas ignoring or forwarding are not.
*
- * Parameters :
+ * Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
*
* Returns : http_response if , NULL if nonmatch or handler fail
{
return cgi_error_memory();
}
-
+
if (NULL == (rsp->status = strdup("501 Not Implemented")))
{
free_http_response(rsp);
* Description : Checks whether there are any content filters
* enabled for the current request.
*
- * Parameters :
+ * Parameters :
* 1 : action = Action spec to check.
*
* Returns : TRUE for yes, FALSE otherwise
#ifndef FILTERS_H_INCLUDED
#define FILTERS_H_INCLUDED
-#define FILTERS_H_VERSION "$Id: filters.h,v 1.41 2010/09/14 07:16:07 fabiankeil Exp $"
+#define FILTERS_H_VERSION "$Id: filters.h,v 1.42 2011/07/30 15:17:35 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
*/
extern void get_url_actions(struct client_state *csp,
struct http_request *http);
-extern void apply_url_actions(struct current_action_spec *action,
- struct http_request *http,
+extern void apply_url_actions(struct current_action_spec *action,
+ struct http_request *http,
struct url_actions *b);
/*
* Determining parent proxies
*/
extern struct http_response *direct_response(struct client_state *csp);
-/*
+/*
* Revision control strings from this header and associated .c file
*/
extern const char filters_rcs[];
-const char gateway_rcs[] = "$Id: gateway.c,v 1.74 2011/07/17 13:31:35 fabiankeil Exp $";
+const char gateway_rcs[] = "$Id: gateway.c,v 1.75 2011/07/30 15:05:49 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/gateway.c,v $
#include "miscutil.h"
#ifdef FEATURE_CONNECTION_KEEP_ALIVE
#ifdef HAVE_POLL
-#ifdef __GLIBC__
+#ifdef __GLIBC__
#include <sys/poll.h>
#else
#include <poll.h>
if (err)
{
log_error(LOG_LEVEL_CONNECT, "socks4_connect: %s", errstr);
- csp->error_message = strdup(errstr);
+ csp->error_message = strdup(errstr);
errno = EINVAL;
return(JB_INVALID_SOCKET);
}
if (err)
{
- csp->error_message = strdup(errstr);
+ csp->error_message = strdup(errstr);
return(JB_INVALID_SOCKET);
}
#ifndef GATEWAY_H_INCLUDED
#define GATEWAY_H_INCLUDED
-#define GATEWAY_H_VERSION "$Id: gateway.h,v 1.19 2009/10/03 10:37:49 fabiankeil Exp $"
+#define GATEWAY_H_VERSION "$Id: gateway.h,v 1.20 2011/07/30 15:17:35 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/gateway.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
struct http_request;
struct client_state;
-extern jb_socket forwarded_connect(const struct forward_spec * fwd,
- struct http_request *http,
+extern jb_socket forwarded_connect(const struct forward_spec * fwd,
+ struct http_request *http,
struct client_state *csp);
/*
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.107 2011/07/17 13:36:48 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.108 2011/07/30 15:12:02 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
{
#ifdef _WIN32
if (errno == WSAEINPROGRESS)
-#elif __OS2__
+#elif __OS2__
if (sock_errno() == EINPROGRESS)
#else /* ifndef _WIN32 */
if (errno == EINPROGRESS)
break;
}
-#ifdef __OS2__
+#ifdef __OS2__
if (sock_errno() != EINTR)
#else
if (errno != EINTR)
#if defined(_WIN32) || defined(__BEOS__)
closesocket(fd);
#elif defined(AMIGA)
- CloseSocket(fd);
+ CloseSocket(fd);
#elif defined(__OS2__)
soclose(fd);
#else
}
#elif defined(MUTEX_LOCKS_AVAILABLE)
privoxy_mutex_lock(&resolver_mutex);
- host = gethostbyaddr((const char *)&server.sin_addr,
+ host = gethostbyaddr((const char *)&server.sin_addr,
sizeof(server.sin_addr), AF_INET);
privoxy_mutex_unlock(&resolver_mutex);
#else
- host = gethostbyaddr((const char *)&server.sin_addr,
+ host = gethostbyaddr((const char *)&server.sin_addr,
sizeof(server.sin_addr), AF_INET);
#endif
if (host == NULL)
* created using bind_port().
*
* Parameters :
- * 1 : csp = Client state, cfd, ip_addr_str, and
+ * 1 : csp = Client state, cfd, ip_addr_str, and
* ip_addr_long will be set by this routine.
* 2 : fds = File descriptors returned from bind_port
*
while (gethostbyname_r(host, &result, hbuf,
HOSTENT_BUFFER_SIZE, &hostp, &thd_err)
&& (thd_err == TRY_AGAIN) && (dns_retries++ < MAX_DNS_RETRIES))
- {
+ {
log_error(LOG_LEVEL_ERROR,
"Timeout #%u while trying to resolve %s. Trying again.",
dns_retries, host);
while (NULL == (hostp = gethostbyname_r(host, &result,
hbuf, HOSTENT_BUFFER_SIZE, &thd_err))
&& (thd_err == TRY_AGAIN) && (dns_retries++ < MAX_DNS_RETRIES))
- {
+ {
log_error(LOG_LEVEL_ERROR,
"Timeout #%u while trying to resolve %s. Trying again.",
dns_retries, host);
privoxy_mutex_lock(&resolver_mutex);
while (NULL == (hostp = gethostbyname(host))
&& (h_errno == TRY_AGAIN) && (dns_retries++ < MAX_DNS_RETRIES))
- {
+ {
log_error(LOG_LEVEL_ERROR,
"Timeout #%u while trying to resolve %s. Trying again.",
dns_retries, host);
errno = WSAEPROTOTYPE;
#else
errno = EPROTOTYPE;
-#endif
+#endif
log_error(LOG_LEVEL_ERROR, "hostname %s resolves to unknown address type.", host);
return(INADDR_NONE);
}
#ifndef JBSOCKETS_H_INCLUDED
#define JBSOCKETS_H_INCLUDED
-#define JBSOCKETS_H_VERSION "$Id: jbsockets.h,v 1.18 2011/07/17 13:34:36 fabiankeil Exp $"
+#define JBSOCKETS_H_VERSION "$Id: jbsockets.h,v 1.19 2011/07/30 15:17:35 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char jcc_rcs[] = "$Id: jcc.c,v 1.363 2011/08/22 18:58:29 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.364 2011/08/27 10:36:45 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
#if !defined(_WIN32) && !defined(__OS2__) && !defined(AMIGA)
/*********************************************************************
*
- * Function : sig_handler
+ * Function : sig_handler
*
* Description : Signal handler for different signals.
* Exit gracefully on TERM and INT
* Parameters :
* 1 : the_signal = the signal cause this function to call
*
- * Returns : -
+ * Returns : -
*
*********************************************************************/
static void sig_handler(int the_signal)
#if defined(unix)
received_hup_signal = 1;
#endif
- break;
+ break;
default:
- /*
+ /*
* We shouldn't be here, unless we catch signals
* in main() that we can't handle here!
*/
log_error(LOG_LEVEL_HEADER, "Continue hack in da house.");
continue_hack_in_da_house = 1;
}
- else if (*header == '\0')
+ else if (*header == '\0')
{
/*
* If the header is empty, but the Continue hack
if (cgi_error_memory() != rsp)
{
free_http_response(rsp);
- }
+ }
return;
}
/*
* If CGI request crunching is disabled,
* check the CGI dispatcher out of order to
- * prevent unintentional blocks or redirects.
+ * prevent unintentional blocks or redirects.
*/
if (!(csp->config->feature_flags & RUNTIME_FEATURE_CGI_CRUNCHING)
&& (NULL != (rsp = dispatch_cgi(csp))))
destroy_list(headers);
return JB_ERR_PARSE;
}
-
+
if (add_to_iob(csp, buf, len))
{
/*
get_url_actions(csp, http);
}
- /*
+ /*
* Save a copy of the original request for logging
*/
http->ocmd = strdup(http->cmd);
hdr = list_to_text(csp->headers);
if (hdr == NULL)
{
- /*
+ /*
* Memory is too tight to even generate the header.
* Send our static "Out-of-memory" page.
*/
{
log_error(LOG_LEVEL_ERROR, "Out of memory while looking for end of server headers.");
rsp = cgi_error_memory();
- send_crunch_response(csp, rsp);
+ send_crunch_response(csp, rsp);
mark_server_socket_tainted(csp);
return;
}
{
char cwd[BUFFER_SIZE];
char *abs_file;
- size_t abs_file_size;
+ size_t abs_file_size;
/* make config-filename absolute here */
if (NULL == getcwd(cwd, sizeof(cwd)))
for (idx = 0; catched_signals[idx] != 0; idx++)
{
-#ifdef sun /* FIXME: Is it safe to check for HAVE_SIGSET instead? */
+#ifdef sun /* FIXME: Is it safe to check for HAVE_SIGSET instead? */
if (sigset(catched_signals[idx], sig_handler) == SIG_ERR)
#else
if (signal(catched_signals[idx], sig_handler) == SIG_ERR)
if (putenv(putenv_dummy) != 0)
{
log_error(LOG_LEVEL_FATAL, "Cannot putenv(): HOME");
- }
+ }
snprintf(putenv_dummy, sizeof(putenv_dummy), "USER=%s", pw->pw_name);
if (putenv(putenv_dummy) != 0)
*/
if (bRunAsService)
{
- /* Yup, so now we must attempt to establish a connection
+ /* Yup, so now we must attempt to establish a connection
* with the service dispatcher. This will only work if this
* process was launched by the service control manager to
* actually run as a service. If this isn't the case, i've
#if defined(AMIGA) && !defined(SELECTED_ONE_OPTION)
#define SELECTED_ONE_OPTION
csp->cfd = ReleaseSocket(csp->cfd, -1);
-
+
#ifdef __amigaos4__
child_id = (int)CreateNewProcTags(NP_Entry, (ULONG)server_thread,
NP_Output, Output(),
serve(csp);
- /*
+ /*
* If we've been toggled or we've blocked the request, tell Mom
*/
}
#endif /* def FEATURE_TOGGLE */
-#ifdef FEATURE_STATISTICS
+#ifdef FEATURE_STATISTICS
if (csp->flags & CSP_FLAG_REJECTED)
{
rc |= RC_FLAG_BLOCKED;
wait( &child_status );
- /*
+ /*
* Evaluate child's return code: If the child has
* - been toggled, toggle ourselves
* - blocked its request, bump up the stats counter
{
urls_rejected++;
}
-#endif /* def FEATURE_STATISTICS */
+#endif /* def FEATURE_STATISTICS */
#endif /* !defined(_WIN32) && defined(__CYGWIN__) */
close_socket(csp->cfd);
#ifndef JCC_H_INCLUDED
#define JCC_H_INCLUDED
-#define JCC_H_VERSION "$Id: jcc.h,v 1.28 2010/01/03 12:37:14 fabiankeil Exp $"
+#define JCC_H_VERSION "$Id: jcc.h,v 1.29 2010/07/21 14:35:09 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.h,v $
*
- * Purpose : Main file. Contains main() method, main loop, and
+ * Purpose : Main file. Contains main() method, main loop, and
* the main connection-handling function.
*
* Copyright : Written by and Copyright (C) 2001-2006 the SourceForge
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char list_rcs[] = "$Id: list.c,v 1.23 2011/01/22 12:30:22 fabiankeil Exp $";
+const char list_rcs[] = "$Id: list.c,v 1.24 2011/04/19 13:00:47 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/list.c,v $
* Note that the 1000 limit was hit by a real user in tracker 911950;
* removing it for now. Real circular references should eventually
* be caught by the check above, anyway.
- */
+ */
/*
if (entry > 1000)
- {
+ {
return 0;
- }
- */
+ }
+ */
/*
* Check this isn't marked as the last entry, unless of course it's
if (entry->str == NULL)
{
/*
- * NULL pointers are allowed in some lists.
+ * NULL pointers are allowed in some lists.
* For example for csp->headers in case a
* header was removed.
*/
assert(the_map);
assert(name);
-
+
last_entry = the_map->first;
for (cur_entry = the_map->first; cur_entry != NULL; cur_entry = cur_entry->next)
}
/*
- * Update the map's last pointer
+ * Update the map's last pointer
*/
if (cur_entry == the_map->last)
{
the_map->last = last_entry;
}
-
+
/*
* Free the map_entry
*/
#ifndef LIST_H_INCLUDED
#define LIST_H_INCLUDED
-#define LIST_H_VERSION "$Id: list.h,v 1.16 2009/05/16 13:27:20 fabiankeil Exp $"
+#define LIST_H_VERSION "$Id: list.h,v 1.17 2010/11/22 10:32:40 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/list.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
#ifndef LOADCFG_H_INCLUDED
#define LOADCFG_H_INCLUDED
-#define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.14 2009/05/16 13:27:20 fabiankeil Exp $"
+#define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.15 2009/09/10 14:45:17 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loadcfg.h,v $
*
* Purpose : Loads settings from the configuration file into
- * global variables. This file contains both the
+ * global variables. This file contains both the
* routine to load the configuration and the global
* variables it writes to.
*
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char loaders_rcs[] = "$Id: loaders.c,v 1.84 2011/07/30 15:12:55 fabiankeil Exp $";
+const char loaders_rcs[] = "$Id: loaders.c,v 1.85 2011/07/30 15:13:32 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loaders.c,v $
*/
csp->config->config_file_list->active = 1;
- /*
+ /*
* Actions files
*/
for (i = 0; i < MAX_AF_FILES; i++)
{
- if (csp->actions_list[i])
+ if (csp->actions_list[i])
{
csp->actions_list[i]->active = 1;
}
*/
for (i = 0; i < MAX_AF_FILES; i++)
{
- if (csp->rlist[i])
+ if (csp->rlist[i])
{
csp->rlist[i]->active = 1;
}
last_active = client_list;
client_list = client_list->next;
}
- else
+ else
/*
* This client is not active. Free its resources.
*/
#endif /* def FEATURE_STATISTICS */
freez(client_list);
-
+
client_list = last_active->next;
}
}
freez(buf);
}
- if(trusted_referrers >= MAX_TRUSTED_REFERRERS)
+ if(trusted_referrers >= MAX_TRUSTED_REFERRERS)
{
/*
* FIXME: ... after Privoxy 3.0.4 is out.
*
* Function : unload_forward_spec
*
- * Description : Unload the forward spec settings by freeing all
+ * Description : Unload the forward spec settings by freeing all
* memory referenced by members and the memory for
* the spec itself.
*
*
* Function : load_re_filterfiles
*
- * Description : Loads all the filterfiles.
+ * Description : Loads all the filterfiles.
* Generate a chained list of re_filterfile_spec's from
* the "FILTER: " blocks, compiling all their substitutions
* into chained lists of pcrs_job structs.
*
* Function : load_one_re_filterfile
*
- * Description : Load a re_filterfile.
+ * Description : Load a re_filterfile.
* Generate a chained list of re_filterfile_spec's from
* the "FILTER: " blocks, compiling all their substitutions
* into chained lists of pcrs_job structs.
goto load_re_filterfile_error;
}
- /*
+ /*
* Open the file or fail
*/
if ((fp = fopen(csp->config->re_filterfile[fileid], "r")) == NULL)
log_error(LOG_LEVEL_INFO, "Loading filter file: %s", csp->config->re_filterfile[fileid]);
- /*
+ /*
* Read line by line
*/
while (read_config_line(fp, &linenum, &buf) != NULL)
}
new_bl->name = strdup(chomp(new_bl->name));
-
+
/*
* If this is the first filter block, chain it
* to the file_list rather than its (nonexistant)
continue;
}
- /*
+ /*
* Else, save the expression, make it a pcrs_job
- * and chain it into the current filter's joblist
+ * and chain it into the current filter's joblist
*/
if (bl != NULL)
{
log_error(LOG_LEVEL_RE_FILTER,
"Adding dynamic re_filter job \'%s\' to filter %s succeeded.", buf, bl->name);
freez(buf);
- continue;
+ continue;
}
else if (bl->dynamic)
{
fclose(fp);
- /*
+ /*
* Schedule the now-obsolete old data for unloading
*/
if ( NULL != current_re_filterfile[fileid] )
#ifndef LOADERS_H_INCLUDED
#define LOADERS_H_INCLUDED
-#define LOADERS_H_VERSION "$Id: loaders.h,v 1.27 2011/03/03 14:38:36 fabiankeil Exp $"
+#define LOADERS_H_VERSION "$Id: loaders.h,v 1.28 2011/04/19 13:00:47 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loaders.h,v $
*
* Purpose : Functions to load and unload the various
* configuration files. Also contains code to manage
- * the list of active loaders, and to automatically
+ * the list of active loaders, and to automatically
* unload files that are no longer in use.
*
* Copyright : Written by and Copyright (C) 2001-2010 the
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
void unload_forward_spec(struct forward_spec *fwd);
-extern void add_loader(int (*loader)(struct client_state *),
+extern void add_loader(int (*loader)(struct client_state *),
struct configuration_spec * config);
extern int run_loader(struct client_state *csp);
-const char miscutil_rcs[] = "$Id: miscutil.c,v 1.66 2011/05/22 10:26:45 fabiankeil Exp $";
+const char miscutil_rcs[] = "$Id: miscutil.c,v 1.67 2011/05/22 10:30:55 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/miscutil.c,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
* The timegm replacement function was taken from GnuPG,
* used under the terms of the GPL or the terms of the
* "Frontier Artistic License".
*
- * This program is free software; you can redistribute it
+ * 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
#if defined(unix)
/*********************************************************************
*
- * Function : write_pid_file
+ * Function : write_pid_file
*
- * Description : Writes a pid file with the pid of the main process
+ * Description : Writes a pid file with the pid of the main process
*
* Parameters : None
*
- * Returns : N/A
+ * Returns : N/A
*
*********************************************************************/
void write_pid_file(void)
{
FILE *fp;
-
+
/*
* If no --pidfile option was given,
* we can live without one.
*********************************************************************/
unsigned int hash_string( const char* s )
{
- unsigned int h = 0;
+ unsigned int h = 0;
for ( ; *s; ++s )
{
if (n <= (size_t)0) return(0);
if (!s1) s1 = "";
if (!s2) s2 = "";
-
+
while (*s1 && *s2)
{
if ( ( *s1 != *s2 ) && ( ijb_tolower(*s1) != ijb_tolower(*s2) ) )
{
char *p, *q, *r;
- /*
+ /*
* strip trailing whitespace
*/
p = string + strlen(string);
}
*p = '\0';
- /*
- * find end of leading whitespace
+ /*
+ * find end of leading whitespace
*/
q = r = string;
while (*q && ijb_isspace(*q))
*
* Function : string_append
*
- * Description : Reallocate target_string and append text to it.
+ * Description : Reallocate target_string and append text to it.
* This makes it easier to append to malloc'd strings.
* This is similar to the (removed) strsav(), but
* running out of memory isn't catastrophic.
* Parameters :
* 1 : string = string to convert
*
- * Returns : Uppercase copy of string if possible,
+ * Returns : Uppercase copy of string if possible,
* NULL on out-of-memory or if string was NULL.
*
*********************************************************************/
{
return NULL;
}
-
+
q = string;
p = result;
*
* Function : make_path
*
- * Description : Takes a directory name and a file name, returns
+ * Description : Takes a directory name and a file name, returns
* the complete path. Handles windows/unix differences.
* If the file name is already an absolute path, or if
- * the directory name is NULL or empty, it returns
- * the filename.
+ * the directory name is NULL or empty, it returns
+ * the filename.
*
* Parameters :
* 1 : dir: Name of directory or NULL for none.
* Returns : "dir/file" (Or on windows, "dir\file").
* It allocates the string on the heap. Caller frees.
* Returns NULL in error (i.e. NULL file or out of
- * memory)
+ * memory)
*
*********************************************************************/
char * make_path(const char * dir, const char * file)
* Parameters :
* 1 : range: Highest possible number to pick.
*
- * Returns : Picked number.
+ * Returns : Picked number.
*
*********************************************************************/
long int pick_from_range(long int range)
if (range <= 0) return 0;
#ifdef HAVE_RANDOM
- number = random() % range + 1;
+ number = random() % range + 1;
#elif defined(MUTEX_LOCKS_AVAILABLE)
privoxy_mutex_lock(&rand_mutex);
#ifdef _WIN32
* Parameters :
* 1 : tm: Broken-down time struct.
*
- * Returns : tm converted into time_t seconds.
+ * Returns : tm converted into time_t seconds.
*
*********************************************************************/
time_t timegm(struct tm *tm)
snprintf.c
- a portable implementation of snprintf,
including vsnprintf.c, asnprintf, vasnprintf, asprintf, vasprintf
-
+
snprintf is a routine to convert numeric and string arguments to
formatted strings. It is similar to sprintf(3) provided in a system's
C library, yet it requires an additional argument - the buffer size -
}
}
/* zero padding to specified precision? */
- if (num_of_digits < precision)
+ if (num_of_digits < precision)
number_of_zeros_to_pad = precision - num_of_digits;
}
/* zero padding to specified minimal field width? */
#ifndef MISCUTIL_H_INCLUDED
#define MISCUTIL_H_INCLUDED
-#define MISCUTIL_H_VERSION "$Id: miscutil.h,v 1.32 2011/05/22 10:26:45 fabiankeil Exp $"
+#define MISCUTIL_H_VERSION "$Id: miscutil.h,v 1.33 2011/05/22 10:30:55 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/miscutil.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char parsers_rcs[] = "$Id: parsers.c,v 1.225 2011/07/08 13:30:08 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.226 2011/08/31 13:35:21 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
{
/** The header prefix to match */
const char *str;
-
+
/** The length of the prefix to match */
const size_t len;
-
+
/** The function to apply to this line */
const parser_func_ptr parser;
};
{
want *= 2;
}
-
+
if (want <= csp->config->buffer_limit && NULL != (p = (char *)realloc(iob->buf, want)))
{
iob->size = want;
jb_err decompress_iob(struct client_state *csp)
{
char *buf; /* new, uncompressed buffer */
- char *cur; /* Current iob position (to keep the original
+ char *cur; /* Current iob position (to keep the original
* iob->cur unmodified if we return early) */
size_t bufsize; /* allocated size of the new buffer */
size_t old_size; /* Content size before decompression */
*
* Fortunately, add_to_iob() has thoughtfully null-terminated
* the buffer; we can just increment the end pointer to include
- * the dummy byte.
+ * the dummy byte.
*/
csp->iob->eod++;
}
{
bufsize = csp->config->buffer_limit;
}
-
+
/* Try to allocate the new buffer. */
tmpbuf = realloc(buf, bufsize);
if (NULL == tmpbuf)
csp->iob->cur = csp->iob->buf + skip_size;
csp->iob->eod = (char *)zstr.next_out;
csp->iob->size = bufsize;
-
+
/*
* Make sure the new uncompressed iob obeys some minimal
* consistency conditions.
* Header spans multiple lines, append the next one.
*/
char *continued_header;
-
+
continued_header = get_header_line(iob);
if ((continued_header == NULL) || (*continued_header == '\0'))
{
}
}
- /*
+ /*
* Not found
*/
return NULL;
*
* Function : scan_headers
*
- * Description : Scans headers, applies tags and updates action bits.
+ * Description : Scans headers, applies tags and updates action bits.
*
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
b->name);
continue;
}
-
+
if (!list_contains_item(csp->tags, tag))
{
if (JB_ERR_OK != enlist(csp->tags, tag))
matches = pcrs_execute(job, *header, size, &newheader, &size);
if ( 0 < matches )
{
- current_hits += matches;
+ current_hits += matches;
log_error(LOG_LEVEL_HEADER, "Transforming \"%s\" to \"%s\"", *header, newheader);
freez(*header);
*header = newheader;
* Function : client_connection
*
* Description : Makes sure a proper "Connection:" header is
- * set and signals connection_header_adder
+ * set and signals connection_header_adder
* to do nothing.
*
* Parameters :
/* Is the current header the lucky one? */
if (strstr(*header, crunch_pattern))
{
- log_error(LOG_LEVEL_HEADER, "Crunching server header: %s (contains: %s)", *header, crunch_pattern);
+ log_error(LOG_LEVEL_HEADER, "Crunching server header: %s (contains: %s)", *header, crunch_pattern);
freez(*header);
}
}
{
/*
* Make sure the user doesn't accidentally
- * change the content type of binary documents.
+ * change the content type of binary documents.
*/
if ((csp->content_type & CT_TEXT) || (csp->action->flags & ACTION_FORCE_TEXT_MODE))
{
*
* If FEATURE_ZLIB is enabled and the compression type
* supported, the content is marked for decompression.
- *
+ *
* XXX: Doesn't properly deal with multiple or with
* unsupported but unknown encodings.
* Is case-sensitive but shouldn't be.
return JB_ERR_OK;
}
else
- {
+ {
/*
* Replacing Content-Disposition header
*/
return JB_ERR_OK;
}
else if (0 == strcmpic(newval, "reset-to-request-time"))
- {
+ {
/*
* Setting Last-Modified Header to now.
*/
get_http_time(0, buf, sizeof(buf));
freez(*header);
*header = strdup("Last-Modified: ");
- string_append(header, buf);
+ string_append(header, buf);
if (*header == NULL)
{
- log_error(LOG_LEVEL_HEADER, "Insufficient memory. Last-Modified header got lost, boohoo.");
+ log_error(LOG_LEVEL_HEADER, "Insufficient memory. Last-Modified header got lost, boohoo.");
}
else
{
if (negative_delta)
{
- rtime *= -1;
+ rtime *= -1;
log_error(LOG_LEVEL_HEADER, "Server time in the future.");
}
rtime = pick_from_range(rtime);
if (*header == NULL)
{
log_error(LOG_LEVEL_ERROR, "Insufficient memory, header crunched without replacement.");
- return JB_ERR_MEMORY;
+ return JB_ERR_MEMORY;
}
days = rtime / (3600 * 24);
/* booleans for parameters we have to check multiple times */
int parameter_conditional_block;
int parameter_conditional_forge;
-
+
#ifdef FEATURE_FORCE_LOAD
/*
* Since the referrer can include the prefix even
return JB_ERR_OK;
}
else
- {
+ {
/*
* Replacing Accept-Language header
*/
freez(*header);
*header = strdup("Accept-Language: ");
- string_append(header, newval);
+ string_append(header, newval);
if (*header == NULL)
{
log_error(LOG_LEVEL_ERROR,
- "Insufficient memory. Accept-Language header crunched without replacement.");
+ "Insufficient memory. Accept-Language header crunched without replacement.");
}
else
{
/* Is the current header the lucky one? */
if (strstr(*header, crunch_pattern))
{
- log_error(LOG_LEVEL_HEADER, "Crunching client header: %s (contains: %s)", *header, crunch_pattern);
+ log_error(LOG_LEVEL_HEADER, "Crunching client header: %s (contains: %s)", *header, crunch_pattern);
freez(*header);
}
}
return JB_ERR_OK;
}
- if (!csp->http->hostport || (*csp->http->hostport == '*') ||
+ if (!csp->http->hostport || (*csp->http->hostport == '*') ||
*csp->http->hostport == ' ' || *csp->http->hostport == '\0')
{
-
+
if (NULL == (p = strdup((*header)+6)))
{
return JB_ERR_MEMORY;
struct tm gmt;
#endif
struct tm *timeptr = NULL;
- time_t tm = 0;
+ time_t tm = 0;
const char *newval;
char * endptr;
-
+
if ( 0 == strcmpic(*header, "If-Modified-Since: Wed, 08 Jun 1955 12:00:00 GMT"))
{
- /*
+ /*
* The client got an error message because of a temporary problem,
* the problem is gone and the client now tries to revalidate our
* error message on the real server. The revalidation would always
*header, rtime, (rtime == 1 || rtime == -1) ? "e": "es");
if (negative_range)
{
- rtime *= -1;
+ rtime *= -1;
}
rtime *= 60;
rtime = pick_from_range(rtime);
if (*header == NULL)
{
log_error(LOG_LEVEL_HEADER, "Insufficient memory, header crunched without replacement.");
- return JB_ERR_MEMORY;
+ return JB_ERR_MEMORY;
}
hours = rtime / 3600;
static jb_err client_if_none_match(struct client_state *csp, char **header)
{
if (csp->action->flags & ACTION_CRUNCH_IF_NONE_MATCH)
- {
+ {
log_error(LOG_LEVEL_HEADER, "Crunching %s", *header);
freez(*header);
}
"force-text-mode overruled the client's request to fetch without filtering!");
}
else
- {
+ {
csp->content_type = CT_TABOO; /* XXX: This hack shouldn't be necessary */
csp->flags |= CSP_FLAG_NO_FILTERING;
log_error(LOG_LEVEL_HEADER, "Accepted the client's request to fetch without filtering.");
freez(*header);
}
}
- return JB_ERR_OK;
+ return JB_ERR_OK;
}
freez(*header);
}
- return JB_ERR_OK;
+ return JB_ERR_OK;
}
/* the following functions add headers directly to the header list */
static jb_err server_set_cookie(struct client_state *csp, char **header)
{
time_t now;
- time_t cookie_time;
+ time_t cookie_time;
time(&now);
* to get the numerical respresentation.
*
* Parameters :
- * 1 : header_time = HTTP header time as string.
+ * 1 : header_time = HTTP header time as string.
* 2 : result = storage for header_time in seconds
*
* Returns : JB_ERR_OK if the time format was recognized, or
* Parameters :
* 1 : headers = List of headers (one of them hopefully being
* the "Host:" header)
- * 2 : http = storage for the result (host, port and hostport).
+ * 2 : http = storage for the result (host, port and hostport).
*
* Returns : JB_ERR_MEMORY in case of memory problems,
* JB_ERR_PARSE if the host header couldn't be found,
*
* Description : Helper for client_referrer to forge a referer as
* 'http://[hostname:port/' to fool stupid
- * checks for in-site links
+ * checks for in-site links
*
* Parameters :
* 1 : header = Pointer to header pointer
#ifndef PARSERS_H_INCLUDED
#define PARSERS_H_INCLUDED
-#define PARSERS_H_VERSION "$Id: parsers.h,v 1.49 2009/03/13 14:10:07 fabiankeil Exp $"
+#define PARSERS_H_VERSION "$Id: parsers.h,v 1.50 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char pcrs_rcs[] = "$Id: pcrs.c,v 1.36 2011/03/03 14:49:08 fabiankeil Exp $";
+const char pcrs_rcs[] = "$Id: pcrs.c,v 1.37 2011/04/19 13:00:47 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/pcrs.c,v $
*
* Copyright (C) 2006, 2007 Fabian Keil <fk@fabiankeil.de>
*
- * This program is free software; you can redistribute it
+ * This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser
* General Public License (LGPL), version 2.1, which should
* be included in this distribution (see LICENSE.txt), with
* Function : pcrs_strerror
*
* Description : Return a string describing a given error code.
- *
+ *
* Parameters :
* 1 : error = the error code
*
case PCRE_ERROR_UNKNOWN_NODE: return "(pcre:) Bad node in pattern";
/* Can't happen / not passed: */
- case PCRE_ERROR_NOSUBSTRING: return "(pcre:) Fire in power supply";
+ case PCRE_ERROR_NOSUBSTRING: return "(pcre:) Fire in power supply";
case PCRE_ERROR_NOMATCH: return "(pcre:) Water in power supply";
#ifdef PCRE_ERROR_MATCHLIMIT
case PCRS_WARN_TRUNCATION:
return "(pcrs:) At least one variable was too big and has been truncated before compilation";
- /*
+ /*
* XXX: With the exception of PCRE_ERROR_MATCHLIMIT we
* only catch PCRE errors that can happen with our internal
* version. If Privoxy is linked against a newer
* 'T' (trivial) options but pcrs needs them, the corresponding
* flags are set if 'g'or 'T' is encountered.
* Note: The 'T' and 'U' options do not conform to Perl.
- *
+ *
* Parameters :
* 1 : optstring = string with options in perl syntax
* 2 : flags = see description
*
- * Returns : option integer suitable for pcre
+ * Returns : option integer suitable for pcre
*
*********************************************************************/
static int pcrs_parse_perl_options(const char *optstring, int *flags)
return NULL;
}
memset(text, '\0', length + 1);
-
+
/*
* In trivial mode, just copy the substitute text
assert(ascii_value < 256);
text[k++] = (char)ascii_value;
i += 4;
- }
+ }
else
{
quoted = 1;
/* Symbolic backreferences: */
else if (NULL != (symbol = strchr(symbols, replacement[i + 1])))
{
-
+
if (symbol - symbols == 2) /* $+ */
{
r->backref[l] = capturecount;
else
{
*errptr = PCRS_WARN_BADREF;
- }
+ }
continue;
}
-
+
plainchar:
/* Plain chars are copied */
text[k++] = replacement[i++];
* 1 : job = pointer to the pcrs_job structure to be freed
*
* Returns : a pointer to the next job, if there was any, or
- * NULL otherwise.
+ * NULL otherwise.
*
*********************************************************************/
pcrs_job *pcrs_free_job(pcrs_job *job)
*
* Function : pcrs_compile_command
*
- * Description : Parses a string with a Perl-style s/// command,
+ * Description : Parses a string with a Perl-style s/// command,
* calls pcrs_compile, and returns a corresponding
* pcrs_job, or NULL if parsing or compiling the job
* fails.
int i, k, l, quoted = FALSE;
size_t limit;
char delimiter;
- char *tokens[4];
+ char *tokens[4];
pcrs_job *newjob;
-
+
k = l = 0;
-
+
/*
* Tokenize the perl command
*/
for (i = 0; i <= (int)limit; i++)
{
-
+
if (command[i] == delimiter && !quoted)
{
if (l == 3)
tokens[++l] = tokens[0] + k;
continue;
}
-
+
else if (command[i] == '\\' && !quoted)
{
quoted = TRUE;
free(tokens[0]);
return NULL;
}
-
+
newjob = pcrs_compile(tokens[1], tokens[2], tokens[3], errptr);
free(tokens[0]);
return newjob;
-
+
}
*errptr = 0;
- /*
+ /*
* Handle NULL arguments
*/
if (pattern == NULL) pattern = "";
if (substitute == NULL) substitute = "";
- /*
+ /*
* Get and init memory
*/
if (NULL == (newjob = (pcrs_job *)malloc(sizeof(pcrs_job))))
pcrs_free_job(newjob);
return NULL;
}
-
- /*
- * Determine the number of capturing subpatterns.
+
+ /*
+ * Determine the number of capturing subpatterns.
* This is needed for handling $+ in the substitute.
*/
if (0 > (*errptr = pcre_fullinfo(newjob->pattern, newjob->hints, PCRE_INFO_CAPTURECOUNT, &capturecount)))
pcrs_free_job(newjob);
return NULL;
}
-
+
/*
* Compile the substitute
pcrs_free_job(newjob);
return NULL;
}
-
+
return newjob;
}
* the joblist to the subject.
* The subject itself is left untouched, memory for the result
* is malloc()ed and it is the caller's responsibility to free
- * the result when it's no longer needed.
+ * the result when it's no longer needed.
*
* Note: For convenient string handling, a null byte is
* appended to the result. It does not count towards the
* Parameters :
* 1 : joblist = the chained list of pcrs_jobs to be executed
* 2 : subject = the subject string
- * 3 : subject_length = the subject's length
- * 4 : result = char** for returning the result
+ * 3 : subject_length = the subject's length
+ * 4 : result = char** for returning the result
* 5 : result_length = size_t* for returning the result's length
*
* Returns : On success, the number of substitutions that were made.
pcrs_job *job;
char *old, *new = NULL;
int hits, total_hits;
-
+
old = subject;
*result_length = subject_length;
total_hits = 0;
* Parameters :
* 1 : job = the pcrs_job to be executed
* 2 : subject = the subject (== original) string
- * 3 : subject_length = the subject's length
- * 4 : result = char** for returning the result
+ * 3 : subject_length = the subject's length
+ * 4 : result = char** for returning the result
* 5 : result_length = size_t* for returning the result's length
*
* Returns : On success, the number of substitutions that were made.
offset = i = 0;
- /*
+ /*
* Sanity check & memory allocation
*/
if (job == NULL || job->pattern == NULL || job->substitute == NULL || NULL == subject)
matches[i].submatch_offset[k] = offsets[2 * k];
/* Note: Non-found optional submatches have length -1-(-1)==0 */
- matches[i].submatch_length[k] = (size_t)(offsets[2 * k + 1] - offsets[2 * k]);
+ matches[i].submatch_length[k] = (size_t)(offsets[2 * k + 1] - offsets[2 * k]);
/* reserve mem for each submatch as often as it is ref'd */
newsize += matches[i].submatch_length[k] * (size_t)job->substitute->backref_count[k];
}
/* plus replacement text size minus match text size */
- newsize += job->substitute->length - matches[i].submatch_length[0];
+ newsize += job->substitute->length - matches[i].submatch_length[0];
/* chunk before match */
matches[i].submatch_offset[PCRS_MAX_SUBMATCHES] = 0;
if (submatches < PCRE_ERROR_NOMATCH)
{
free(matches);
- return submatches;
+ return submatches;
}
matches_found = i;
- /*
+ /*
* Get memory for the result (must be freed by caller!)
* and append terminating null byte.
*/
}
- /*
+ /*
* Replace
*/
offset = 0;
for (i = 0; i < matches_found; i++)
{
/* copy the chunk preceding the match */
- memcpy(result_offset, subject + offset, (size_t)(matches[i].submatch_offset[0] - offset));
+ memcpy(result_offset, subject + offset, (size_t)(matches[i].submatch_offset[0] - offset));
result_offset += matches[i].submatch_offset[0] - offset;
/* For every segment of the substitute.. */
* Parameters :
* 1 : string = The string to search in
*
- * Returns : A safe delimiter if one was found, otherwise '\0'.
+ * Returns : A safe delimiter if one was found, otherwise '\0'.
*
*********************************************************************/
char pcrs_get_delimiter(const char *string)
*
* Parameters :
* 1 : subject = the subject (== original) string
- * 2 : pcrs_command = the pcrs command as string (s@foo@bar@)
- * 3 : hits = int* for returning the number of modifications
+ * 2 : pcrs_command = the pcrs command as string (s@foo@bar@)
+ * 3 : hits = int* for returning the number of modifications
*
* Returns : NULL in case of errors, otherwise the
- * result of the pcrs command.
+ * result of the pcrs command.
*
*********************************************************************/
char *pcrs_execute_single_command(const char *subject, const char *pcrs_command, int *hits)
* 3 : error = pcrs error code
*
* Returns : NULL in case of hard errors, otherwise the
- * compiled pcrs job.
+ * compiled pcrs job.
*
*********************************************************************/
pcrs_job *pcrs_compile_dynamic_command(char *pcrs_command, const struct pcrs_variable v[], int *error)
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.169 2011/07/08 13:30:08 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.170 2011/07/17 13:34:36 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
#define JB_ERR_CGI_PARAMS 2 /**< Missing or corrupt CGI parameters */
#define JB_ERR_FILE 3 /**< Error opening, reading or writing a file */
#define JB_ERR_PARSE 4 /**< Error parsing file */
-#define JB_ERR_MODIFIED 5 /**< File has been modified outside of the
+#define JB_ERR_MODIFIED 5 /**< File has been modified outside of the
CGI actions editor. */
#define JB_ERR_COMPRESS 6 /**< Error on decompression */
*/
#define ijb_toupper(__X) toupper((int)(unsigned char)(__X))
#define ijb_tolower(__X) tolower((int)(unsigned char)(__X))
-#define ijb_isspace(__X) isspace((int)(unsigned char)(__X))
+#define ijb_isspace(__X) isspace((int)(unsigned char)(__X))
/**
* Use for statically allocated buffers if you have no other choice.
* your own code.
*/
char *str;
-
+
/** Next entry in the linked list, or NULL if no more. */
struct list_entry *next;
};
/*
* Flags for use in csp->flags
*/
-
+
/**
* Flag for csp->flags: Set if this client is processing data.
* Cleared when the thread associated with this structure dies.
* Read-only once the structure has been created.
*/
time_t lastmodified;
-
+
/**
* The full filename.
*/
{
/** What to log */
int debug;
-
+
/** Nonzero to enable multithreading. */
int multi_threaded;
#endif /* def FEATURE_NO_GIFS */
-/*
+/*
* Hardwired URLs
*/
-const char ssplit_rcs[] = "$Id: ssplit.c,v 1.10 2009/05/16 13:27:20 fabiankeil Exp $";
+const char ssplit_rcs[] = "$Id: ssplit.c,v 1.11 2011/05/22 10:20:05 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/ssplit.c,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
* 3 : vec[] = results vector (aka. array) [out]
* 4 : vec_len = number of usable slots in the vector (aka. array size)
* 5 : dont_save_empty_fields = zero if consecutive delimiters
- * give a null output field(s), nonzero if they are just
+ * give a null output field(s), nonzero if they are just
* to be considered as single delimeter
* 6 : ignore_leading = nonzero to ignore leading field
* separators.
*
- * Returns : -1 => Error: vec_len is too small to hold all the
+ * Returns : -1 => Error: vec_len is too small to hold all the
* data, or str == NULL.
* >=0 => the number of fields put in `vec'.
* On error, vec and str may still have been overwritten.
|| (is_delim[(unsigned)(unsigned char)*str] == 0) )
{
/*
- * We want empty fields, or the first character in this
+ * We want empty fields, or the first character in this
* field is not a delimiter or the end of string.
* So save it.
*/
{
return(-1); /* overflow */
}
- vec[vec_count++] = (char *) str;
+ vec[vec_count++] = (char *) str;
}
while ((char_type = is_delim[(unsigned)(unsigned char)*str]) != 2)
{
- if (char_type == 1)
+ if (char_type == 1)
{
/* the char is a separator */
/* null terminate the substring */
- *str++ = '\0';
+ *str++ = '\0';
/* Check if we want to save this field */
if ( (!dont_save_empty_fields)
|| (is_delim[(unsigned)(unsigned char)*str] == 0) )
{
/*
- * We want empty fields, or the first character in this
+ * We want empty fields, or the first character in this
* field is not a delimiter or the end of string.
* So save it.
*/
{
return(-1); /* overflow */
}
- vec[vec_count++] = (char *) str;
+ vec[vec_count++] = (char *) str;
}
}
else
#ifndef SSPLIT_H_INCLUDED
#define SSPLIT_H_INCLUDED
-#define SSPLIT_H_VERSION "$Id: ssplit.h,v 1.8 2009/05/16 13:27:20 fabiankeil Exp $"
+#define SSPLIT_H_VERSION "$Id: ssplit.h,v 1.9 2011/05/22 10:20:05 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/ssplit.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
#
# Template files are written in plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
# force-support:
# Privoxy has been compiled with support for forced loading
# of blocked content. In that case, the symbol "force-prefix" is
-# avaiable, which translates to the FORCE_PREFIX
+# avaiable, which translates to the FORCE_PREFIX
#
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
minWidth = 650;
minHeight = 330;
- /*
+ /*
* Navigator, Mozilla, Opera
*/
- if (window.innerWidth
- && (window.innerWidth >= minWidth)
+ if (window.innerWidth
+ && (window.innerWidth >= minWidth)
&& (window.innerHeight >= minHeight))
{
return false;
}
-
- /*
+
+ /*
* MSIE
*/
- else if (document.body && document.body.clientWidth
+ else if (document.body && document.body.clientWidth
&& (document.body.clientWidth >= minWidth)
&& (document.body.clientHeight >= minHeight))
{
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
<tr>
<td class="status">
404
- </td>
+ </td>
<td class="title" style="width: 100%">
#include mod-title
</td>
</tr>
<!-- if-have-help-info-end@ -->
-
+
</table>
</body>
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
</td>
</tr>
<!-- if-have-help-info-end@ -->
-
+
</table>
</body>
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
</td>
</tr>
<!-- if-have-help-info-end@ -->
-
+
</table>
</body>
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
<p>Possible causes:</p>
<ul>
<li>If you got here using your browser's "back" button, then
- that is deliberately disabled for this page. Please
+ that is deliberately disabled for this page. Please
navigate around the configuration editor using the
links provided.</li>
<li>Perhaps you've got more than one browser window open, and
only have one editor window open at a time. Your other edit
window should continue to function.</li>
<li>You may have modified the file some other way - perhaps by
- editing it with a text editor. Simply go back in to the
+ editing it with a text editor. Simply go back in to the
configuration interface using the links below.</li>
</ul>
<p>You can go back into the edit interface using the menu below,
</td>
</tr>
<!-- if-have-help-info-end@ -->
-
+
</table>
</body>
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
editor. If you managed to take a valid file and break it this
badly using the web-based editor, please file a bug report!</p>
<p>When you've fixed the problem, you can go back into the edit
- interface using the menu below, or by clicking <a
+ interface using the menu below, or by clicking <a
href="edit-actions-list?f=@f@">here</a>.
</p>
</td>
</td>
</tr>
<!-- if-have-help-info-end@ -->
-
+
</table>
</body>
# Original Author: Copyright (C) 2001 Jonathan Foster
# http://www.jon-foster.co.uk/
#
-# This program is free software; you can redistribute it
+# 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
/*
* CSS for Privoxy CGI and script output
*
- * $Id: cgi-style.css,v 1.12 2007/12/11 21:20:53 fabiankeil Exp $
+ * $Id: cgi-style.css,v 1.13 2009/05/16 13:27:21 fabiankeil Exp $
*/
/*
/*
* Let the URL and pattern input fields scale with the browser
* width and try to prevent vertical scroll bars if the width
- * is less than 80 characters.
+ * is less than 80 characters.
*/
input.url, input.pattern { width: 95%; }
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
<tr>
<td class="status">
503
- </td>
+ </td>
<td class="title" style="width: 100%">
#include mod-title
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
</td>
</tr>
<!-- if-have-help-info-end@ -->
-
+
</table>
</body>
# Original Author: Copyright (C) 2001 Jonathan Foster
# http://www.jon-foster.co.uk/
#
-# This program is free software; you can redistribute it
+# 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
#
# Purpose : Template used to edit the actions associated with a
# particular section in an actions file.
-#
+#
#
# Copyright : Written by and Copyright (C) 2001-2008 the SourceForge
# Privoxy team. http://www.privoxy.org/
id="change_x_forwarded_for_mode_block" @change-x-forwarded-for-param-block@><label
for="change_x_forwarded_for_mode_block">Block the header.</label><br>
<input type="radio" name="change_x_forwarded_for_mode" value="add"
- id="change_x_forwarded_for_mode_add" @change-x-forwarded-for-param-add@><label
+ id="change_x_forwarded_for_mode_add" @change-x-forwarded-for-param-add@><label
for="change_x_forwarded_for_mode_add">Add the header.</label><br>
</tr>
<tr class="bg1" align="left" valign="top">
<td>Use the <input type="radio" name="deanimate_gifs_mode"
value="first" id="deanimate_first" @deanimate-gifs-param-first@><label
for="deanimate_first">first frame</label> <input
- type="radio" name="deanimate_gifs_mode" value="last"
+ type="radio" name="deanimate_gifs_mode" value="last"
id="deanimate_last" @deanimate-gifs-param-last@><label
for="deanimate_last">last frame</label></td>
</tr>
value="simple-check" id="fast_redirects_simple_check" @fast-redirects-param-simple-check@><label
for="fast_redirects_simple_check">Simple check.</label>
<br>
- <input type="radio" name="fast_redirects_mode" value="check-decoded-url"
+ <input type="radio" name="fast_redirects_mode" value="check-decoded-url"
id="fast_redirects_check_decoded_url" @fast-redirects-param-check-decoded-url@><label
for="fast_redirects_check_decoded_url">Decode URL before checking.</label></td>
</tr>
<td> </td>
<td>
Overriding forward directive:<br>
- <input type="text" name="forward_override_param"
+ <input type="text" name="forward_override_param"
id="forward_override_param" size="40"
value="@forward-override-param@"><br>
</td>
onclick="hide_accept_language_param_disable(false)"
@hide-accept-language-param-custom@ id="hide_accept_language_mode_set"><label
for="hide_accept_language_mode_set">Fake these language settings:</label><br>
- <input type="text" name="hide_accept_language_param"
+ <input type="text" name="hide_accept_language_param"
id="hide_accept_language_param" size="40"
value="@hide-accept-language-param@"><br>
</td>
onclick="hide_content_disposition_param_disable(false)"
@hide-content-disposition-param-custom@ id="hide_content_disposition_mode_set"><label
for="hide_content_disposition_mode_set">Overwrite content-dispostion header with:</label><br>
- <input type="text" name="hide_content_disposition_param"
+ <input type="text" name="hide_content_disposition_param"
id="hide_content_disposition_param" size="40"
value="@hide-content-disposition-param@"><br>
</td>
onclick="hide_from_header_param_disable(true);"
@hide-from-header-param-block@ id="hide_from_header_mode_block"><label
for="hide_from_header_mode_block">Remove completely</label><br>
- <input type="radio" name="hide_from_header_mode" value="CUSTOM"
+ <input type="radio" name="hide_from_header_mode" value="CUSTOM"
onclick="hide_from_header_param_disable(false);"
@hide-from-header-param-custom@ id="hide_from_header_mode_set"><label
for="hide_from_header_mode_set">Fake e-mail address:</label><br>
onclick="hide_if_modified_since_param_disable(true)"
@hide-if-modified-since-param-custom@ id="hide_if_modified_since_mode_set"><label
for="hide_if_modified_since_mode_set">Add random amount of seconds in the range of</label>
- <input type="text" name="hide_if_modified_since_param"
+ <input type="text" name="hide_if_modified_since_param"
id="hide_if_modified_since_param" size="4"
value="@hide-if-modified-since-param@"> minute(s).
To appreciate this option a small amount of paranoia is required,
onclick="hide_referrer_param_disable(false)"
@hide-referrer-param-custom@ id="hide_referrer_mode_set"><label
for="hide_referrer_mode_set">Fake as this web address:</label><br>
- <input type="text" name="hide_referrer_param"
+ <input type="text" name="hide_referrer_param"
id="hide_referrer_param" size="40"
value="@hide-referrer-param@"><br>
<input type="radio" name="hide_referrer_mode" value="conditional-block"
("per-session") ones, which only last until you close your web
browser. This will allow you to use sites that require cookies, but
sites will not be able to track you across sessions. For this to
- be useful, you should disable
+ be useful, you should disable
<a href="@user-manual@@actions-help-prefix@CRUNCH-OUTGOING-COOKIES"><b>crunch-outgoing-cookies</b></a> and
<a href="@user-manual@@actions-help-prefix@CRUNCH-INCOMING-COOKIES"><b>crunch-incoming-cookies</b></a>.</td>
</tr>
alt="pattern">)</label><br>
<input type="radio" name="set_image_blocker_mode" value="blank"
onclick="set_image_blocker_param_disable(true)"
- id="set_image_blocker_mode_blank" @set-image-blocker-param-blank@><label
+ id="set_image_blocker_mode_blank" @set-image-blocker-param-blank@><label
for="set_image_blocker_mode_blank">Send a 1x1 transparent GIF</label><br>
<input type="radio" name="set_image_blocker_mode" value="CUSTOM"
onclick="set_image_blocker_param_disable(false)"
#
# Purpose : Template that is included from most of Privoxy's CGI pages
# to show the user how to get help or report problems.
-#
+#
#
# Copyright : Written by and Copyright (C) 2002-2007 members of
# the SourceForge Privoxy team. http://www.privoxy.org/
#
-# This template is free software; you can redistribute it
+# This template 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
# File : $Source: /cvsroot/ijbswa/current/templates/edit-actions-list,v $
#
# Purpose : Template used to edit the actions file.
-#
+#
#
# Copyright : Written by and Copyright (C) 2001-2009 the
# Privoxy team. http://www.privoxy.org/
# Original Author: Copyright (C) 2001 Jonathan Foster
# http://www.jon-foster.co.uk/
#
-# This program is free software; you can redistribute it
+# 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
<td class="info">
<h2>What is all this?</h2>
<p>
- If you haven't already done so, it is <b>strongly recommended</b> that you at
+ If you haven't already done so, it is <b>strongly recommended</b> that you at
least skim <a href="@user-manual@@actions-help-prefix@ACTIONS-FILE">the
chapter on actions files</a> in the <a href="@user-manual@">User Manual</a>
before making any changes. You will also find a comprehensive list of
<!-- @if-default-action-then@ -->
<p>
This is the default action file. Updates for it are available from
- <a href="http://www.privoxy.org/">Privoxy.org</a> from time to time.
+ <a href="http://www.privoxy.org/">Privoxy.org</a> from time to time.
It is therefore <b>not recommended</b> that you add your private
rules here, since they will be lost if you install an update in the future.
Put your rules in a separate actions file, like <tt>user.action</tt> instead.
# File : $Source: /cvsroot/ijbswa/current/templates/edit-actions-list-button,v $
#
# Purpose : Template which forms part of edit-actions-list
-#
+#
#
# Copyright : Written by and Copyright (C) 2001 the SourceForge
# Privoxy team. http://www.privoxy.org/
# Original Author: Copyright (C) 2001 Jonathan Foster
# http://www.jon-foster.co.uk/
#
-# This program is free software; you can redistribute it
+# 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
# File : $Source: /cvsroot/ijbswa/current/templates/edit-actions-list-section,v $
#
# Purpose : Template which forms part of edit-actions-list
-#
+#
#
# Copyright : Written by and Copyright (C) 2001 the SourceForge
# Privoxy team. http://www.privoxy.org/
# Original Author: Copyright (C) 2001 Jonathan Foster
# http://www.jon-foster.co.uk/
#
-# This program is free software; you can redistribute it
+# 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
# File : $Source: /cvsroot/ijbswa/current/templates/edit-actions-list-url,v $
#
# Purpose : Template which forms part of edit-actions-list
-#
+#
#
# Copyright : Written by and Copyright (C) 2001 the SourceForge
# Privoxy team. http://www.privoxy.org/
# Original Author: Copyright (C) 2001 Jonathan Foster
# http://www.jon-foster.co.uk/
#
-# This program is free software; you can redistribute it
+# 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
# Purpose : Template used to confirm removal of a particular URL
# pattern from an actions file. Only used on browsers that
# don't support JavaScript.
-#
+#
#
# Copyright : Written by and Copyright (C) 2001 the SourceForge
# Privoxy team. http://www.privoxy.org/
# Original Author: Copyright (C) 2001 Jonathan Foster
# http://www.jon-foster.co.uk/
#
-# This program is free software; you can redistribute it
+# 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
# Original Author: Copyright (C) 2001 Jonathan Foster
# http://www.jon-foster.co.uk/
#
-# This program is free software; you can redistribute it
+# 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
#
# Template files are written in plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
<tr>
<td class="status">
503
- </td>
+ </td>
<td class="title" style="width: 100%">
#include mod-title
<h2>Local Privoxy support:</h2>
<!-- @if-have-proxy-info-start -->
- <p>You can consult the <a href="@proxy-info-url@">online documentation</a> for more information about this Privoxy installation.</p>
+ <p>You can consult the <a href="@proxy-info-url@">online documentation</a> for more information about this Privoxy installation.</p>
<!-- if-have-proxy-info-end@ -->
<!-- @if-have-adminaddr-info-start -->
#
# Purpose : Template that is included from most of Privoxy's CGI pages
# to show the user how to get help or report problems.
-#
+#
#
# Copyright : Written by and Copyright (C) 2002-2009 members of
# the Privoxy team. http://www.privoxy.org/
#
-# This template is free software; you can redistribute it
+# This template 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
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
<tr>
<td class="status">
404
- </td>
+ </td>
<td class="title" style="width: 100%">
#include mod-title
</td>
</tr>
<!-- if-have-help-info-end@ -->
-
+
</table>
</body>
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
<p>
Here you see the original headers that your client sent when requesting this page, along with
the headers that Privoxy would have sent to the remote server if this request hadn't been
- intercepted.
+ intercepted.
</p>
<h3>Original Client Request:</h3>
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
#
# redirect-url:
# The URL to a script that will redirect to the Privoxy
-# documentation for a given item
+# documentation for a given item
# invocation:
# The command line with which Privoxy was invoked
# options:
# A HTML-formatted list of all conditional #defines used when
# Privoxy was compiled
#
-#
+#
# CONDITIONAL SYMBOLS FOR THIS TEMPLATE AND THEIR DEPANDANT SYMBOLS:
# ------------------------------------------------------------------
#
<!-- @if-have-no-stats-start -->
There haven't been any requests so far.
<!-- if-have-no-stats-end@ -->
- </p>
+ </p>
</td>
</tr>
<!-- if-statistics-end@ -->
<td class="box">
<h2>Conditional #defines:</h2>
<table summary="The state of some ./configure options and what they do." border="1" style="margin-left: 10px">
- <tr>
+ <tr>
<th>#define</th> <th>Enabled?</th> <th>Effects when enabled</th>
</tr>
<td><code>FEATURE_IMAGE_DETECT_MSIE</code></td>
<td>@if-FEATURE_IMAGE_DETECT_MSIE-then@ Yes @else-not-FEATURE_IMAGE_DETECT_MSIE@ No @endif-FEATURE_IMAGE_DETECT_MSIE@</td>
<td>Enables automatic detection of image and HTML requests from
- Microsoft Internet Explorer users, overriding the setting of
+ Microsoft Internet Explorer users, overriding the setting of
+image in the actions file.</td>
</tr>
<tr>
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
# filepath
# The complete filename of the file being shown
#
-#
+#
# CONDITIONAL SYMBOLS FOR THIS TEMPLATE AND THEIR DEPANDANT SYMBOLS:
# ------------------------------------------------------------------
#
<pre>@contents@</pre>
</td>
</tr>
-
+
<tr>
<td class="box">
<h2>More Privoxy:</h2>
# Copyright : Written by and Copyright (C) 2001-2007 the SourceForge
# Privoxy team. http://www.privoxy.org/
#
-# This program is free software; you can redistribute it
+# 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
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
<tr>
<td class="box">
- <h2>Look up the actions for a
+ <h2>Look up the actions for a
<!-- @if-url-given-start -->new<!-- if-url-given-end@ -->
URL:</h2>
<form method="GET" action="@default-cgi@show-url-info">
<p>
- <input type="text" name="url" size="80" value="@url@" class="url">
+ <input type="text" name="url" size="80" value="@url@" class="url">
<input type="submit" value="Go">
</p>
</form>
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
#
# redirect-url:
# The URL to a script that will redirect to the Privoxy
-# documentation for a given item
+# documentation for a given item
# invocation:
# The command line with whitch Privoxy was invoked
# options:
# A HTML-formatted list of all conditional #defines used when
# Privoxy was compiled
#
-#
+#
# CONDITIONAL SYMBOLS FOR THIS TEMPLATE AND THEIR DEPANDANT SYMBOLS:
# ------------------------------------------------------------------
#
<td class="box">
<h2>Source code versions:</h2>
<p><i>(Note: This information is only relevant if you checked out Privoxy from CVS
- and compiled it yourself. If you downloaded a binary, .exe, RPM, or a .tgz file,
- then when you ask for support just mention the version number <b>@version@</b>
+ and compiled it yourself. If you downloaded a binary, .exe, RPM, or a .tgz file,
+ then when you ask for support just mention the version number <b>@version@</b>
and the type of download you got.)</i>
</p>
<pre>@sourceversions@</pre>
<td class="info">
#include mod-support-and-service
-
+
</td>
</tr>
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
<td class="box">
<h2>Bookmarklets</h2>
<p>Here are some bookmarklets to allow you to easily access a
- "mini" version of this page. They are known to work with MS
+ "mini" version of this page. They are known to work with MS
Internet Explorer, Netscape and Mozilla, but should work equally
well in other browsers which support JavaScript. They are designed
to run directly from your bookmarks - <b>not</b> by clicking the
</td>
</tr>
<!-- if-have-help-info-end@ -->
-
+
</table>
</body>
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
<body>
<p class="whiteframed">
- <a href="@default-cgi@" target="_blank">Privoxy</a> is
+ <a href="@default-cgi@" target="_blank">Privoxy</a> is
<b>@if-enabled-display-then@enabled@else-not-enabled-display@disabled@endif-enabled-display@</b>.
<br><a href="@default-cgi@toggle?mini=y&set=@if-enabled-display-then@disable@else-not-enabled-display@enable@endif-enabled-display@"
>@if-enabled-display-then@[Disable]@else-not-enabled-display@[Enable]@endif-enabled-display@</a> |
#
# Template files are written win plain HTML, with a few
# additions:
-#
+#
# - Lines that start with a '#' character like this one
# are ignored
#
# strings @if-<name>start and if-<name>-end@. The strings
# should be placed in HTML comments (<!-- -->), so the
# html structure won't be messed when the magic happens.
-#
+#
# USABLE SYMBOLS IN THIS TEMPLATE:
# --------------------------------
#
# force-support:
# Privoxy has been compiled with support for forced loading
# of blocked content. In that case, the symbol "force-prefix" is
-# avaiable, which translates to the FORCE_PREFIX
+# avaiable, which translates to the FORCE_PREFIX
# have-trust-info:
# There were URLs with info on the trust policy defined in the config
# file. In this case the list of URLs is available through the
UNTRUSTED
</td>
<td class="title" style="width: 100%">
-
+
#include mod-title
-
+
</td>
</tr>
</td>
</tr>
<!-- if-have-help-info-end@ -->
-
+
</table>
</body>
-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.60 2011/04/19 13:00:47 fabiankeil Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.61 2011/05/22 10:25:26 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
/*
* Check for * URI. If found, we're done.
- */
+ */
if (*http->url == '*')
{
if ( NULL == (http->path = strdup("*"))
- || NULL == (http->hostport = strdup("")) )
+ || NULL == (http->hostport = strdup("")) )
{
return JB_ERR_MEMORY;
}
* Microsoft webDAV extension for Exchange 2000. See:
* http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0001.html
* http://msdn.microsoft.com/library/en-us/wss/wss/_webdav_methods.asp
- */
+ */
"BCOPY", "BMOVE", "BDELETE", "BPROPFIND", "BPROPPATCH",
/*
* Another Microsoft webDAV extension for Exchange 2000. See:
* http://systems.cs.colorado.edu/grunwald/MobileComputing/Papers/draft-cohen-gena-p-base-00.txt
* http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0001.html
* http://msdn.microsoft.com/library/en-us/wss/wss/_webdav_methods.asp
- */
+ */
"SUBSCRIBE", "UNSUBSCRIBE", "NOTIFY", "POLL",
/*
* Yet another WebDAV extension, this time for
url->unanchored |= ANCHOR_LEFT;
}
- /*
+ /*
* Split domain into components
*/
url->dbuffer = strdup(host_pattern);
return JB_ERR_MEMORY;
}
- /*
+ /*
* Map to lower case
*/
for (p = url->dbuffer; *p ; p++)
*p = (char)tolower((int)(unsigned char)*p);
}
- /*
+ /*
* Split the domain name into components
*/
url->dcount = ssplit(url->dbuffer, ".", v, SZ(v), 1, 1);
}
else if (url->dcount != 0)
{
- /*
+ /*
* Save a copy of the pointers in dvec
*/
size = (size_t)url->dcount * sizeof(*url->dvec);
-
+
url->dvec = (char **)malloc(size);
if (NULL == url->dvec)
{
{
const unsigned char *pat = (const unsigned char *)pattern;
const unsigned char *txt = (const unsigned char *)text;
- const unsigned char *fallback = pat;
+ const unsigned char *fallback = pat;
int wildcard = 0;
-
+
unsigned char lastchar = 'a';
unsigned i;
unsigned char charmap[32];
-
+
while (*txt)
{
}
/* '*' in the pattern? */
- if (*pat == '*')
+ if (*pat == '*')
{
-
+
/* The pattern ends afterwards? Speed up the return. */
if (*++pat == '\0')
{
return 0;
}
-
+
/* Else, set wildcard mode and remember position after '*' */
wildcard = 1;
fallback = pat;
while (*++pat != ']')
{
if (!*pat)
- {
+ {
return 1;
}
else if (*pat == '-')
for (i = lastchar; i <= *pat; i++)
{
charmap[i / 8] |= (unsigned char)(1 << (i % 8));
- }
+ }
}
else
{
} /* -END- if Character range specification */
- /*
- * Char match, or char range match?
+ /*
+ * Char match, or char range match?
*/
if ( (*pat == *txt)
|| (*pat == '?')
|| ((*pat == ']') && (charmap[*txt / 8] & (1 << (*txt % 8)))) )
{
- /*
+ /*
* Success: Go ahead
*/
pat++;
}
else if (!wildcard)
{
- /*
+ /*
* No match && no wildcard: No luck
*/
return 1;
{
/* It's a tag pattern and shouldn't be matched against URLs */
return 0;
- }
+ }
return (port_matches(http->port, pattern->port_list)
&& host_matches(http, pattern) && path_matches(http->path, pattern));
#ifndef URLMATCH_H_INCLUDED
#define URLMATCH_H_INCLUDED
-#define URLMATCH_H_VERSION "$Id: urlmatch.h,v 1.15 2009/05/16 13:27:20 fabiankeil Exp $"
+#define URLMATCH_H_VERSION "$Id: urlmatch.h,v 1.16 2009/06/03 16:42:49 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.h,v $
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char w32log_rcs[] = "$Id: w32log.c,v 1.38 2010/08/14 23:28:52 ler762 Exp $";
+const char w32log_rcs[] = "$Id: w32log.c,v 1.39 2011/05/27 11:34:16 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/w32log.c,v $
* Written by and Copyright (C) 1999 Adam Lock
* <locka@iol.ie>
*
- * This program is free software; you can redistribute it
+ * 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
range.cpMin = SendMessage (g_hwndLogBox, WM_GETTEXTLENGTH, 0, 0);
range.cpMax = -1;
SendMessage(g_hwndLogBox, EM_EXSETSEL, 0, (LPARAM) &range);
-
+
/* restore vertical ScrollBar stuff (messed up by AUTOVSCROLL) */
SendMessage (g_hwndLogBox, EM_SCROLL, SB_LINEDOWN, 0);
-
+
}
-}
+}
/*********************************************************************
{
SetForegroundWindow(g_hwndLogFrame);
SetWindowPos(g_hwndLogFrame, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE);
-
+
}
else if (g_bShowOnTaskBar)
{
#ifndef W32LOG_H_INCLUDED
#define W32LOG_H_INCLUDED
-#define W32LOG_H_VERSION "$Id: w32log.h,v 1.14 2009/05/16 13:27:20 fabiankeil Exp $"
+#define W32LOG_H_VERSION "$Id: w32log.h,v 1.15 2010/08/14 23:28:52 ler762 Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/w32log.h,v $
* Written by and Copyright (C) 1999 Adam Lock
* <locka@iol.ie>
*
- * This program is free software; you can redistribute it
+ * 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
#ifndef W32RES_H_INCLUDED
#define W32RES_H_INCLUDED
-#define W32RES_H_VERSION "$Id: w32res.h,v 1.18 2009/05/16 13:27:20 fabiankeil Exp $"
+#define W32RES_H_VERSION "$Id: w32res.h,v 1.19 2010/08/16 21:39:19 ler762 Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/w32res.h,v $
* the Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
- * by and Copyright (C) 1997 Anonymous Coders and
+ * by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*
- * This program is free software; you can redistribute it
+ * 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
-const char w32_svrapi_rcs[] = "$Id: w32svrapi.c,v 1.3 2009/05/16 13:27:20 fabiankeil Exp $";
+const char w32_svrapi_rcs[] = "$Id: w32svrapi.c,v 1.4 2011/04/19 13:00:47 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/w32svrapi.c,v $
* some very helpful feedback and suggestions during the
* development of this code.
*
- * This program is free software; you can redistribute it
+ * 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
return FALSE;
}
- /* Try and connect to the SCM. If it fails check and see if the error
+ /* Try and connect to the SCM. If it fails check and see if the error
* code is ERROR_CALL_NOT_IMPLEMENTED, which means:
* "This function is not supported on this system."
*/
* The Service functions are defined in <winsvc.h> which is where
* the declarations used in this file are taken from
*
- *********************************************************************/
+ *********************************************************************/
/*********************************************************************
* Open a connection to the service control manager
- *********************************************************************/
+ *********************************************************************/
SC_HANDLE w32_open_sc_manager(
LPCTSTR lpMachineName, /* computer name */
LPCTSTR lpDatabaseName, /* SCM database name */
*/
FreeLibrary(hDll);
SetLastError(dwLastErr);
-
+
return hScm;
} /* -END- w32_open_sc_manager */
/*********************************************************************
* Open a service
- *********************************************************************/
+ *********************************************************************/
SC_HANDLE w32_open_service(
SC_HANDLE hSCManager, /* handle to SCM database */
LPCTSTR lpServiceName, /* service name */
*/
FreeLibrary(hDll);
SetLastError(dwLastErr);
-
+
return hSrv;
} /* -END- w32_open_service */
*/
FreeLibrary(hDll);
SetLastError(dwLastErr);
-
+
return hSrv;
} /* -END- w32_create_service */
#else
if (bIsError)
{
- MessageBox(NULL, msg, "Privoxy Error",
+ MessageBox(NULL, msg, "Privoxy Error",
MB_OK | MB_ICONERROR | MB_TASKMODAL | MB_SETFOREGROUND | MB_TOPMOST);
}
else
{
- MessageBox(NULL, msg, "Privoxy Information",
+ MessageBox(NULL, msg, "Privoxy Information",
MB_OK | MB_ICONINFORMATION | MB_TASKMODAL | MB_SETFOREGROUND | MB_TOPMOST);
}
#endif
* We'll temporarily use szDisplayName as a second buffer.
*********************************************************************/
GetModuleFileName(NULL, szDisplayName, MAX_PATH);
- sprintf(szModule, "\"%s\" --service", szDisplayName);
+ sprintf(szModule, "\"%s\" --service", szDisplayName);
+
-
/*********************************************************************
* Get the display name for the service
*********************************************************************/
/*********************************************************************
* Create the service
*********************************************************************/
- hService = w32_create_service(hSCM,
+ hService = w32_create_service(hSCM,
service_name, /* the internal service name */
szDisplayName, /* the display name */
SERVICE_ALL_ACCESS, /* get full access during creation */
{
int child_id;
- /* Arg zero is always the service name, and we need to
+ /* Arg zero is always the service name, and we need to
* know it when we call RegisterServiceCtrlHandler.
*/
strcpy(szThisServiceName, pszArgs[0]);
#ifndef W32_SVRAPI_H_INCLUDED
#define W32_SVRAPI_H_INCLUDED
-#define W32_SVRAPI_H_VERSION "$Id: w32svrapi.h,v 1.1 2006/08/12 03:54:37 david__schmidt Exp $"
+#define W32_SVRAPI_H_VERSION "$Id: w32svrapi.h,v 1.2 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/w32svrapi.h,v $
* development of this code.
*
*
- * This program is free software; you can redistribute it
+ * 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
#endif
#endif /* ndef W32_SVRAPI_H_INCLUDED */
-
+
-const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.10 2006/09/23 13:26:38 roro Exp $";
+const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.11 2009/05/16 13:27:20 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/w32taskbar.c,v $
* Written by and Copyright (C) 1999 Adam Lock
* <locka@iol.ie>
*
- * This program is free software; you can redistribute it
+ * 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
#ifndef W32TASKBAR_H_INCLUDED
#define W32TASKBAR_H_INCLUDED
-#define W32TASKBAR_H_VERSION "$Id: w32taskbar.h,v 1.6 2006/07/18 14:48:48 david__schmidt Exp $"
+#define W32TASKBAR_H_VERSION "$Id: w32taskbar.h,v 1.7 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/w32taskbar.h,v $
* Written by and Copyright (C) 1999 Adam Lock
* <locka@iol.ie>
*
- * This program is free software; you can redistribute it
+ * 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
-const char win32_rcs[] = "$Id: win32.c,v 1.16 2009/05/16 13:27:20 fabiankeil Exp $";
+const char win32_rcs[] = "$Id: win32.c,v 1.17 2010/01/11 11:41:07 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/win32.c,v $
* Written by and Copyright (C) 1999 Adam Lock
* <locka@iol.ie>
*
- * This program is free software; you can redistribute it
+ * 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
#ifdef _WIN_CONSOLE
/**
- * Hide the console. If set, the program will disconnect from the
+ * Hide the console. If set, the program will disconnect from the
* console and run in the background. This allows the command-prompt
* window to close.
*/
if (WSAStartup(wVersionRequested, &wsaData) != 0)
{
#ifndef _WIN_CONSOLE
- MessageBox(NULL, "Cannot initialize WinSock library", "Privoxy Error",
- MB_OK | MB_ICONERROR | MB_TASKMODAL | MB_SETFOREGROUND | MB_TOPMOST);
+ MessageBox(NULL, "Cannot initialize WinSock library", "Privoxy Error",
+ MB_OK | MB_ICONERROR | MB_TASKMODAL | MB_SETFOREGROUND | MB_TOPMOST);
#endif
exit(1);
}
#ifndef WIN32_H_INCLUDED
#define WIN32_H_INCLUDED
-#define WIN32_H_VERSION "$Id: win32.h,v 1.7 2006/07/18 14:48:48 david__schmidt Exp $"
+#define WIN32_H_VERSION "$Id: win32.h,v 1.8 2009/05/16 13:27:20 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/win32.h,v $
* Written by and Copyright (C) 1999 Adam Lock
* <locka@iol.ie>
*
- * This program is free software; you can redistribute it
+ * 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
#endif
#endif /* ndef WIN32_H_INCLUDED */
-
+
/*
Local Variables:
tab-width: 3