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