diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2004-04-27 18:53:14 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2004-04-27 18:53:14 +0000 |
commit | 18df4910a43e8f1b0d9d10df37236fabf0ba8508 (patch) | |
tree | ac5ab56ac77e8c7325cbde33c2b7e7864ead25ea /src/grammar.y | |
parent | 3b961ec66bdcf892c14045685f533febe3386ffb (diff) | |
download | tinyproxy-18df4910a43e8f1b0d9d10df37236fabf0ba8508.tar.gz tinyproxy-18df4910a43e8f1b0d9d10df37236fabf0ba8508.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/grammar.y | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/grammar.y b/src/grammar.y index 9f3a74c..72d51b8 100644 --- a/src/grammar.y +++ b/src/grammar.y @@ -1,4 +1,4 @@ -/* $Id: grammar.y,v 1.24 2004-01-26 19:11:51 rjkaes Exp $ +/* $Id: grammar.y,v 1.25 2004-04-27 18:53:14 rjkaes Exp $ * * This is the grammar for tinyproxy's configuration file. It needs to be * in sync with scanner.l. If you know more about yacc and lex than I do @@ -51,7 +51,7 @@ int yylex(void); %token KW_FILTER_CASESENSITIVE %token KW_UPSTREAM %token KW_REVERSEPATH KW_REVERSEONLY KW_REVERSEMAGIC KW_REVERSEBASEURL -%token KW_CONNECTPORT KW_BIND +%token KW_CONNECTPORT KW_BIND KW_BINDSAME %token KW_STATHOST %token KW_ALLOW KW_DENY %token KW_ERRORPAGE KW_DEFAULT_ERRORPAGE @@ -250,6 +250,11 @@ statement log_message(LOG_WARNING, "The 'Bind' directive can not be used with transparent proxy support. Ignoring the directive."); #endif } + | KW_BINDSAME yesno + { + log_message(LOG_INFO, "Binding outgoing connections to incoming IP"); + config.bindsame = $2; + } | KW_VIA_PROXY_NAME string { log_message(LOG_INFO, "Setting \"Via\" proxy name to: %s", $2); |