Disable Windows DNS registration

This commit is contained in:
i40e 2023-10-10 13:26:34 +08:00 committed by 世界
parent 1a85bd3ef4
commit efd9884154
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
3 changed files with 40 additions and 4 deletions

View file

@ -88,6 +88,9 @@ func (t *NativeTun) configure() error {
return E.Cause(err, "set ipv6 dns")
}
}
if len(t.options.Inet4Address) > 0 || len(t.options.Inet6Address) > 0 {
_ = luid.DisableDNSRegistration()
}
if t.options.AutoRoute {
if len(t.options.Inet4Address) > 0 {
if len(t.options.Inet4RouteAddress) > 0 {