Permit special characters in upstream proxy username and passwort

This commit is contained in:
Justus Beyer 2018-11-13 16:24:13 +01:00
parent f44d0f387b
commit a8f53b894b

View File

@ -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