1
0

outbound.go 432 B

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