sing-box/adapter/outbound.go

21 lines
457 B
Go
Raw Permalink Normal View History

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