#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
-/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.213 2016/03/17 10:40:53 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
# include <sys/socket.h>
# else
# include <stdint.h>
-# include <winsock2.h>
# include <ws2tcpip.h>
typedef unsigned short in_port_t;
# endif
#define ACTION_CRUNCH_CLIENT_HEADER 0x00200000UL
/** Action bitmap: Enable text mode by force */
#define ACTION_FORCE_TEXT_MODE 0x00400000UL
-/** Action bitmap: Enable text mode by force */
+/** Action bitmap: Remove the "If-None-Match" header. */
#define ACTION_CRUNCH_IF_NONE_MATCH 0x00800000UL
/** Action bitmap: Enable content-disposition crunching */
#define ACTION_HIDE_CONTENT_DISPOSITION 0x01000000UL
*/
#define CSP_FLAG_CRUNCHED 0x04000000U
+#ifdef FUZZ
+/**
+ * Flag for csp->flags: Set if we are working with fuzzed input
+ */
+#define CSP_FLAG_FUZZED_INPUT 0x08000000U
+#endif
/*
* Flags for use in return codes of child processes
unsigned long ip_addr_long;
#endif /* def HAVE_RFC2553 */
+ /** The host name and port (as a string of the form '<hostname>:<port>')
+ of the server socket to which the client connected. */
+ char *listen_addr_str;
+
/** The URL that was requested */
struct http_request http[1];
/** An I/O buffer used for buffering data read from the client */
struct iob client_iob[1];
+ /** Buffer used to briefly store data read from the network
+ * before forwarding or processing it.
+ */
+ char *receive_buffer;
+ size_t receive_buffer_size;
+
/** List of all headers for this request */
struct list headers[1];
#ifdef FEATURE_CLIENT_TAGS
/** List of all tags that apply to this client (assigned based on address) */
struct list client_tags[1];
+ /** The address of the client the request (presumably) came from.
+ * Either the address returned by accept(), or the address provided
+ * with the X-Forwarded-For header, provided Privoxy has been configured
+ * to use it.
+ */
+ char *client_address;
#endif
/** MIME-Type key, see CT_* above */
/** IP addresses to bind to. Defaults to HADDR_DEFAULT == 127.0.0.1. */
const char *haddr[MAX_LISTENING_SOCKETS];
+ /** Trusted referring site that can be used to reach CGI
+ * pages that aren't marked as harmful.
+ */
+ const char *trusted_cgi_referrer;
+
/** Ports to bind to. Defaults to HADDR_PORT == 8118. */
int hport[MAX_LISTENING_SOCKETS];
/** Size limit for IOB */
size_t buffer_limit;
+ /** Size of the receive buffer */
+ size_t receive_buffer_size;
+
+ /** Use accf_http(4) if available */
+ int enable_accept_filter;
+
+ /** Backlog passed to listen() */
+ int listen_backlog;
+
#ifdef FEATURE_TRUST
/** The file name of the trust file. */
/* Maximum number of seconds a temporarily enabled tag stays enabled. */
unsigned int client_tag_lifetime;
#endif /* def FEATURE_CLIENT_TAGS */
+ int trust_x_forwarded_for;
#ifdef FEATURE_ACL