Versions in this module Expand all Collapse all v0 v0.0.1 Sep 18, 2023 Changes in this version + func ContextWithTag(ctx context.Context, outboundTag string) context.Context + func CopyEarlyConn(ctx context.Context, conn net.Conn, serverConn net.Conn) error + func New(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Outbound, error) + func NewConnection(ctx context.Context, this N.Dialer, conn net.Conn, ...) error + func NewDirectConnection(ctx context.Context, router adapter.Router, this N.Dialer, conn net.Conn, ...) error + func NewDirectPacketConnection(ctx context.Context, router adapter.Router, this N.Dialer, conn N.PacketConn, ...) error + func NewError(logger log.ContextLogger, ctx context.Context, err error) + func NewHysteria(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Outbound, error) + func NewPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketConn, ...) error + func NewShadowsocksR(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Outbound, error) + func NewTUIC(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Outbound, error) + func NewWireGuard(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Outbound, error) + func RealTag(detour adapter.Outbound) string + func TagFromContext(ctx context.Context) (string, bool) + type Block struct + func NewBlock(logger log.ContextLogger, tag string) *Block + func (a *Block) Dependencies() []string + func (a *Block) Network() []string + func (a *Block) NewError(ctx context.Context, err error) + func (a *Block) Tag() string + func (a *Block) Type() string + func (h *Block) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (h *Block) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (h *Block) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (h *Block) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + type DNS struct + func NewDNS(router adapter.Router, tag string) *DNS + func (a *DNS) Dependencies() []string + func (a *DNS) Network() []string + func (a *DNS) NewError(ctx context.Context, err error) + func (a *DNS) Tag() string + func (a *DNS) Type() string + func (d *DNS) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (d *DNS) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (d *DNS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (d *DNS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + type Direct struct + func NewDirect(router adapter.Router, logger log.ContextLogger, tag string, ...) (*Direct, error) + func (a *Direct) Dependencies() []string + func (a *Direct) Network() []string + func (a *Direct) NewError(ctx context.Context, err error) + func (a *Direct) Tag() string + func (a *Direct) Type() string + func (h *Direct) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (h *Direct) DialParallel(ctx context.Context, network string, destination M.Socksaddr, ...) (net.Conn, error) + func (h *Direct) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (h *Direct) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (h *Direct) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + type HTTP struct + func NewHTTP(router adapter.Router, logger log.ContextLogger, tag string, ...) (*HTTP, error) + func (a *HTTP) Dependencies() []string + func (a *HTTP) Network() []string + func (a *HTTP) NewError(ctx context.Context, err error) + func (a *HTTP) Tag() string + func (a *HTTP) Type() string + func (h *HTTP) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (h *HTTP) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (h *HTTP) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (h *HTTP) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + type ProxyListener struct + func NewProxyListener(ctx context.Context, logger log.ContextLogger, dialer N.Dialer) *ProxyListener + func (l *ProxyListener) Close() error + func (l *ProxyListener) NewConnection(ctx context.Context, conn net.Conn, upstreamMetadata M.Metadata) error + func (l *ProxyListener) NewPacketConnection(ctx context.Context, conn N.PacketConn, upstreamMetadata M.Metadata) error + func (l *ProxyListener) Password() string + func (l *ProxyListener) Port() uint16 + func (l *ProxyListener) Start() error + func (l *ProxyListener) Username() string + type SSH struct + func NewSSH(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (*SSH, error) + func (a *SSH) Dependencies() []string + func (a *SSH) Network() []string + func (a *SSH) NewError(ctx context.Context, err error) + func (a *SSH) Tag() string + func (a *SSH) Type() string + func (s *SSH) Close() error + func (s *SSH) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (s *SSH) InterfaceUpdated() + func (s *SSH) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (s *SSH) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (s *SSH) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + type Selector struct + func NewSelector(router adapter.Router, logger log.ContextLogger, tag string, ...) (*Selector, error) + func (a *Selector) Dependencies() []string + func (a *Selector) NewError(ctx context.Context, err error) + func (a *Selector) Tag() string + func (a *Selector) Type() string + func (s *Selector) All() []string + func (s *Selector) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (s *Selector) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (s *Selector) Network() []string + func (s *Selector) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (s *Selector) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + func (s *Selector) Now() string + func (s *Selector) SelectOutbound(tag string) bool + func (s *Selector) Start() error + type ShadowTLS struct + func NewShadowTLS(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (*ShadowTLS, error) + func (a *ShadowTLS) Dependencies() []string + func (a *ShadowTLS) Network() []string + func (a *ShadowTLS) NewError(ctx context.Context, err error) + func (a *ShadowTLS) Tag() string + func (a *ShadowTLS) Type() string + func (h *ShadowTLS) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (h *ShadowTLS) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (h *ShadowTLS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (h *ShadowTLS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + type Shadowsocks struct + func NewShadowsocks(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (*Shadowsocks, error) + func (a *Shadowsocks) Dependencies() []string + func (a *Shadowsocks) Network() []string + func (a *Shadowsocks) NewError(ctx context.Context, err error) + func (a *Shadowsocks) Tag() string + func (a *Shadowsocks) Type() string + func (h *Shadowsocks) Close() error + func (h *Shadowsocks) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (h *Shadowsocks) InterfaceUpdated() + func (h *Shadowsocks) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (h *Shadowsocks) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (h *Shadowsocks) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + type Socks struct + func NewSocks(router adapter.Router, logger log.ContextLogger, tag string, ...) (*Socks, error) + func (a *Socks) Dependencies() []string + func (a *Socks) Network() []string + func (a *Socks) NewError(ctx context.Context, err error) + func (a *Socks) Tag() string + func (a *Socks) Type() string + func (h *Socks) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (h *Socks) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (h *Socks) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (h *Socks) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + type Tor struct + func NewTor(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (*Tor, error) + func (a *Tor) Dependencies() []string + func (a *Tor) Network() []string + func (a *Tor) NewError(ctx context.Context, err error) + func (a *Tor) Tag() string + func (a *Tor) Type() string + func (t *Tor) Close() error + func (t *Tor) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (t *Tor) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (t *Tor) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (t *Tor) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + func (t *Tor) Start() error + type Trojan struct + func NewTrojan(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (*Trojan, error) + func (a *Trojan) Dependencies() []string + func (a *Trojan) Network() []string + func (a *Trojan) NewError(ctx context.Context, err error) + func (a *Trojan) Tag() string + func (a *Trojan) Type() string + func (h *Trojan) Close() error + func (h *Trojan) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (h *Trojan) InterfaceUpdated() + func (h *Trojan) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (h *Trojan) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (h *Trojan) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + type URLTest struct + func NewURLTest(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (*URLTest, error) + func (a *URLTest) Dependencies() []string + func (a *URLTest) NewError(ctx context.Context, err error) + func (a *URLTest) Tag() string + func (a *URLTest) Type() string + func (s *URLTest) All() []string + func (s *URLTest) CheckOutbounds() + func (s *URLTest) Close() error + func (s *URLTest) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (s *URLTest) InterfaceUpdated() + func (s *URLTest) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (s *URLTest) Network() []string + func (s *URLTest) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (s *URLTest) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + func (s *URLTest) Now() string + func (s *URLTest) PostStart() error + func (s *URLTest) Start() error + func (s *URLTest) URLTest(ctx context.Context, link string) (map[string]uint16, error) + type URLTestGroup struct + func NewURLTestGroup(ctx context.Context, router adapter.Router, logger log.Logger, ...) *URLTestGroup + func (g *URLTestGroup) CheckOutbounds(force bool) + func (g *URLTestGroup) Close() error + func (g *URLTestGroup) Fallback(used adapter.Outbound) []adapter.Outbound + func (g *URLTestGroup) Select(network string) adapter.Outbound + func (g *URLTestGroup) Start() + func (g *URLTestGroup) URLTest(ctx context.Context, link string) (map[string]uint16, error) + type VLESS struct + func NewVLESS(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (*VLESS, error) + func (a *VLESS) Dependencies() []string + func (a *VLESS) Network() []string + func (a *VLESS) NewError(ctx context.Context, err error) + func (a *VLESS) Tag() string + func (a *VLESS) Type() string + func (h *VLESS) Close() error + func (h *VLESS) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (h *VLESS) InterfaceUpdated() + func (h *VLESS) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (h *VLESS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (h *VLESS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error + type VMess struct + func NewVMess(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (*VMess, error) + func (a *VMess) Dependencies() []string + func (a *VMess) Network() []string + func (a *VMess) NewError(ctx context.Context, err error) + func (a *VMess) Tag() string + func (a *VMess) Type() string + func (h *VMess) Close() error + func (h *VMess) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (h *VMess) InterfaceUpdated() + func (h *VMess) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (h *VMess) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error + func (h *VMess) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error