#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.99 2007/07/21 11:51:36 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.105 2008/03/21 11:16:27 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
* project. Does not define any variables or functions
* (though it does declare some macros).
*
- * Copyright : Written by and Copyright (C) 2001 - 2007 the SourceForge
+ * Copyright : Written by and Copyright (C) 2001-2008 the SourceForge
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
*
* Revisions :
* $Log: project.h,v $
+ * Revision 1.105 2008/03/21 11:16:27 fabiankeil
+ * Garbage-collect csp->my_ip_addr_str and csp->my_hostname.
+ *
+ * Revision 1.104 2008/03/04 18:30:40 fabiankeil
+ * Remove the treat-forbidden-connects-like-blocks action. We now
+ * use the "blocked" page for forbidden CONNECT requests by default.
+ *
+ * Revision 1.103 2008/03/01 14:00:45 fabiankeil
+ * Let the block action take the reason for the block
+ * as argument and show it on the "blocked" page.
+ *
+ * Revision 1.102 2008/02/03 13:46:14 fabiankeil
+ * Add SOCKS5 support. Patch #1862863 by Eric M. Hopper with minor changes.
+ *
+ * Revision 1.101 2007/12/07 18:29:23 fabiankeil
+ * Remove now-obsolete csp member x_forwarded.
+ *
+ * Revision 1.100 2007/09/02 13:42:11 fabiankeil
+ * - Allow port lists in url patterns.
+ * - Ditch unused url_spec member pathlen.
+ *
* Revision 1.99 2007/07/21 11:51:36 fabiankeil
* As Hal noticed, checking dispatch_cgi() as the last cruncher
* looks like a bug if CGI requests are blocked unintentionally,
#define ACTION_HANDLE_AS_EMPTY_DOCUMENT 0x08000000UL
/** Action bitmap: Redirect request. */
#define ACTION_REDIRECT 0x10000000UL
-/** Action bitmap: Answer blocked Connects verbosely */
-#define ACTION_TREAT_FORBIDDEN_CONNECTS_LIKE_BLOCKS 0x20000000UL
/** Action bitmap: Override the forward settings in the config file */
-#define ACTION_FORWARD_OVERRIDE 0x40000000UL
+#define ACTION_FORWARD_OVERRIDE 0x20000000UL
/** Action string index: How to deanimate GIFs */
#define ACTION_STRING_FAST_REDIRECTS 14
/** Action string index: Overriding forward rule. */
#define ACTION_STRING_FORWARD_OVERRIDE 15
+/** Action string index: Reason for the block. */
+#define ACTION_STRING_BLOCK 16
/** Number of string actions. */
-#define ACTION_STRING_COUNT 16
+#define ACTION_STRING_COUNT 17
/* To make the ugly hack in sed easier to understand */
/**
- * This structure is used to store the actions list.
+ * This structure is used to store action files.
*
- * It contains a URL pattern, and the chages to the actions.
- * It is a linked list.
+ * It contains an URL or tag pattern, and the changes to
+ * the actions. It's a linked list and should only be
+ * free'd through unload_actions_file() unless there's
+ * only a single entry.
*/
struct url_actions
{
- struct url_spec url[1]; /**< URL pattern. */
+ struct url_spec url[1]; /**< The URL or tag pattern. */
- struct action_spec action[1]; /**< Actions. */
+ struct action_spec *action; /**< Action settings that might be shared with
+ the list entry before or after the current
+ one and can't be free'd willy nilly. */
- struct url_actions * next; /**< Next action in file, or NULL. */
+ struct url_actions *next; /**< Next action section in file, or NULL. */
};
As a number. */
long ip_addr_long;
- /** Our IP address. I.e. the IP address that the client used to reach us,
- as a string. */
- char *my_ip_addr_str;
-
- /** Our hostname. I.e. the reverse DNS of the IP address that the client
- used to reach us, as a string. */
- char *my_hostname;
-
/** The URL that was requested */
struct http_request http[1];
/** MIME-Type key, see CT_* above */
unsigned int content_type;
- /** The "X-Forwarded-For:" header sent by the client */
- char *x_forwarded;
-
/** Actions files associated with this client */
struct file_list *actions_list[MAX_AF_FILES];
#define SOCKS_NONE 0 /**< Don't use a SOCKS server */
#define SOCKS_4 40 /**< original SOCKS 4 protocol */
#define SOCKS_4A 41 /**< as modified for hosts w/o external DNS */
+#define SOCKS_5 50 /**< as modified for hosts w/o external DNS */
/**
/** URL pattern that this forward_spec is for. */
struct url_spec url[1];
- /** Connection type. Must be SOCKS_NONE, SOCKS_4, or SOCKS_4A. */
+ /** Connection type. Must be SOCKS_NONE, SOCKS_4, SOCKS_4A or SOCKS_5. */
int type;
/** SOCKS server hostname. Only valid if "type" is SOCKS_4 or SOCKS_4A. */