Allow customizing TUN DNS mode and hijack interface DNS by default

This commit is contained in:
世界
2026-08-30 17:41:40 +08:00
parent caf940c805
commit 3c016c978b
15 changed files with 184 additions and 60 deletions
+2
View File
@@ -14,6 +14,8 @@ type TunInboundOptions struct {
InterfaceName string `json:"interface_name,omitempty"`
MTU uint32 `json:"mtu,omitempty"`
Address badoption.Listable[netip.Prefix] `json:"address,omitempty"`
DNSMode string `json:"dns_mode,omitempty"`
DNSAddress badoption.Listable[netip.Addr] `json:"dns_address,omitempty"`
AutoRoute bool `json:"auto_route,omitempty"`
IPRoute2TableIndex int `json:"iproute2_table_index,omitempty"`
IPRoute2RuleIndex int `json:"iproute2_rule_index,omitempty"`