From ea459d6e882f187f31cd607f8ad567823c218edc Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Sat, 28 Dec 2024 10:59:06 +0800 Subject: [PATCH] fix: key missing for tun inbound https://github.com/MetaCubeX/mihomo/issues/1672 --- listener/inbound/tun.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/listener/inbound/tun.go b/listener/inbound/tun.go index 77ad6bd61c..95b75986fa 100644 --- a/listener/inbound/tun.go +++ b/listener/inbound/tun.go @@ -23,16 +23,16 @@ type TunOption struct { GSOMaxSize uint32 `inbound:"gso-max-size,omitempty"` Inet4Address []string `inbound:"inet4-address,omitempty"` Inet6Address []string `inbound:"inet6-address,omitempty"` - IPRoute2TableIndex int `inbound:"iproute2-table-index"` - IPRoute2RuleIndex int `inbound:"iproute2-rule-index"` - AutoRedirect bool `inbound:"auto-redirect"` - AutoRedirectInputMark uint32 `inbound:"auto-redirect-input-mark"` - AutoRedirectOutputMark uint32 `inbound:"auto-redirect-output-mark"` + IPRoute2TableIndex int `inbound:"iproute2-table-index,omitempty"` + IPRoute2RuleIndex int `inbound:"iproute2-rule-index,omitempty"` + AutoRedirect bool `inbound:"auto-redirect,omitempty"` + AutoRedirectInputMark uint32 `inbound:"auto-redirect-input-mark,omitempty"` + AutoRedirectOutputMark uint32 `inbound:"auto-redirect-output-mark,omitempty"` StrictRoute bool `inbound:"strict-route,omitempty"` - RouteAddress []string `inbound:"route-address"` - RouteAddressSet []string `inbound:"route-address-set"` - RouteExcludeAddress []string `inbound:"route-exclude-address"` - RouteExcludeAddressSet []string `inbound:"route-exclude-address-set"` + RouteAddress []string `inbound:"route-address,omitempty"` + RouteAddressSet []string `inbound:"route-address-set,omitempty"` + RouteExcludeAddress []string `inbound:"route-exclude-address,omitempty"` + RouteExcludeAddressSet []string `inbound:"route-exclude-address-set,omitempty"` IncludeInterface []string `inbound:"include-interface,omitempty"` ExcludeInterface []string `inbound:"exclude-interface"` IncludeUID []uint32 `inbound:"include-uid,omitempty"`