sing-box/adapter/outbound.go
2022-07-30 09:04:01 +08:00

20 lines
432 B
Go

package adapter
import (
"context"
"net"
N "github.com/sagernet/sing/common/network"
)
// Note: for proxy protocols, outbound creates early connections by default.
type Outbound interface {
Type() string
Tag() string
Network() []string
N.Dialer
NewConnection(ctx context.Context, conn net.Conn, metadata InboundContext) error
NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext) error
}