inbound

package
v0.0.0-...-890cd7e Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-2.0 Imports: 53 Imported by: 0

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, options option.Inbound, platformInterface platform.Interface) (adapter.Inbound, error)

func NewError

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

func NewHysteria

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

func NewShadowsocks

func NewShadowsocks(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.ShadowsocksInboundOptions) (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

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

func (*Direct) ListenUDP

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

func (*Direct) Network

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

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

func (*HTTP) ListenUDP

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

func (*HTTP) Network

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

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

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

func (*Mixed) ListenUDP

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

func (*Mixed) Network

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

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

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

func (*Naive) ListenUDP

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

func (*Naive) Network

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

func (*Naive) NewError

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

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

func (*Redirect) ListenUDP

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

func (*Redirect) Network

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

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

func NewShadowTLS

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

func (*ShadowTLS) Close

func (a *ShadowTLS) Close() error

func (*ShadowTLS) ListenTCP

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

func (*ShadowTLS) ListenUDP

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

func (*ShadowTLS) Network

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

func (*ShadowTLS) NewConnection

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

func (*ShadowTLS) NewError

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

func (*ShadowTLS) Start

func (a *ShadowTLS) Start() error

func (*ShadowTLS) Tag

func (a *ShadowTLS) Tag() string

func (*ShadowTLS) Type

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

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

func (*Shadowsocks) ListenUDP

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

func (*Shadowsocks) Network

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

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

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

func (*ShadowsocksMulti) ListenUDP

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

func (*ShadowsocksMulti) Network

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

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

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

func (*ShadowsocksRelay) ListenUDP

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

func (*ShadowsocksRelay) Network

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

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

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

func (*Socks) ListenUDP

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

func (*Socks) Network

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

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

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

func (*TProxy) ListenUDP

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

func (*TProxy) Network

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

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

func (*Trojan) ListenUDP

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

func (*Trojan) Network

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

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) Start

func (t *Tun) Start() error

func (*Tun) Tag

func (t *Tun) Tag() string

func (*Tun) Type

func (t *Tun) Type() string

type VLESS

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

func NewVLESS

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

func (*VLESS) Close

func (h *VLESS) Close() error

func (*VLESS) ListenTCP

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

func (*VLESS) ListenUDP

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

func (*VLESS) Network

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

func (*VLESS) NewConnection

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

func (*VLESS) NewError

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

func (*VLESS) NewPacketConnection

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

func (*VLESS) Start

func (h *VLESS) Start() error

func (*VLESS) Tag

func (a *VLESS) Tag() string

func (*VLESS) Type

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

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

func (*VMess) ListenUDP

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

func (*VMess) Network

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

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