Documentation ¶
Index ¶
- Constants
- func New(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Inbound, error)
- func NewError(logger log.ContextLogger, ctx context.Context, err error)
- func NewHysteria(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Inbound, error)
- func NewHysteria2(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Inbound, error)
- func NewShadowsocks(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Inbound, error)
- func NewTUIC(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Inbound, error)
- type Direct
- func (a *Direct) Close() error
- func (a *Direct) ListenTCP() (net.Listener, error)
- func (a *Direct) ListenUDP() (net.PacketConn, error)
- func (a *Direct) Network() []string
- func (d *Direct) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *Direct) NewError(ctx context.Context, err error)
- func (d *Direct) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, ...) error
- func (a *Direct) Start() error
- func (a *Direct) Tag() string
- func (a *Direct) Type() string
- type HTTP
- func (h *HTTP) Close() error
- func (a *HTTP) ListenTCP() (net.Listener, error)
- func (a *HTTP) ListenUDP() (net.PacketConn, error)
- func (a *HTTP) Network() []string
- func (h *HTTP) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *HTTP) NewError(ctx context.Context, err error)
- func (h *HTTP) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
- func (h *HTTP) Start() error
- func (a *HTTP) Tag() string
- func (a *HTTP) Type() string
- type Mixed
- func (a *Mixed) Close() error
- func (a *Mixed) ListenTCP() (net.Listener, error)
- func (a *Mixed) ListenUDP() (net.PacketConn, error)
- func (a *Mixed) Network() []string
- func (h *Mixed) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *Mixed) NewError(ctx context.Context, err error)
- func (h *Mixed) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
- func (a *Mixed) Start() error
- func (a *Mixed) Tag() string
- func (a *Mixed) Type() string
- type Naive
- func (n *Naive) Close() error
- func (a *Naive) ListenTCP() (net.Listener, error)
- func (a *Naive) ListenUDP() (net.PacketConn, error)
- func (a *Naive) Network() []string
- func (a *Naive) NewError(ctx context.Context, err error)
- func (n *Naive) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- func (n *Naive) Start() error
- func (a *Naive) Tag() string
- func (a *Naive) Type() string
- type Redirect
- func (a *Redirect) Close() error
- func (a *Redirect) ListenTCP() (net.Listener, error)
- func (a *Redirect) ListenUDP() (net.PacketConn, error)
- func (a *Redirect) Network() []string
- func (r *Redirect) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *Redirect) NewError(ctx context.Context, err error)
- func (a *Redirect) Start() error
- func (a *Redirect) Tag() string
- func (a *Redirect) Type() string
- type ShadowTLS
- func (a *ShadowTLS) Close() error
- func (a *ShadowTLS) ListenTCP() (net.Listener, error)
- func (a *ShadowTLS) ListenUDP() (net.PacketConn, error)
- func (a *ShadowTLS) Network() []string
- func (h *ShadowTLS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *ShadowTLS) NewError(ctx context.Context, err error)
- func (a *ShadowTLS) Start() error
- func (a *ShadowTLS) Tag() string
- func (a *ShadowTLS) Type() string
- type Shadowsocks
- func (a *Shadowsocks) Close() error
- func (a *Shadowsocks) ListenTCP() (net.Listener, error)
- func (a *Shadowsocks) ListenUDP() (net.PacketConn, error)
- func (a *Shadowsocks) Network() []string
- func (h *Shadowsocks) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *Shadowsocks) NewError(ctx context.Context, err error)
- func (h *Shadowsocks) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, ...) error
- func (h *Shadowsocks) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
- func (a *Shadowsocks) Start() error
- func (a *Shadowsocks) Tag() string
- func (a *Shadowsocks) Type() string
- type ShadowsocksMulti
- func (a *ShadowsocksMulti) Close() error
- func (a *ShadowsocksMulti) ListenTCP() (net.Listener, error)
- func (a *ShadowsocksMulti) ListenUDP() (net.PacketConn, error)
- func (a *ShadowsocksMulti) Network() []string
- func (h *ShadowsocksMulti) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *ShadowsocksMulti) NewError(ctx context.Context, err error)
- func (h *ShadowsocksMulti) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, ...) error
- func (h *ShadowsocksMulti) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
- func (a *ShadowsocksMulti) Start() error
- func (a *ShadowsocksMulti) Tag() string
- func (a *ShadowsocksMulti) Type() string
- type ShadowsocksRelay
- func (a *ShadowsocksRelay) Close() error
- func (a *ShadowsocksRelay) ListenTCP() (net.Listener, error)
- func (a *ShadowsocksRelay) ListenUDP() (net.PacketConn, error)
- func (a *ShadowsocksRelay) Network() []string
- func (h *ShadowsocksRelay) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *ShadowsocksRelay) NewError(ctx context.Context, err error)
- func (h *ShadowsocksRelay) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, ...) error
- func (h *ShadowsocksRelay) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
- func (a *ShadowsocksRelay) Start() error
- func (a *ShadowsocksRelay) Tag() string
- func (a *ShadowsocksRelay) Type() string
- type Socks
- func (a *Socks) Close() error
- func (a *Socks) ListenTCP() (net.Listener, error)
- func (a *Socks) ListenUDP() (net.PacketConn, error)
- func (a *Socks) Network() []string
- func (h *Socks) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *Socks) NewError(ctx context.Context, err error)
- func (h *Socks) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
- func (a *Socks) Start() error
- func (a *Socks) Tag() string
- func (a *Socks) Type() string
- type TProxy
- func (a *TProxy) Close() error
- func (a *TProxy) ListenTCP() (net.Listener, error)
- func (a *TProxy) ListenUDP() (net.PacketConn, error)
- func (a *TProxy) Network() []string
- func (t *TProxy) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *TProxy) NewError(ctx context.Context, err error)
- func (t *TProxy) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, oob []byte, ...) error
- func (t *TProxy) Start() error
- func (a *TProxy) Tag() string
- func (a *TProxy) Type() string
- type Trojan
- func (h *Trojan) Close() error
- func (a *Trojan) ListenTCP() (net.Listener, error)
- func (a *Trojan) ListenUDP() (net.PacketConn, error)
- func (a *Trojan) Network() []string
- func (h *Trojan) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *Trojan) NewError(ctx context.Context, err error)
- func (h *Trojan) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
- func (h *Trojan) Start() error
- func (a *Trojan) Tag() string
- func (a *Trojan) Type() string
- type Tun
- func (t *Tun) Close() error
- func (t *Tun) NewConnection(ctx context.Context, conn net.Conn, upstreamMetadata M.Metadata) error
- func (t *Tun) NewError(ctx context.Context, err error)
- func (t *Tun) NewPacketConnection(ctx context.Context, conn N.PacketConn, upstreamMetadata M.Metadata) error
- func (t *Tun) Start() error
- func (t *Tun) Tag() string
- func (t *Tun) Type() string
- type VLESS
- func (h *VLESS) Close() error
- func (a *VLESS) ListenTCP() (net.Listener, error)
- func (a *VLESS) ListenUDP() (net.PacketConn, error)
- func (a *VLESS) Network() []string
- func (h *VLESS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *VLESS) NewError(ctx context.Context, err error)
- func (h *VLESS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
- func (h *VLESS) Start() error
- func (a *VLESS) Tag() string
- func (a *VLESS) Type() string
- type VMess
- func (h *VMess) Close() error
- func (a *VMess) ListenTCP() (net.Listener, error)
- func (a *VMess) ListenUDP() (net.PacketConn, error)
- func (a *VMess) Network() []string
- func (h *VMess) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error
- func (a *VMess) NewError(ctx context.Context, err error)
- func (h *VMess) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
- func (h *VMess) Start() error
- func (a *VMess) Tag() string
- func (a *VMess) Type() string
Constants ¶
View Source
const ( NF_NAT_RANGE_MAP_IPS = 1 << iota NF_NAT_RANGE_PROTO_SPECIFIED NF_NAT_RANGE_PROTO_RANDOM NF_NAT_RANGE_PERSISTENT NF_NAT_RANGE_PROTO_RANDOM_FULLY NF_NAT_RANGE_PROTO_OFFSET )
Variables ¶
This section is empty.
Functions ¶
func NewHysteria ¶ added in v1.0.1
func NewHysteria2 ¶ added in v1.4.3
func NewShadowsocks ¶
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) ListenUDP ¶ added in v1.0.1
func (a *Direct) ListenUDP() (net.PacketConn, error)
func (*Direct) NewConnection ¶
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
func (*HTTP) ListenUDP ¶ added in v1.0.1
func (a *HTTP) ListenUDP() (net.PacketConn, error)
func (*HTTP) NewConnection ¶
func (*HTTP) NewPacketConnection ¶ added in v1.0.1
func (h *HTTP) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
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) ListenUDP ¶ added in v1.0.1
func (a *Mixed) ListenUDP() (net.PacketConn, error)
func (*Mixed) NewConnection ¶
func (*Mixed) NewPacketConnection ¶ added in v1.0.1
func (h *Mixed) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
type Naive ¶
type Naive struct {
// contains filtered or unexported fields
}
func (*Naive) ListenUDP ¶ added in v1.0.1
func (a *Naive) ListenUDP() (net.PacketConn, error)
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) ListenUDP ¶ added in v1.0.1
func (a *Redirect) ListenUDP() (net.PacketConn, error)
func (*Redirect) NewConnection ¶
type ShadowTLS ¶ added in v1.0.1
type ShadowTLS struct {
// contains filtered or unexported fields
}
func NewShadowTLS ¶ added in v1.0.1
func (*ShadowTLS) ListenUDP ¶ added in v1.0.1
func (a *ShadowTLS) ListenUDP() (net.PacketConn, error)
func (*ShadowTLS) NewConnection ¶ added in v1.0.1
type Shadowsocks ¶
type Shadowsocks struct {
// contains filtered or unexported fields
}
func (*Shadowsocks) ListenUDP ¶ added in v1.0.1
func (a *Shadowsocks) ListenUDP() (net.PacketConn, error)
func (*Shadowsocks) NewConnection ¶
func (h *Shadowsocks) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) 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
type ShadowsocksMulti ¶
type ShadowsocksMulti struct {
// contains filtered or unexported fields
}
func (*ShadowsocksMulti) ListenUDP ¶ added in v1.0.1
func (a *ShadowsocksMulti) ListenUDP() (net.PacketConn, error)
func (*ShadowsocksMulti) NewConnection ¶
func (h *ShadowsocksMulti) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) 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
type ShadowsocksRelay ¶
type ShadowsocksRelay struct {
// contains filtered or unexported fields
}
func (*ShadowsocksRelay) ListenUDP ¶ added in v1.0.1
func (a *ShadowsocksRelay) ListenUDP() (net.PacketConn, error)
func (*ShadowsocksRelay) NewConnection ¶
func (h *ShadowsocksRelay) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) 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
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) ListenUDP ¶ added in v1.0.1
func (a *Socks) ListenUDP() (net.PacketConn, error)
func (*Socks) NewConnection ¶
func (*Socks) NewPacketConnection ¶ added in v1.0.1
func (h *Socks) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
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) ListenUDP ¶ added in v1.0.1
func (a *TProxy) ListenUDP() (net.PacketConn, error)
func (*TProxy) NewConnection ¶
type Trojan ¶
type Trojan struct {
// contains filtered or unexported fields
}
func (*Trojan) ListenUDP ¶ added in v1.0.1
func (a *Trojan) ListenUDP() (net.PacketConn, error)
func (*Trojan) NewConnection ¶
func (*Trojan) NewPacketConnection ¶ added in v1.0.1
func (h *Trojan) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
type Tun ¶
type Tun struct {
// contains filtered or unexported fields
}
func (*Tun) NewConnection ¶
func (*Tun) NewPacketConnection ¶
type VLESS ¶ added in v1.2.0
type VLESS struct {
// contains filtered or unexported fields
}
func (*VLESS) ListenUDP ¶ added in v1.2.0
func (a *VLESS) ListenUDP() (net.PacketConn, error)
func (*VLESS) NewConnection ¶ added in v1.2.0
func (*VLESS) NewPacketConnection ¶ added in v1.2.0
func (h *VLESS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
type VMess ¶
type VMess struct {
// contains filtered or unexported fields
}
func (*VMess) ListenUDP ¶ added in v1.0.1
func (a *VMess) ListenUDP() (net.PacketConn, error)
func (*VMess) NewConnection ¶
func (*VMess) NewPacketConnection ¶ added in v1.0.1
func (h *VMess) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error
Source Files ¶
- builder.go
- default.go
- default_tcp.go
- default_tcp_go1.20.go
- default_tcp_go1.21.go
- default_udp.go
- direct.go
- http.go
- hysteria_stub.go
- mixed.go
- naive.go
- naive_quic_stub.go
- redirect.go
- shadowsocks.go
- shadowsocks_multi.go
- shadowsocks_relay.go
- shadowtls.go
- socks.go
- tproxy.go
- trojan.go
- tuic_stub.go
- tun.go
- tun_auto_redirect.go
- tun_auto_redirect_iptables.go
- tun_auto_redirect_nftables.go
- tun_auto_redirect_nftables_expr.go
- vless.go
- vmess.go
Click to show internal directories.
Click to hide internal directories.