Meow
2026-04-14 00:42:29 +08:00
committed by GitHub
parent e9f7d61c2e
commit 82624bcaf0
73 changed files with 5432 additions and 4455 deletions
+5 -5
View File
@@ -9,6 +9,7 @@ import (
"github.com/xtls/xray-core/app/proxyman"
"github.com/xtls/xray-core/app/router"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/common/geodata"
"github.com/xtls/xray-core/common/net"
"github.com/xtls/xray-core/common/serial"
"github.com/xtls/xray-core/core"
@@ -34,8 +35,7 @@ func TestResolveIP(t *testing.T) {
serial.ToTypedMessage(&dns.Config{
StaticHosts: []*dns.Config_HostMapping{
{
Type: dns.DomainMatchingType_Full,
Domain: "google.com",
Domain: &geodata.DomainRule{Value: &geodata.DomainRule_Custom{Custom: &geodata.Domain{Type: geodata.Domain_Full, Value: "google.com"}}},
Ip: [][]byte{dest.Address.IP()},
},
},
@@ -44,10 +44,10 @@ func TestResolveIP(t *testing.T) {
DomainStrategy: router.Config_IpIfNonMatch,
Rule: []*router.RoutingRule{
{
Geoip: []*router.GeoIP{
Ip: []*geodata.IPRule{
{
Cidr: []*router.CIDR{
{
Value: &geodata.IPRule_Custom{
Custom: &geodata.CIDR{
Ip: []byte{127, 0, 0, 0},
Prefix: 8,
},