소스 검색

test case for domain matcher

Darien Raymond 8 년 전
부모
커밋
52216d0204
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      app/router/condition_test.go

+ 5 - 0
app/router/condition_test.go

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