-const char filters_rcs[] = "$Id: filters.c,v 1.196 2015/12/27 12:53:39 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.197 2016/01/16 12:29:17 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
/* Parse the parent HTTP proxy host:port */
http_parent = vec[1];
+ }
+ else if ((vec_count == 2) && !strcasecmp(vec[0], "forward-webserver"))
+ {
+ fwd->type = FORWARD_WEBSERVER;
+
+ /* Parse the parent HTTP server host:port */
+ http_parent = vec[1];
+
}
else if (vec_count == 3)
{
-const char gateway_rcs[] = "$Id: gateway.c,v 1.94 2015/06/18 15:26:40 fabiankeil Exp $";
+const char gateway_rcs[] = "$Id: gateway.c,v 1.95 2015/08/12 10:37:11 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/gateway.c,v $
switch (fwd->type)
{
case SOCKS_NONE:
+ case FORWARD_WEBSERVER:
sfd = connect_to(dest_host, dest_port, csp);
break;
case SOCKS_4:
-const char jcc_rcs[] = "$Id: jcc.c,v 1.436 2015/03/27 12:40:08 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.437 2015/12/28 18:55:49 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
*request_line = strdup(http->gpc);
string_append(request_line, " ");
- if (fwd->forward_host)
+ if (fwd->forward_host && fwd->type != FORWARD_WEBSERVER)
{
string_append(request_line, http->url);
}
if (csp->server_connection.sfd == JB_INVALID_SOCKET)
{
- if (fwd->type != SOCKS_NONE)
+ if ((fwd->type != SOCKS_NONE) && (fwd->type != FORWARD_WEBSERVER))
{
/* Socks error. */
rsp = error_response(csp, "forwarding-failed");
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.210 2015/12/27 12:46:46 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.211 2016/01/16 12:30:28 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
SOCKS_5 = 50,
/**< Like SOCKS5, but uses non-standard Tor extensions (currently only optimistic data) */
SOCKS_5T,
+ /**<
+ * Don't use a SOCKS server, forward to the specified webserver.
+ * The difference to SOCKS_NONE is that a request line without
+ * full URL is sent.
+ */
+ FORWARD_WEBSERVER,
};
/*