Update udpnat usage

This commit is contained in:
世界 2023-04-18 09:29:29 +08:00
parent d880656b52
commit bf7110b1ab
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
4 changed files with 8 additions and 8 deletions

View file

@ -116,7 +116,7 @@ func (s *System) Start() error {
go s.acceptLoop(tcpListener)
}
s.tcpNat = NewNat()
s.udpNat = udpnat.New[netip.AddrPort](s.udpTimeout, s.handler)
s.udpNat = udpnat.New[netip.AddrPort](s.ctx, s.udpTimeout, s.handler)
go s.tunLoop()
return nil
}