github.com/sagernet/sing-box@v1.2.7/adapter/outbound.go (about) 1 package adapter 2 3 import ( 4 "context" 5 "net" 6 7 N "github.com/sagernet/sing/common/network" 8 ) 9 10 // Note: for proxy protocols, outbound creates early connections by default. 11 12 type Outbound interface { 13 Type() string 14 Tag() string 15 Network() []string 16 N.Dialer 17 NewConnection(ctx context.Context, conn net.Conn, metadata InboundContext) error 18 NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext) error 19 }