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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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{