mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-29 22:36:36 +08:00
提升通过域名查找服务的性能,轻松支持海量域名
This commit is contained in:
@@ -72,3 +72,22 @@ func TestServerConfig_Protocols(t *testing.T) {
|
||||
t.Log(server.FullAddresses())
|
||||
}
|
||||
}
|
||||
|
||||
func TestServerConfig_AllStrictNames(t *testing.T) {
|
||||
var config = &ServerConfig{
|
||||
AliasServerNames: []string{"hello.com", ".hello.com"},
|
||||
ServerNames: []*ServerNameConfig{
|
||||
{
|
||||
Name: "hello2.com",
|
||||
},
|
||||
{
|
||||
SubNames: []string{"hello3.com", "hello4.com", "*.hello5.com"},
|
||||
},
|
||||
{
|
||||
Name: "~hello.com",
|
||||
},
|
||||
},
|
||||
}
|
||||
t.Log(config.AllStrictNames())
|
||||
t.Log(config.AllFuzzyNames())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user