Skip to content

Commit

Permalink
tun: set dns on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Pashmfouroush <[email protected]>
  • Loading branch information
markpash committed May 16, 2024
1 parent 3a9504a commit 29c668c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/tun_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ tryAgain6:
return nil, fmt.Errorf("unable to set metric and MTU: %w", err)
}

err = luid.SetDNS(family4, []netip.Addr{netip.MustParseAddr("1.1.1.1")}, nil)
if err != nil {
return nil, fmt.Errorf("unable to set DNS: %w", err)
}

return tunDev, nil

}
Expand Down

0 comments on commit 29c668c

Please sign in to comment.