refactor: connection manager

This commit is contained in:
世界
2025-01-13 15:14:30 +08:00
parent 285a82050c
commit fd299a0961
11 changed files with 569 additions and 52 deletions
+14
View File
@@ -0,0 +1,14 @@
package adapter
import (
"context"
"net"
N "github.com/sagernet/sing/common/network"
)
type ConnectionManager interface {
Lifecycle
NewConnection(ctx context.Context, this N.Dialer, conn net.Conn, metadata InboundContext, onClose N.CloseHandlerFunc)
NewPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketConn, metadata InboundContext, onClose N.CloseHandlerFunc)
}