patterniha
2026-09-30 06:26:16 +00:00
committed by RPRX
co-authored by Claude Opus 5.5
parent 0086362663
commit 1f304916bd
16 changed files with 1194 additions and 49 deletions
+4 -2
View File
@@ -166,12 +166,14 @@ func (t *Handler) Start() error {
}
// Platform-specific system DNS takeover, where the platform implements it.
// Non-fatal: a failure leaves DNS management with the OS.
// Rather no TUN than one that the system DNS bypasses.
if c, ok := tunInterface.(interface {
ConfigureSystemDNS(context.Context, string) error
}); ok {
if err := c.ConfigureSystemDNS(t.ctx, t.tag); err != nil {
errors.LogInfoInner(t.ctx, err, "[tun] system DNS not configured")
_ = tunStack.Close()
_ = tunInterface.Close()
return errors.New("unable to set the system DNS (remove autoSystemDnsToGateway to run without)").Base(err)
}
}