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

2
tun.go
View file

@ -10,11 +10,13 @@ import (
F "github.com/sagernet/sing/common/format"
"github.com/sagernet/sing/common/logger"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
"github.com/sagernet/sing/common/ranges"
)
type Handler interface {
PrepareConnection(source M.Socksaddr, destination M.Socksaddr) error
N.TCPConnectionHandlerEx
N.UDPConnectionHandlerEx
}