Migrate to udpnat2 / Add PrepareConnection

This commit is contained in:
世界 2024-10-21 21:55:07 +08:00
parent 99eea00432
commit 7f8e556bb0
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
6 changed files with 121 additions and 84 deletions

View file

@ -5,6 +5,7 @@ import (
"encoding/binary"
"net"
"net/netip"
"time"
"github.com/sagernet/sing/common/control"
E "github.com/sagernet/sing/common/exceptions"
@ -23,7 +24,7 @@ type StackOptions struct {
Tun Tun
TunOptions Options
EndpointIndependentNat bool
UDPTimeout int64
UDPTimeout time.Duration
Handler Handler
Logger logger.Logger
ForwarderBindInterface bool