fix: ebpf support
This commit is contained in:
@ -119,6 +119,7 @@ type Tun struct {
|
||||
AutoRoute bool `yaml:"auto-route" json:"auto-route"`
|
||||
AutoDetectInterface bool `yaml:"auto-detect-interface" json:"auto-detect-interface"`
|
||||
TunAddressPrefix netip.Prefix `yaml:"-" json:"-"`
|
||||
RedirectToTun []string `yaml:"-" json:"-"`
|
||||
}
|
||||
|
||||
// IPTables config
|
||||
@ -296,6 +297,10 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
|
||||
AutoRoute: false,
|
||||
AutoDetectInterface: false,
|
||||
},
|
||||
EBpf: EBpf{
|
||||
RedirectToTun: []string{},
|
||||
AutoRedir: []string{},
|
||||
},
|
||||
IPTables: IPTables{
|
||||
Enable: false,
|
||||
InboundInterface: "lo",
|
||||
@ -967,6 +972,7 @@ func parseTun(rawTun RawTun, general *General, dnsCfg *DNS) (*Tun, error) {
|
||||
AutoRoute: rawTun.AutoRoute,
|
||||
AutoDetectInterface: rawTun.AutoDetectInterface,
|
||||
TunAddressPrefix: tunAddressPrefix,
|
||||
RedirectToTun: rawTun.RedirectToTun,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user