chore: allow config table-index for tun

https://github.com/MetaCubeX/mihomo/issues/1128
This commit is contained in:
wwqgtxx
2024-03-24 21:31:52 +08:00
parent d2ae94f20b
commit 5af7f4e847
6 changed files with 16 additions and 2 deletions

View File

@@ -265,6 +265,7 @@ type RawTun struct {
EndpointIndependentNat bool `yaml:"endpoint-independent-nat" json:"endpoint_independent_nat,omitempty"`
UDPTimeout int64 `yaml:"udp-timeout" json:"udp_timeout,omitempty"`
FileDescriptor int `yaml:"file-descriptor" json:"file-descriptor"`
TableIndex int `yaml:"table-index" json:"table-index"`
}
type RawTuicServer struct {
@@ -1448,6 +1449,7 @@ func parseTun(rawTun RawTun, general *General) error {
EndpointIndependentNat: rawTun.EndpointIndependentNat,
UDPTimeout: rawTun.UDPTimeout,
FileDescriptor: rawTun.FileDescriptor,
TableIndex: rawTun.TableIndex,
}
return nil