Update gVisor to 20220905.0

This commit is contained in:
世界 2022-09-09 11:31:08 +08:00
parent 2f15b0cd3f
commit 575ac29417
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
7 changed files with 39 additions and 36 deletions

View file

@ -20,18 +20,16 @@ import (
)
type UDPForwarder struct {
ctx context.Context
stack *stack.Stack
handler Handler
udpNat *udpnat.Service[netip.AddrPort]
ctx context.Context
stack *stack.Stack
udpNat *udpnat.Service[netip.AddrPort]
}
func NewUDPForwarder(ctx context.Context, stack *stack.Stack, handler Handler, udpTimeout int64) *UDPForwarder {
return &UDPForwarder{
ctx: ctx,
stack: stack,
handler: handler,
udpNat: udpnat.New[netip.AddrPort](udpTimeout, handler),
ctx: ctx,
stack: stack,
udpNat: udpnat.New[netip.AddrPort](udpTimeout, handler),
}
}