Repository navigation
Conversation
Node extraction kept only `proxies`, so an airport's `dns.nameserver-policy` and `dns.proxy-server-nameserver-policy` were dropped and its DNS routing never reached the running configuration. Carry both tables into the derived node document instead of discarding them. The existing override merge unions these maps with the user's own patch taking precedence, so domains the user configured stay under their control while the airport's remaining domains are still honoured. A payload without a dns section produces the same document as before.
|
Thanks for the careful write-up. We're closing this together with ProjectClash/Clash#11. The case that actually breaks is a subscription whose nodes' domains have to be resolved by the provider's own DNS. Since e3e6472 the Client detects that on import and runs such a subscription as its original configuration, so its DNS reaches the core as written. Any other DNS policy in a subscription is replaced on purpose by the DNS of the rule scheme the user picked; merging it in would quietly change DNS for every composed subscription that carries such a table. A user who wants the subscription's whole DNS can import it as its original configuration. If you have a subscription that still resolves wrongly on the current Client, please open an issue with its |
Summary
When a subscription is reduced to its nodes,
derivedSubscriptionbuilt the node document fromproxiesalone. The airport'sdns.nameserver-policyanddns.proxy-server-nameserver-policywere dropped there, so its DNS routing policy never reached the main configuration.This carries both tables into the derived node document instead of discarding them:
ProxyImportResultgainsdnsNameServerPolicy/dnsProxyServerNameserverPolicydecodereads them from the kernel report, treating a missing or empty table asnilderivedSubscriptionemits adnssection when either table is presentThe merge semantics already existed:
mergeOverrideruns the user's patch over the node document and unions map values, with the user's side winning. So conflicting domains stay under the user's control while the airport's remaining domains are still honoured — no change to the merge layer was needed, only to what reaches it.A payload without a
dnssection produces a byte-identical document to before. Validation is unaffected:validateConfigShapeis a shape check, andvalidateDNSForIOSonly requiresnameserverwhenenable: true, which the user's mergeddnsprovides.Depends on the kernel-side report fields: ProjectClash/Clash#11