chore: cleanup the patch code

This commit is contained in:
wwqgtxx
2024-09-11 16:10:35 +08:00
parent 8230bc8e7d
commit 0a2f606e1b
18 changed files with 122 additions and 185 deletions

View File

@@ -99,6 +99,10 @@ func transform(servers []NameServer, resolver *Resolver) []dnsClient {
ret = append(ret, newDoHClient(s.Addr, resolver, s.PreferH3, s.Params, s.ProxyAdapter, s.ProxyName))
continue
case "dhcp":
if s.Addr == "system" { // Compatible with old writing
ret = append(ret, newSystemClient())
continue
}
ret = append(ret, newDHCPClient(s.Addr))
continue
case "system":