0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-14 12:29:36 +03:00

Config: Remove more legacy fields (#3817)

This commit is contained in:
Kobe Arthur Scofield
2024-09-19 09:05:59 +08:00
committed by GitHub
parent f406b2dee0
commit 57a41f3b4b
52 changed files with 569 additions and 1157 deletions

View File

@ -31,18 +31,26 @@ func TestResolveIP(t *testing.T) {
serverConfig := &core.Config{
App: []*serial.TypedMessage{
serial.ToTypedMessage(&dns.Config{
Hosts: map[string]*net.IPOrDomain{
"google.com": net.NewIPOrDomain(dest.Address),
StaticHosts: []*dns.Config_HostMapping{
{
Type: dns.DomainMatchingType_Full,
Domain: "google.com",
Ip: [][]byte{dest.Address.IP()},
},
},
}),
serial.ToTypedMessage(&router.Config{
DomainStrategy: router.Config_IpIfNonMatch,
Rule: []*router.RoutingRule{
{
Cidr: []*router.CIDR{
Geoip: []*router.GeoIP{
{
Ip: []byte{127, 0, 0, 0},
Prefix: 8,
Cidr: []*router.CIDR{
{
Ip: []byte{127, 0, 0, 0},
Prefix: 8,
},
},
},
},
TargetTag: &router.RoutingRule_Tag{