sing-box/adapter/outbound.go

21 lines
457 B
Go
Raw Permalink Normal View History

2022-06-30 21:27:56 +08:00
package adapter
import (
"context"
"net"
N "github.com/sagernet/sing/common/network"
)
2022-07-30 00:29:22 +08:00
// Note: for proxy protocols, outbound creates early connections by default.
2022-06-30 21:27:56 +08:00
type Outbound interface {
Type() string
Tag() string
Network() []string
2023-06-13 22:38:05 +08:00
Dependencies() []string
2022-07-03 13:14:49 +08:00
N.Dialer
2022-07-07 23:36:32 +08:00
NewConnection(ctx context.Context, conn net.Conn, metadata InboundContext) error
NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext) error
2022-06-30 21:27:56 +08:00
}