capture non-whitespace chars for ss url tag

This commit is contained in:
Syrone Wong
2017-04-08 18:56:30 +08:00
parent 08f12b3b24
commit 54335d4889
+1 -1
View File
@@ -11,7 +11,7 @@ namespace Shadowsocks.Model
public class Server
{
public static readonly Regex
UrlFinder = new Regex(@"ss://(?<base64>[A-Za-z0-9+-/=_]+)(?:#(?<tag>.+))?", RegexOptions.IgnoreCase),
UrlFinder = new Regex(@"ss://(?<base64>[A-Za-z0-9+-/=_]+)(?:#(?<tag>\S+))?", RegexOptions.IgnoreCase),
DetailsParser = new Regex(@"^((?<method>.+?):(?<password>.*)@(?<hostname>.+?):(?<port>\d+?))$", RegexOptions.IgnoreCase);
private const int DefaultServerTimeoutSec = 5;