github.com/sagernet/sing-box@v1.9.0-rc.20/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 Dependencies() []string 17 N.Dialer 18 NewConnection(ctx context.Context, conn net.Conn, metadata InboundContext) error 19 NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext) error 20 }