diff options
Diffstat (limited to 'src/grammar.y')
-rw-r--r-- | src/grammar.y | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/src/grammar.y b/src/grammar.y index 00596dd..9f3a74c 100644 --- a/src/grammar.y +++ b/src/grammar.y @@ -1,4 +1,4 @@ -/* $Id: grammar.y,v 1.23 2003-06-26 18:17:09 rjkaes Exp $ +/* $Id: grammar.y,v 1.24 2004-01-26 19:11:51 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 @@ -50,6 +50,7 @@ int yylex(void); %token KW_FILTER KW_FILTERURLS KW_FILTEREXTENDED KW_FILTER_DEFAULT_DENY %token KW_FILTER_CASESENSITIVE %token KW_UPSTREAM +%token KW_REVERSEPATH KW_REVERSEONLY KW_REVERSEMAGIC KW_REVERSEBASEURL %token KW_CONNECTPORT KW_BIND %token KW_STATHOST %token KW_ALLOW KW_DENY @@ -167,6 +168,46 @@ statement log_message(LOG_WARNING, "X-Tinyproxy header support was not compiled in."); #endif } + | KW_REVERSEPATH string + { +#ifdef REVERSE_SUPPORT + reversepath_add(NULL, $2); +#else + log_message(LOG_WARNING, "Reverse proxy support was not compiled in."); +#endif + } + | KW_REVERSEPATH string string + { +#ifdef REVERSE_SUPPORT + reversepath_add($2, $3); +#else + log_message(LOG_WARNING, "Reverse proxy support was not compiled in."); +#endif + } + | KW_REVERSEONLY yesno + { +#ifdef REVERSE_SUPPORT + config.reverseonly = $2; +#else + log_message(LOG_WARNING, "Reverse proxy support was not compiled in."); +#endif + } + | KW_REVERSEMAGIC yesno + { +#ifdef REVERSE_SUPPORT + config.reversemagic = $2; +#else + log_message(LOG_WARNING, "Reverse proxy support was not compiled in."); +#endif + } + | KW_REVERSEBASEURL string + { +#ifdef REVERSE_SUPPORT + config.reversebaseurl = $2; +#else + log_message(LOG_WARNING, "Reverse proxy support was not compiled in."); +#endif + } | KW_UPSTREAM unique_address ':' NUMBER { #ifdef UPSTREAM_SUPPORT |