You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the source code1, using templates.extend to extend a template, fields of type list in the derived template will be prepended to the field in the base template (which is a good feature, especially when overriding DNS/route rules). However, it raises an issue when extending servers (DNS servers) in a template.
The newly added DNS server internal is the first in the list, therefore becomes the final DNS server2, which is not desired. We desire the original default DNS server to be the final one.
Therefore, we propose serenity to set dns.final to default (or user-specified value) to avoid this issue. It seems to require only one line of change:
Commit: 474ab7e
According to the source code1, using
templates.extend
to extend a template, fields of type list in the derived template will be prepended to the field in the base template (which is a good feature, especially when overriding DNS/route rules). However, it raises an issue when extendingservers
(DNS servers) in a template.For example, for the following configuration:
the
derived
template produces the following DNS config:The newly added DNS server
internal
is the first in the list, therefore becomes the final DNS server2, which is not desired. We desire the originaldefault
DNS server to be the final one.Therefore, we propose serenity to set
dns.final
todefault
(or user-specified value) to avoid this issue. It seems to require only one line of change:Footnotes
https://github.com/SagerNet/sing/blob/9f69e7f9f7e2c4fc26828d98ec9f81ab72fdec98/common/json/badjson/merge.go#L111-L120 ↩
https://github.com/SagerNet/sing-box/blob/77e4d86fa02d2f476e7a6767e8ea1de830a0b8b0/route/router.go#L268 ↩
The text was updated successfully, but these errors were encountered: