http://xpisar.wz.cz/privoxy-ipv6/ Use privoxy-3.0.6-stable-ipv6.diff.bz2
and stripped. This is not 3.0.7 compatible yet, but a step forward.
## DP: adapted to the 3.0 branch of privoxy by Roland Rosenfeld
## DP: adapted to 3.0.4 by higuita, but i'm no programmer, so i hope i
## DP: didnt broke anything :)
## DP: adapted to the 3.0 branch of privoxy by Roland Rosenfeld
## DP: adapted to 3.0.4 by higuita, but i'm no programmer, so i hope i
## DP: didnt broke anything :)
+## DP: adapted to 3.0.6 by Petr Písa?? petrp@users.sf.net found on
+## DP: http://xpisar.wz.cz/privoxy-ipv6/ Use privoxy-3.0.6-stable-ipv6.diff.bz2
+## DP: and stripped
@DPATCH@
diff -urNad privoxy~/GNUmakefile.in privoxy/GNUmakefile.in
@DPATCH@
diff -urNad privoxy~/GNUmakefile.in privoxy/GNUmakefile.in
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
*********************************************************************/
struct map *default_exports(const struct client_state *csp, const char *caller)
{
*********************************************************************/
struct map *default_exports(const struct client_state *csp, const char *caller)
{
jb_err err;
struct map * exports;
int local_help_exists = 0;
jb_err err;
struct map * exports;
int local_help_exists = 0;
if (!err) err = map_block_killer(exports, "can-toggle");
#endif
if (!err) err = map_block_killer(exports, "can-toggle");
#endif
diff -urNad privoxy~/errlog.c privoxy/errlog.c
--- privoxy~/errlog.c
+++ privoxy/errlog.c
diff -urNad privoxy~/errlog.c privoxy/errlog.c
--- privoxy~/errlog.c
+++ privoxy/errlog.c
break;
case 'E':
/* Non-standard: Print error code from errno */
break;
case 'E':
/* Non-standard: Print error code from errno */
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
#include "jbsockets.h"
#include "filters.h"
#include "errlog.h"
#include "jbsockets.h"
#include "filters.h"
#include "errlog.h"
const char jbsockets_h_rcs[] = JBSOCKETS_H_VERSION;
const char jbsockets_h_rcs[] = JBSOCKETS_H_VERSION;
* that this is allowed according to ACL.
*
* Parameters :
* that this is allowed according to ACL.
*
* Parameters :
/*********************************************************************
*
/*********************************************************************
*
#ifdef _WIN32
if (fd == JB_INVALID_SOCKET)
#ifdef _WIN32
if (fd == JB_INVALID_SOCKET)
*/
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof(one));
#endif /* ndef _WIN32 */
*/
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof(one));
#endif /* ndef _WIN32 */
{
#ifdef _WIN32
errno = WSAGetLastError();
{
#ifdef _WIN32
errno = WSAGetLastError();
/*********************************************************************
*
/*********************************************************************
*
* Function : accept_connection
*
* Description : Accepts a connection on a socket. Socket must have
* Function : accept_connection
*
* Description : Accepts a connection on a socket. Socket must have
*********************************************************************/
int accept_connection(struct client_state * csp, jb_socket fd)
{
*********************************************************************/
int accept_connection(struct client_state * csp, jb_socket fd)
{
jb_socket afd;
#if defined(_WIN32) || defined(__OS2__) || defined(__APPLE_CC__) || defined(AMIGA)
/* Wierdness - fix a warning. */
jb_socket afd;
#if defined(_WIN32) || defined(__OS2__) || defined(__APPLE_CC__) || defined(AMIGA)
/* Wierdness - fix a warning. */
#else
socklen_t c_length, s_length;
#endif
#else
socklen_t c_length, s_length;
#endif
c_length = s_length = sizeof(client);
c_length = s_length = sizeof(client);
/*
* Determine the IP-Adress that the client used to reach us
/*
* Determine the IP-Adress that the client used to reach us
*/
if (!getsockname(afd, (struct sockaddr *) &server, &s_length))
{
*/
if (!getsockname(afd, (struct sockaddr *) &server, &s_length))
{
+ log_error(LOG_LEVEL_ERROR, "accept: Could not get my own hostname because %E");
+ strncpy(hostname,"unknown host",NI_MAXHOST);
}
+ log_error(LOG_LEVEL_ERROR, "accept: Could not get my own hostname because %E");
+ strncpy(hostname,"unknown host",NI_MAXHOST);
}
--#elif defined(OSX_DARWIN) || defined(__OpenBSD__)
- pthread_mutex_lock(&gethostbyaddr_mutex);
- host = gethostbyaddr((const char *)&server.sin_addr,
- sizeof(server.sin_addr), AF_INET);
- pthread_mutex_lock(&gethostbyaddr_mutex);
- host = gethostbyaddr((const char *)&server.sin_addr,
- sizeof(server.sin_addr), AF_INET);
*
* Function : resolve_hostname_to_ip
*
*
* Function : resolve_hostname_to_ip
*
--#elif defined(OSX_DARWIN) || defined(__OpenBSD__)
- pthread_mutex_lock(&gethostbyname_mutex);
- while ( NULL == (hostp = gethostbyname(host))
- && (h_errno == TRY_AGAIN) && (dns_retries++ < 10) )
- pthread_mutex_lock(&gethostbyname_mutex);
- while ( NULL == (hostp = gethostbyname(host))
- && (h_errno == TRY_AGAIN) && (dns_retries++ < 10) )
diff -urNad privoxy~/jcc.c privoxy/jcc.c
--- privoxy~/jcc.c
+++ privoxy/jcc.c
diff -urNad privoxy~/jcc.c privoxy/jcc.c
--- privoxy~/jcc.c
+++ privoxy/jcc.c
#include "cgi.h"
#include "loadcfg.h"
#include "urlmatch.h"
#include "cgi.h"
#include "loadcfg.h"
#include "urlmatch.h"
const char jcc_h_rcs[] = JCC_H_VERSION;
const char project_h_rcs[] = PROJECT_H_VERSION;
const char jcc_h_rcs[] = JCC_H_VERSION;
const char project_h_rcs[] = PROJECT_H_VERSION;
* Returns : Port that was opened.
*
*********************************************************************/
* Returns : Port that was opened.
*
*********************************************************************/
static void listen_loop(void)
{
struct client_state *csp = NULL;
static void listen_loop(void)
{
struct client_state *csp = NULL;
#ifdef FEATURE_GRACEFUL_TERMINATION
while (!g_terminate)
#ifdef FEATURE_GRACEFUL_TERMINATION
while (!g_terminate)
* that this will hurt people's feelings.
*/
* that this will hurt people's feelings.
*/
{
log_error(LOG_LEVEL_CONNECT, "accept failed: %E");
{
log_error(LOG_LEVEL_CONNECT, "accept failed: %E");
log_error(LOG_LEVEL_CONNECT, "OK");
}
log_error(LOG_LEVEL_CONNECT, "OK");
}
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
#include "encode.h"
#include "urlmatch.h"
#include "cgi.h"
#include "encode.h"
#include "urlmatch.h"
#include "cgi.h"
const char loadcfg_h_rcs[] = LOADCFG_H_VERSION;
const char loadcfg_h_rcs[] = LOADCFG_H_VERSION;
struct forward_spec * next_fwd = cur_fwd->next;
free_url_spec(cur_fwd->url);
struct forward_spec * next_fwd = cur_fwd->next;
free_url_spec(cur_fwd->url);
free(cur_fwd);
cur_fwd = next_fwd;
}
free(cur_fwd);
cur_fwd = next_fwd;
}
freez(config->confdir);
freez(config->logdir);
freez(config->confdir);
freez(config->logdir);
freez(config->logfile);
for (i = 0; i < MAX_AF_FILES; i++)
freez(config->logfile);
for (i = 0; i < MAX_AF_FILES; i++)
* Returns : The configuration_spec, or NULL on error.
*
*********************************************************************/
* Returns : The configuration_spec, or NULL on error.
*
*********************************************************************/
struct configuration_spec * load_config(void)
{
char buf[BUFFER_SIZE];
struct configuration_spec * load_config(void)
{
char buf[BUFFER_SIZE];
fs->f = config = (struct configuration_spec *)zalloc(sizeof(*config));
if (config==NULL)
fs->f = config = (struct configuration_spec *)zalloc(sizeof(*config));
if (config==NULL)
/*
* This is backwards from how it's usually done.
/*
* This is backwards from how it's usually done.
* Set to defaults
*/
config->multi_threaded = 1;
* Set to defaults
*/
config->multi_threaded = 1;
config->buffer_limit = 4096 * 1024;
config->usermanual = strdup(USER_MANUAL_URL);
config->proxy_args = strdup("");
config->buffer_limit = 4096 * 1024;
config->usermanual = strdup(USER_MANUAL_URL);
config->proxy_args = strdup("");
char cmd[BUFFER_SIZE];
char arg[BUFFER_SIZE];
char tmp[BUFFER_SIZE];
char cmd[BUFFER_SIZE];
char arg[BUFFER_SIZE];
char tmp[BUFFER_SIZE];
struct forward_spec *cur_fwd;
int vec_count;
char *vec[3];
struct forward_spec *cur_fwd;
int vec_count;
char *vec[3];
* *************************************************************************/
#ifdef FEATURE_ACL
case hash_deny_access:
* *************************************************************************/
#ifdef FEATURE_ACL
case hash_deny_access:
#endif /* def FEATURE_ACL */
/* *************************************************************************
#endif /* def FEATURE_ACL */
/* *************************************************************************
if (strcmp(p, ".") != 0)
{
if (strcmp(p, ".") != 0)
{
cur_fwd->forward_port = 8000;
}
}
cur_fwd->forward_port = 8000;
}
}
if (strcmp(p, ".") != 0)
{
if (strcmp(p, ".") != 0)
{
cur_fwd->gateway_port = 1080;
}
}
cur_fwd->gateway_port = 1080;
}
}
if (strcmp(p, ".") != 0)
{
if (strcmp(p, ".") != 0)
{
cur_fwd->forward_port = 8000;
}
}
cur_fwd->forward_port = 8000;
}
}
/* Parse the SOCKS proxy host[:port] */
p = vec[1];
/* Parse the SOCKS proxy host[:port] */
p = vec[1];
}
/* Parse the parent HTTP proxy host[:port] */
}
/* Parse the parent HTTP proxy host[:port] */
if (strcmp(p, ".") != 0)
{
if (strcmp(p, ".") != 0)
{
cur_fwd->forward_port = 8000;
}
}
cur_fwd->forward_port = 8000;
}
}
* listen-address [ip][:port]
* *************************************************************************/
case hash_listen_address :
* listen-address [ip][:port]
* *************************************************************************/
case hash_listen_address :
/* *************************************************************************
* logdir directory-name
* *************************************************************************/
/* *************************************************************************
* logdir directory-name
* *************************************************************************/
* *************************************************************************/
#ifdef FEATURE_ACL
case hash_permit_access:
* *************************************************************************/
#ifdef FEATURE_ACL
case hash_permit_access:
continue;
#endif /* def FEATURE_ACL */
continue;
#endif /* def FEATURE_ACL */
}
#endif /* def FEATURE_COOKIE_JAR */
}
#endif /* def FEATURE_COOKIE_JAR */
struct configuration_spec * oldcfg = (struct configuration_spec *)
current_configfile->f;
/*
struct configuration_spec * oldcfg = (struct configuration_spec *)
current_configfile->f;
/*
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
* Junkbusters Corporation. http://www.junkbusters.com