修改*号的含义
This commit is contained in:
parent
436e7cb398
commit
2850f30516
@ -5,6 +5,7 @@ namespace FastGithub
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 域名匹配
|
/// 域名匹配
|
||||||
|
/// *表示除.之外任意0到多个字符
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DomainMatch : IComparable<DomainMatch>
|
public class DomainMatch : IComparable<DomainMatch>
|
||||||
{
|
{
|
||||||
@ -18,7 +19,7 @@ namespace FastGithub
|
|||||||
public DomainMatch(string domainPattern)
|
public DomainMatch(string domainPattern)
|
||||||
{
|
{
|
||||||
this.domainPattern = domainPattern;
|
this.domainPattern = domainPattern;
|
||||||
var regexPattern = Regex.Escape(domainPattern).Replace(@"\*", ".*");
|
var regexPattern = Regex.Escape(domainPattern).Replace(@"\*", @"[^\.]*");
|
||||||
this.regex = new Regex($"^{regexPattern}$", RegexOptions.IgnoreCase);
|
this.regex = new Regex($"^{regexPattern}$", RegexOptions.IgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
"IPAddress": "114.114.114.114",
|
"IPAddress": "114.114.114.114",
|
||||||
"Port": 53
|
"Port": 53
|
||||||
},
|
},
|
||||||
"DomainConfigs": { // 域名的*表示0到多个任意字符
|
"DomainConfigs": { // 域名的*表示除.之外0到多个任意字符
|
||||||
"github.com": {
|
"github.com": {
|
||||||
"TlsSni": false, // 指示tls握手时是否发送SNI
|
"TlsSni": false, // 指示tls握手时是否发送SNI
|
||||||
"TlsSniPattern": null, // SNI表达式,@domain变量表示取域名值 @ipadress变量表示取ip @random变量表示取随机值,其它字符保留不替换
|
"TlsSniPattern": null, // SNI表达式,@domain变量表示取域名值 @ipadress变量表示取ip @random变量表示取随机值,其它字符保留不替换
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user