Added the "BindSame" configure directive from Oswald Buddenhagen.

This allows tinyproxy to respond to a request bound to the same
interface that the request came in on.  As Oswald explains:

  "attached is a patch that adds the BindSame option. it causes
  binding an outgoing connection to the ip address of the respective
  incoming connection. that way one can simulate an entire proxy farm
  with a single instance of tinyproxy on a multi-homed machine."

Cool.
This commit is contained in:
Robert James Kaes committed 2004-04-27 18:53:14 +00:00
1 parent 3b961ec66b
commit 18df4910a4
9 files changed
+93 -32

No files matched your search

+8 -2
View File
@@ -1,4 +1,4 @@
/* $Id: conns.h,v 1.16 2004-01-26 19:11:51 rjkaes Exp $
/* $Id: conns.h,v 1.17 2004-04-27 18:53:14 rjkaes Exp $
*
* See 'conns.c' for a detailed description.
*
@@ -53,6 +53,11 @@ struct conn_s {
long int client;
} content_length;
/*
* Store the server's IP (for BindSame)
*/
char* server_ip_addr;
/*
* Store the client's IP and hostname information
*/
@@ -79,7 +84,8 @@ struct conn_s {
* Functions for the creation and destruction of a connection structure.
*/
extern struct conn_s* initialize_conn(int client_fd, const char* ipaddr,
const char* string_addr);
const char* string_addr,
const char* sock_ipaddr);
extern void destroy_conn(struct conn_s *connptr);
#endif