Init commit

This commit is contained in:
世界
2022-06-30 21:27:56 +08:00
commit 60691819b1
39 changed files with 2202 additions and 0 deletions

21
adapter/outbound.go Normal file
View File

@@ -0,0 +1,21 @@
package adapter
import (
"context"
"net"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
)
type Outbound interface {
Type() string
Tag() string
NewConnection(ctx context.Context, conn net.Conn, destination M.Socksaddr) error
NewPacketConnection(ctx context.Context, conn N.PacketConn, destination M.Socksaddr) error
N.Dialer
}
type OutboundInitializer interface {
Init(outbound Outbound) error
}