mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
test case for domain matcher
This commit is contained in:
@@ -38,6 +38,11 @@ func TestSubDomainMatcher(t *testing.T) {
|
||||
input: proxy.ContextWithTarget(context.Background(), net.TCPDestination(net.DomainAddress("2ray.com"), 80)),
|
||||
output: false,
|
||||
},
|
||||
{
|
||||
pattern: "v2ray.com",
|
||||
input: proxy.ContextWithTarget(context.Background(), net.TCPDestination(net.DomainAddress("xv2ray.com"), 80)),
|
||||
output: false,
|
||||
},
|
||||
}
|
||||
for _, test := range cases {
|
||||
matcher := NewSubDomainMatcher(test.pattern)
|
||||
|
||||
Reference in New Issue
Block a user