mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-08 19:54:12 +08:00
Add system tun stack
This commit is contained in:
parent
a85f7c09c4
commit
ae8a3756bd
@ -144,7 +144,17 @@ func (t *Tun) Start() error {
|
|||||||
return E.Cause(err, "configure tun interface")
|
return E.Cause(err, "configure tun interface")
|
||||||
}
|
}
|
||||||
t.tunIf = tunIf
|
t.tunIf = tunIf
|
||||||
t.tunStack, err = tun.NewStack(t.ctx, t.stack, tunIf, t.tunOptions.MTU, t.endpointIndependentNat, t.udpTimeout, t)
|
t.tunStack, err = tun.NewStack(t.stack, tun.StackOptions{
|
||||||
|
Context: t.ctx,
|
||||||
|
Tun: tunIf,
|
||||||
|
MTU: t.tunOptions.MTU,
|
||||||
|
Name: t.tunOptions.Name,
|
||||||
|
Inet4Address: t.tunOptions.Inet4Address,
|
||||||
|
Inet6Address: t.tunOptions.Inet6Address,
|
||||||
|
EndpointIndependentNat: t.endpointIndependentNat,
|
||||||
|
UDPTimeout: t.udpTimeout,
|
||||||
|
Handler: t,
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user