Feat: support set tun file-descriptor in config file

Co-authored-by: DuFoxit <DuFoxit@users.noreply.github.com>
This commit is contained in:
wwqgtxx
2023-03-15 23:43:58 +08:00
parent 520cc807d6
commit 998d407d44
6 changed files with 12 additions and 1 deletions

View File

@ -218,6 +218,7 @@ type RawTun struct {
ExcludePackage []string `yaml:"exclude-package" json:"exclude_package,omitempty"`
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"`
}
type RawTuicServer struct {
@ -1239,6 +1240,7 @@ func parseTun(rawTun RawTun, general *General) error {
ExcludePackage: rawTun.ExcludePackage,
EndpointIndependentNat: rawTun.EndpointIndependentNat,
UDPTimeout: rawTun.UDPTimeout,
FileDescriptor: rawTun.FileDescriptor,
}
return nil