v2ray 10 anni fa
parent
commit
164465e60d
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      app/router/rules/json/fieldrule_test.go

+ 3 - 0
app/router/rules/json/fieldrule_test.go

@@ -119,4 +119,7 @@ func TestDomainNotMatchingDomain(t *testing.T) {
 	rule := parseRule([]byte(rawJson))
 	dest := v2net.NewTCPDestination(v2net.DomainAddress("baidu.com", 80))
 	assert.Bool(rule.Apply(dest)).IsFalse()
+
+	dest = v2net.NewTCPDestination(v2net.DomainAddress("www.google.com", 80))
+	assert.Bool(rule.Apply(dest)).IsTrue()
 }