From a8f53b894b543c7adaae10b1cb5b085dd81abe81 Mon Sep 17 00:00:00 2001 From: Justus Beyer Date: Tue, 13 Nov 2018 16:24:13 +0100 Subject: [PATCH] Permit special characters in upstream proxy username and passwort --- src/conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index 5a87c68..761e226 100644 --- a/src/conf.c +++ b/src/conf.c @@ -52,6 +52,7 @@ #define BOOL "(yes|on|no|off)" #define INT "((0x)?[[:digit:]]+)" #define ALNUM "([-a-z0-9._]+)" +#define AUTHSTR "([^:@\"]+)" #define IP "((([0-9]{1,3})\\.){3}[0-9]{1,3})" #define IPMASK "(" IP "(/[[:digit:]]+)?)" #define IPV6 "(" \ @@ -257,7 +258,7 @@ struct { }, { BEGIN "(upstream)" WS "(http|socks4|socks5)" WS - "(" ALNUM /*username*/ ":" ALNUM /*password*/ "@" ")?" + "(" AUTHSTR /*username*/ ":" AUTHSTR /*password*/ "@" ")?" "(" IP "|" ALNUM ")" ":" INT "(" WS STR ")?" END, handle_upstream, NULL