and mark its second parameter immutable.
-const char cgi_rcs[] = "$Id: cgi.c,v 1.100 2007/10/17 18:40:53 fabiankeil Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.101 2008/02/03 15:45:06 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgi.c,v $
*
* Revisions :
* $Log: cgi.c,v $
+ * Revision 1.101 2008/02/03 15:45:06 fabiankeil
+ * Add SOCKS5 support for "Forwarding failure" CGI page.
+ *
* Revision 1.100 2007/10/17 18:40:53 fabiankeil
* - Send CGI pages as HTTP/1.1 unless the client asked for HTTP/1.0.
* - White space fix.
}
else if (!strcmp(templatename, "forwarding-failed"))
{
- const struct forward_spec * fwd = forward_url(csp->http, csp);
+ const struct forward_spec *fwd = forward_url(csp, csp->http);
char *socks_type = NULL;
if (fwd == NULL)
{
-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.63 2008/02/01 06:04:31 fabiankeil Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.64 2008/02/03 13:56:07 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
*
* Revisions :
* $Log: cgisimple.c,v $
+ * Revision 1.64 2008/02/03 13:56:07 fabiankeil
+ * Add SOCKS5 support for show-url-info CGI page.
+ *
* Revision 1.63 2008/02/01 06:04:31 fabiankeil
* If edit buttons on the show-url-info CGI page are hidden, explain why.
*
* display the proxy port and an eventual second forwarder.
*/
{
- const struct forward_spec * fwd = forward_url(url_to_query, csp);
+ const struct forward_spec *fwd = forward_url(csp, url_to_query);
if ((fwd->gateway_host == NULL) && (fwd->forward_host == NULL))
{
-const char filters_rcs[] = "$Id: filters.c,v 1.98 2008/01/04 17:43:45 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.99 2008/02/03 13:57:58 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
*
* Revisions :
* $Log: filters.c,v $
+ * Revision 1.99 2008/02/03 13:57:58 fabiankeil
+ * Add SOCKS5 support for forward-override{}.
+ *
* Revision 1.98 2008/01/04 17:43:45 fabiankeil
* Improve the warning messages that get logged if the action files
* "enable" filters but no filters of that type have been loaded.
* Invalid syntax is fatal.
*
*********************************************************************/
-static const struct forward_spec *get_forward_override_settings(struct client_state *csp)
+const static struct forward_spec *get_forward_override_settings(struct client_state *csp)
{
const char *forward_override_line = csp->action->string[ACTION_STRING_FORWARD_OVERRIDE];
char forward_settings[BUFFER_SIZE];
*
* Description : Should we forward this to another proxy?
*
- * XXX: Should be changed to make use of csp->fwd.
- *
* Parameters :
- * 1 : http = http_request request for current URL
- * 2 : csp = Current client state (buffers, headers, etc...)
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : http = http_request request for current URL
*
* Returns : Pointer to forwarding information.
*
*********************************************************************/
-const struct forward_spec * forward_url(struct http_request *http,
- struct client_state *csp)
+const struct forward_spec *forward_url(struct client_state *csp,
+ const struct http_request *http)
{
static const struct forward_spec fwd_default[1] = { FORWARD_SPEC_INITIALIZER };
struct forward_spec *fwd = csp->config->forward;
#ifndef FILTERS_H_INCLUDED
#define FILTERS_H_INCLUDED
-#define FILTERS_H_VERSION "$Id: filters.h,v 1.30 2007/09/29 10:21:16 fabiankeil Exp $"
+#define FILTERS_H_VERSION "$Id: filters.h,v 1.31 2007/10/19 16:53:28 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.h,v $
*
* Revisions :
* $Log: filters.h,v $
+ * Revision 1.31 2007/10/19 16:53:28 fabiankeil
+ * Add helper function to check if any content filters are enabled.
+ *
* Revision 1.30 2007/09/29 10:21:16 fabiankeil
* - Move get_filter_function() from jcc.c to filters.c
* so the filter functions can be static.
/*
* Determining parent proxies
*/
-extern const struct forward_spec *forward_url(struct http_request *http, struct client_state *csp);
+extern const struct forward_spec *forward_url(struct client_state *csp,
+ const struct http_request *http);
/*
* Content modification
/*
* Handling Max-Forwards:
*/
-extern struct http_response *direct_response( struct client_state *csp);
+extern struct http_response *direct_response(struct client_state *csp);
/*
-const char jcc_rcs[] = "$Id: jcc.c,v 1.164 2007/12/16 18:32:46 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.165 2008/02/02 19:36:56 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
*
* Revisions :
* $Log: jcc.c,v $
+ * Revision 1.165 2008/02/02 19:36:56 fabiankeil
+ * Remove the "Listening ... for local connections only" log message.
+ * Whether or not remote connections are able to reach Privoxy is up
+ * to the operating system.
+ *
* Revision 1.164 2007/12/16 18:32:46 fabiankeil
* Prevent the log messages for CONNECT requests to unacceptable
* ports from printing the limit-connect argument as [null] if
}
/* decide how to route the HTTP request */
- if (NULL == (fwd = forward_url(http, csp)))
+ fwd = forward_url(csp, http);
+ if (NULL == fwd)
{
log_error(LOG_LEVEL_FATAL, "gateway spec is NULL!?!? This can't happen!");
/* Never get here - LOG_LEVEL_FATAL causes program exit */