Make DNS hijack optional

This commit is contained in:
世界 2024-06-01 14:13:56 +08:00
parent 67a5b408ef
commit 65383d3c39
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
7 changed files with 159 additions and 117 deletions

5
tun.go
View file

@ -48,6 +48,8 @@ type Options struct {
MTU uint32
GSO bool
AutoRoute bool
DNSServers []netip.Addr
IPRoute2RuleIndex int
StrictRoute bool
Inet4RouteAddress []netip.Prefix
Inet6RouteAddress []netip.Prefix
@ -67,6 +69,9 @@ type Options struct {
// No work for TCP, do not use.
_TXChecksumOffload bool
// For library usages.
EXP_DisableDNSHijack bool
}
func CalculateInterfaceName(name string) (tunName string) {