inbound

package
v1.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: GPL-2.0 Imports: 57 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.Inbound, platformInterface platform.Interface) (adapter.Inbound, error)

func NewError

func NewError(logger log.ContextLogger, ctx context.Context, err error)

func NewHysteria added in v1.0.1

func NewHysteria(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.HysteriaInboundOptions) (adapter.Inbound, error)

func NewHysteria2 added in v1.4.3

func NewHysteria2(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.Hysteria2InboundOptions) (adapter.Inbound, error)

func NewShadowsocks

func NewShadowsocks(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.ShadowsocksInboundOptions) (adapter.Inbound, error)

func NewTUIC added in v1.4.0

func NewTUIC(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.TUICInboundOptions) (adapter.Inbound, error)

Types

type Direct

type Direct struct {
	// contains filtered or unexported fields
}

func NewDirect

func NewDirect(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.DirectInboundOptions) *Direct

func (*Direct) Close

func (a *Direct) Close() error

func (*Direct) ListenTCP added in v1.0.1

func (a *Direct) ListenTCP() (net.Listener, error)

func (*Direct) ListenUDP added in v1.0.1

func (a *Direct) ListenUDP() (net.PacketConn, error)

func (*Direct) Network added in v1.0.1

func (a *Direct) Network() []string

func (*Direct) NewConnection

func (d *Direct) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*Direct) NewError

func (a *Direct) NewError(ctx context.Context, err error)

func (*Direct) NewPacket

func (d *Direct) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, metadata adapter.InboundContext) error

func (*Direct) Start

func (a *Direct) Start() error

func (*Direct) Tag

func (a *Direct) Tag() string

func (*Direct) Type

func (a *Direct) Type() string

type HTTP

type HTTP struct {
	// contains filtered or unexported fields
}

func NewHTTP

func NewHTTP(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.HTTPMixedInboundOptions) (*HTTP, error)

func (*HTTP) Close

func (h *HTTP) Close() error

func (*HTTP) ListenTCP added in v1.0.1

func (a *HTTP) ListenTCP() (net.Listener, error)

func (*HTTP) ListenUDP added in v1.0.1

func (a *HTTP) ListenUDP() (net.PacketConn, error)

func (*HTTP) Network added in v1.0.1

func (a *HTTP) Network() []string

func (*HTTP) NewConnection

func (h *HTTP) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*HTTP) NewError

func (a *HTTP) NewError(ctx context.Context, err error)

func (*HTTP) NewPacketConnection added in v1.0.1

func (h *HTTP) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*HTTP) Start

func (h *HTTP) Start() error

func (*HTTP) Tag

func (a *HTTP) Tag() string

func (*HTTP) Type

func (a *HTTP) Type() string

type Mixed

type Mixed struct {
	// contains filtered or unexported fields
}

func NewMixed

func NewMixed(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.HTTPMixedInboundOptions) *Mixed

func (*Mixed) Close

func (a *Mixed) Close() error

func (*Mixed) ListenTCP added in v1.0.1

func (a *Mixed) ListenTCP() (net.Listener, error)

func (*Mixed) ListenUDP added in v1.0.1

func (a *Mixed) ListenUDP() (net.PacketConn, error)

func (*Mixed) Network added in v1.0.1

func (a *Mixed) Network() []string

func (*Mixed) NewConnection

func (h *Mixed) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*Mixed) NewError

func (a *Mixed) NewError(ctx context.Context, err error)

func (*Mixed) NewPacketConnection added in v1.0.1

func (h *Mixed) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*Mixed) Start

func (a *Mixed) Start() error

func (*Mixed) Tag

func (a *Mixed) Tag() string

func (*Mixed) Type

func (a *Mixed) Type() string

type Naive

type Naive struct {
	// contains filtered or unexported fields
}

func NewNaive

func NewNaive(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.NaiveInboundOptions) (*Naive, error)

func (*Naive) Close

func (n *Naive) Close() error

func (*Naive) ListenTCP added in v1.0.1

func (a *Naive) ListenTCP() (net.Listener, error)

func (*Naive) ListenUDP added in v1.0.1

func (a *Naive) ListenUDP() (net.PacketConn, error)

func (*Naive) Network added in v1.0.1

func (a *Naive) Network() []string

func (*Naive) NewError added in v1.0.1

func (a *Naive) NewError(ctx context.Context, err error)

func (*Naive) ServeHTTP

func (n *Naive) ServeHTTP(writer http.ResponseWriter, request *http.Request)

func (*Naive) Start

func (n *Naive) Start() error

func (*Naive) Tag

func (a *Naive) Tag() string

func (*Naive) Type

func (a *Naive) Type() string

type Redirect

type Redirect struct {
	// contains filtered or unexported fields
}

func NewRedirect

func NewRedirect(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.RedirectInboundOptions) *Redirect

func (*Redirect) Close

func (a *Redirect) Close() error

func (*Redirect) ListenTCP added in v1.0.1

func (a *Redirect) ListenTCP() (net.Listener, error)

func (*Redirect) ListenUDP added in v1.0.1

func (a *Redirect) ListenUDP() (net.PacketConn, error)

func (*Redirect) Network added in v1.0.1

func (a *Redirect) Network() []string

func (*Redirect) NewConnection

func (r *Redirect) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*Redirect) NewError

func (a *Redirect) NewError(ctx context.Context, err error)

func (*Redirect) Start

func (a *Redirect) Start() error

func (*Redirect) Tag

func (a *Redirect) Tag() string

func (*Redirect) Type

func (a *Redirect) Type() string

type ShadowTLS added in v1.0.1

type ShadowTLS struct {
	// contains filtered or unexported fields
}

func NewShadowTLS added in v1.0.1

func NewShadowTLS(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.ShadowTLSInboundOptions) (*ShadowTLS, error)

func (*ShadowTLS) Close added in v1.0.1

func (a *ShadowTLS) Close() error

func (*ShadowTLS) ListenTCP added in v1.0.1

func (a *ShadowTLS) ListenTCP() (net.Listener, error)

func (*ShadowTLS) ListenUDP added in v1.0.1

func (a *ShadowTLS) ListenUDP() (net.PacketConn, error)

func (*ShadowTLS) Network added in v1.0.1

func (a *ShadowTLS) Network() []string

func (*ShadowTLS) NewConnection added in v1.0.1

func (h *ShadowTLS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*ShadowTLS) NewError added in v1.0.1

func (a *ShadowTLS) NewError(ctx context.Context, err error)

func (*ShadowTLS) Start added in v1.0.1

func (a *ShadowTLS) Start() error

func (*ShadowTLS) Tag added in v1.0.1

func (a *ShadowTLS) Tag() string

func (*ShadowTLS) Type added in v1.0.1

func (a *ShadowTLS) Type() string

type Shadowsocks

type Shadowsocks struct {
	// contains filtered or unexported fields
}

func (*Shadowsocks) Close

func (a *Shadowsocks) Close() error

func (*Shadowsocks) ListenTCP added in v1.0.1

func (a *Shadowsocks) ListenTCP() (net.Listener, error)

func (*Shadowsocks) ListenUDP added in v1.0.1

func (a *Shadowsocks) ListenUDP() (net.PacketConn, error)

func (*Shadowsocks) Network added in v1.0.1

func (a *Shadowsocks) Network() []string

func (*Shadowsocks) NewConnection

func (h *Shadowsocks) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*Shadowsocks) NewError

func (a *Shadowsocks) NewError(ctx context.Context, err error)

func (*Shadowsocks) NewPacket

func (h *Shadowsocks) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, metadata adapter.InboundContext) error

func (*Shadowsocks) NewPacketConnection added in v1.0.1

func (h *Shadowsocks) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*Shadowsocks) Start

func (a *Shadowsocks) Start() error

func (*Shadowsocks) Tag

func (a *Shadowsocks) Tag() string

func (*Shadowsocks) Type

func (a *Shadowsocks) Type() string

type ShadowsocksMulti

type ShadowsocksMulti struct {
	// contains filtered or unexported fields
}

func (*ShadowsocksMulti) Close

func (a *ShadowsocksMulti) Close() error

func (*ShadowsocksMulti) ListenTCP added in v1.0.1

func (a *ShadowsocksMulti) ListenTCP() (net.Listener, error)

func (*ShadowsocksMulti) ListenUDP added in v1.0.1

func (a *ShadowsocksMulti) ListenUDP() (net.PacketConn, error)

func (*ShadowsocksMulti) Network added in v1.0.1

func (a *ShadowsocksMulti) Network() []string

func (*ShadowsocksMulti) NewConnection

func (h *ShadowsocksMulti) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*ShadowsocksMulti) NewError

func (a *ShadowsocksMulti) NewError(ctx context.Context, err error)

func (*ShadowsocksMulti) NewPacket

func (h *ShadowsocksMulti) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, metadata adapter.InboundContext) error

func (*ShadowsocksMulti) NewPacketConnection added in v1.0.1

func (h *ShadowsocksMulti) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*ShadowsocksMulti) Start

func (a *ShadowsocksMulti) Start() error

func (*ShadowsocksMulti) Tag

func (a *ShadowsocksMulti) Tag() string

func (*ShadowsocksMulti) Type

func (a *ShadowsocksMulti) Type() string

type ShadowsocksRelay

type ShadowsocksRelay struct {
	// contains filtered or unexported fields
}

func (*ShadowsocksRelay) Close

func (a *ShadowsocksRelay) Close() error

func (*ShadowsocksRelay) ListenTCP added in v1.0.1

func (a *ShadowsocksRelay) ListenTCP() (net.Listener, error)

func (*ShadowsocksRelay) ListenUDP added in v1.0.1

func (a *ShadowsocksRelay) ListenUDP() (net.PacketConn, error)

func (*ShadowsocksRelay) Network added in v1.0.1

func (a *ShadowsocksRelay) Network() []string

func (*ShadowsocksRelay) NewConnection

func (h *ShadowsocksRelay) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*ShadowsocksRelay) NewError

func (a *ShadowsocksRelay) NewError(ctx context.Context, err error)

func (*ShadowsocksRelay) NewPacket

func (h *ShadowsocksRelay) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, metadata adapter.InboundContext) error

func (*ShadowsocksRelay) NewPacketConnection added in v1.0.1

func (h *ShadowsocksRelay) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*ShadowsocksRelay) Start

func (a *ShadowsocksRelay) Start() error

func (*ShadowsocksRelay) Tag

func (a *ShadowsocksRelay) Tag() string

func (*ShadowsocksRelay) Type

func (a *ShadowsocksRelay) Type() string

type Socks

type Socks struct {
	// contains filtered or unexported fields
}

func NewSocks

func NewSocks(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.SocksInboundOptions) *Socks

func (*Socks) Close

func (a *Socks) Close() error

func (*Socks) ListenTCP added in v1.0.1

func (a *Socks) ListenTCP() (net.Listener, error)

func (*Socks) ListenUDP added in v1.0.1

func (a *Socks) ListenUDP() (net.PacketConn, error)

func (*Socks) Network added in v1.0.1

func (a *Socks) Network() []string

func (*Socks) NewConnection

func (h *Socks) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*Socks) NewError

func (a *Socks) NewError(ctx context.Context, err error)

func (*Socks) NewPacketConnection added in v1.0.1

func (h *Socks) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*Socks) Start

func (a *Socks) Start() error

func (*Socks) Tag

func (a *Socks) Tag() string

func (*Socks) Type

func (a *Socks) Type() string

type TProxy

type TProxy struct {
	// contains filtered or unexported fields
}

func NewTProxy

func NewTProxy(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.TProxyInboundOptions) *TProxy

func (*TProxy) Close

func (a *TProxy) Close() error

func (*TProxy) ListenTCP added in v1.0.1

func (a *TProxy) ListenTCP() (net.Listener, error)

func (*TProxy) ListenUDP added in v1.0.1

func (a *TProxy) ListenUDP() (net.PacketConn, error)

func (*TProxy) Network added in v1.0.1

func (a *TProxy) Network() []string

func (*TProxy) NewConnection

func (t *TProxy) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*TProxy) NewError

func (a *TProxy) NewError(ctx context.Context, err error)

func (*TProxy) NewPacket

func (t *TProxy) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, oob []byte, metadata adapter.InboundContext) error

func (*TProxy) Start

func (t *TProxy) Start() error

func (*TProxy) Tag

func (a *TProxy) Tag() string

func (*TProxy) Type

func (a *TProxy) Type() string

type Trojan

type Trojan struct {
	// contains filtered or unexported fields
}

func NewTrojan

func NewTrojan(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.TrojanInboundOptions) (*Trojan, error)

func (*Trojan) Close

func (h *Trojan) Close() error

func (*Trojan) ListenTCP added in v1.0.1

func (a *Trojan) ListenTCP() (net.Listener, error)

func (*Trojan) ListenUDP added in v1.0.1

func (a *Trojan) ListenUDP() (net.PacketConn, error)

func (*Trojan) Network added in v1.0.1

func (a *Trojan) Network() []string

func (*Trojan) NewConnection

func (h *Trojan) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*Trojan) NewError

func (a *Trojan) NewError(ctx context.Context, err error)

func (*Trojan) NewPacketConnection added in v1.0.1

func (h *Trojan) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*Trojan) Start

func (h *Trojan) Start() error

func (*Trojan) Tag

func (a *Trojan) Tag() string

func (*Trojan) Type

func (a *Trojan) Type() string

type Tun

type Tun struct {
	// contains filtered or unexported fields
}

func NewTun

func NewTun(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.TunInboundOptions, platformInterface platform.Interface) (*Tun, error)

func (*Tun) Close

func (t *Tun) Close() error

func (*Tun) NewConnection

func (t *Tun) NewConnection(ctx context.Context, conn net.Conn, upstreamMetadata M.Metadata) error

func (*Tun) NewError

func (t *Tun) NewError(ctx context.Context, err error)

func (*Tun) NewPacketConnection

func (t *Tun) NewPacketConnection(ctx context.Context, conn N.PacketConn, upstreamMetadata M.Metadata) error

func (*Tun) PostStart added in v1.10.0

func (t *Tun) PostStart() error

func (*Tun) Start

func (t *Tun) Start() error

func (*Tun) Tag

func (t *Tun) Tag() string

func (*Tun) Type

func (t *Tun) Type() string

type VLESS added in v1.2.0

type VLESS struct {
	// contains filtered or unexported fields
}

func NewVLESS added in v1.2.0

func NewVLESS(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.VLESSInboundOptions) (*VLESS, error)

func (*VLESS) Close added in v1.2.0

func (h *VLESS) Close() error

func (*VLESS) ListenTCP added in v1.2.0

func (a *VLESS) ListenTCP() (net.Listener, error)

func (*VLESS) ListenUDP added in v1.2.0

func (a *VLESS) ListenUDP() (net.PacketConn, error)

func (*VLESS) Network added in v1.2.0

func (a *VLESS) Network() []string

func (*VLESS) NewConnection added in v1.2.0

func (h *VLESS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*VLESS) NewError added in v1.2.0

func (a *VLESS) NewError(ctx context.Context, err error)

func (*VLESS) NewPacketConnection added in v1.2.0

func (h *VLESS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*VLESS) Start added in v1.2.0

func (h *VLESS) Start() error

func (*VLESS) Tag added in v1.2.0

func (a *VLESS) Tag() string

func (*VLESS) Type added in v1.2.0

func (a *VLESS) Type() string

type VMess

type VMess struct {
	// contains filtered or unexported fields
}

func NewVMess

func NewVMess(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.VMessInboundOptions) (*VMess, error)

func (*VMess) Close

func (h *VMess) Close() error

func (*VMess) ListenTCP added in v1.0.1

func (a *VMess) ListenTCP() (net.Listener, error)

func (*VMess) ListenUDP added in v1.0.1

func (a *VMess) ListenUDP() (net.PacketConn, error)

func (*VMess) Network added in v1.0.1

func (a *VMess) Network() []string

func (*VMess) NewConnection

func (h *VMess) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*VMess) NewError

func (a *VMess) NewError(ctx context.Context, err error)

func (*VMess) NewPacketConnection added in v1.0.1

func (h *VMess) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*VMess) Start

func (h *VMess) Start() error

func (*VMess) Tag

func (a *VMess) Tag() string

func (*VMess) Type

func (a *VMess) Type() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL