inbound

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

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

func NewBase

func NewBase(options *BaseOption) (*Base, error)

func (*Base) Additions

func (b *Base) Additions() []inbound.Addition

func (*Base) Address

func (b *Base) Address() string

Address implements constant.InboundListener

func (*Base) Close

func (*Base) Close() error

Close implements constant.InboundListener

func (*Base) Config

func (b *Base) Config() C.InboundConfig

Config implements constant.InboundListener

func (*Base) Listen

func (*Base) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

func (*Base) Name

func (b *Base) Name() string

Name implements constant.InboundListener

func (*Base) RawAddress

func (b *Base) RawAddress() string

RawAddress implements constant.InboundListener

type BaseOption

type BaseOption struct {
	NameStr      string `inbound:"name"`
	Listen       string `inbound:"listen,omitempty"`
	Port         int    `inbound:"port,omitempty"`
	SpecialRules string `inbound:"rule,omitempty"`
	SpecialProxy string `inbound:"proxy,omitempty"`
}

func (BaseOption) Additions

func (o BaseOption) Additions() []inbound.Addition

func (BaseOption) Equal

func (o BaseOption) Equal(config C.InboundConfig) bool

func (BaseOption) Name

func (o BaseOption) Name() string

type HTTP

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

func NewHTTP

func NewHTTP(options *HTTPOption) (*HTTP, error)

func (*HTTP) Address

func (h *HTTP) Address() string

Address implements constant.InboundListener

func (*HTTP) Close

func (h *HTTP) Close() error

Close implements constant.InboundListener

func (*HTTP) Config

func (h *HTTP) Config() C.InboundConfig

Config implements constant.InboundListener

func (*HTTP) Listen

func (h *HTTP) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type HTTPOption

type HTTPOption struct {
	BaseOption
}

func (HTTPOption) Equal

func (o HTTPOption) Equal(config C.InboundConfig) bool

type Hysteria2

type Hysteria2 struct {
	*Base
	// contains filtered or unexported fields
}

func NewHysteria2

func NewHysteria2(options *Hysteria2Option) (*Hysteria2, error)

func (*Hysteria2) Address

func (t *Hysteria2) Address() string

Address implements constant.InboundListener

func (*Hysteria2) Close

func (t *Hysteria2) Close() error

Close implements constant.InboundListener

func (*Hysteria2) Config

func (t *Hysteria2) Config() C.InboundConfig

Config implements constant.InboundListener

func (*Hysteria2) Listen

func (t *Hysteria2) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type Hysteria2Option

type Hysteria2Option struct {
	BaseOption
	Users                 map[string]string `inbound:"users,omitempty"`
	Obfs                  string            `inbound:"obfs,omitempty"`
	ObfsPassword          string            `inbound:"obfs-password,omitempty"`
	Certificate           string            `inbound:"certificate"`
	PrivateKey            string            `inbound:"private-key"`
	MaxIdleTime           int               `inbound:"max-idle-time,omitempty"`
	ALPN                  []string          `inbound:"alpn,omitempty"`
	Up                    string            `inbound:"up,omitempty"`
	Down                  string            `inbound:"down,omitempty"`
	IgnoreClientBandwidth bool              `inbound:"ignore-client-bandwidth,omitempty"`
	Masquerade            string            `inbound:"masquerade,omitempty"`
	CWND                  int               `inbound:"cwnd,omitempty"`
}

func (Hysteria2Option) Equal

func (o Hysteria2Option) Equal(config C.InboundConfig) bool

type Mixed

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

func NewMixed

func NewMixed(options *MixedOption) (*Mixed, error)

func (*Mixed) Address

func (m *Mixed) Address() string

Address implements constant.InboundListener

func (*Mixed) Close

func (m *Mixed) Close() error

Close implements constant.InboundListener

func (*Mixed) Config

func (m *Mixed) Config() C.InboundConfig

Config implements constant.InboundListener

func (*Mixed) Listen

func (m *Mixed) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type MixedOption

type MixedOption struct {
	BaseOption
	UDP bool `inbound:"udp,omitempty"`
}

func (MixedOption) Equal

func (o MixedOption) Equal(config C.InboundConfig) bool

type Redir

type Redir struct {
	*Base
	// contains filtered or unexported fields
}

func NewRedir

func NewRedir(options *RedirOption) (*Redir, error)

func (*Redir) Address

func (r *Redir) Address() string

Address implements constant.InboundListener

func (*Redir) Close

func (r *Redir) Close() error

Close implements constant.InboundListener

func (*Redir) Config

func (r *Redir) Config() C.InboundConfig

Config implements constant.InboundListener

func (*Redir) Listen

func (r *Redir) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type RedirOption

type RedirOption struct {
	BaseOption
}

func (RedirOption) Equal

func (o RedirOption) Equal(config C.InboundConfig) bool

type ShadowSocks

type ShadowSocks struct {
	*Base
	// contains filtered or unexported fields
}

func NewShadowSocks

func NewShadowSocks(options *ShadowSocksOption) (*ShadowSocks, error)

func (*ShadowSocks) Address

func (s *ShadowSocks) Address() string

Address implements constant.InboundListener

func (*ShadowSocks) Close

func (s *ShadowSocks) Close() error

Close implements constant.InboundListener

func (*ShadowSocks) Config

func (s *ShadowSocks) Config() C.InboundConfig

Config implements constant.InboundListener

func (*ShadowSocks) Listen

func (s *ShadowSocks) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type ShadowSocksOption

type ShadowSocksOption struct {
	BaseOption
	Password string `inbound:"password"`
	Cipher   string `inbound:"cipher"`
	UDP      bool   `inbound:"udp,omitempty"`
}

func (ShadowSocksOption) Equal

func (o ShadowSocksOption) Equal(config C.InboundConfig) bool

type Socks

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

func NewSocks

func NewSocks(options *SocksOption) (*Socks, error)

func (*Socks) Address

func (s *Socks) Address() string

Address implements constant.InboundListener

func (*Socks) Close

func (s *Socks) Close() error

Close implements constant.InboundListener

func (*Socks) Config

func (s *Socks) Config() C.InboundConfig

Config implements constant.InboundListener

func (*Socks) Listen

func (s *Socks) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type SocksOption

type SocksOption struct {
	BaseOption
	UDP bool `inbound:"udp,omitempty"`
}

func (SocksOption) Equal

func (o SocksOption) Equal(config C.InboundConfig) bool

type TProxy

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

func NewTProxy

func NewTProxy(options *TProxyOption) (*TProxy, error)

func (*TProxy) Address

func (t *TProxy) Address() string

Address implements constant.InboundListener

func (*TProxy) Close

func (t *TProxy) Close() error

Close implements constant.InboundListener

func (*TProxy) Config

func (t *TProxy) Config() C.InboundConfig

Config implements constant.InboundListener

func (*TProxy) Listen

func (t *TProxy) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type TProxyOption

type TProxyOption struct {
	BaseOption
	UDP bool `inbound:"udp,omitempty"`
}

func (TProxyOption) Equal

func (o TProxyOption) Equal(config C.InboundConfig) bool

type Tuic

type Tuic struct {
	*Base
	// contains filtered or unexported fields
}

func NewTuic

func NewTuic(options *TuicOption) (*Tuic, error)

func (*Tuic) Address

func (t *Tuic) Address() string

Address implements constant.InboundListener

func (*Tuic) Close

func (t *Tuic) Close() error

Close implements constant.InboundListener

func (*Tuic) Config

func (t *Tuic) Config() C.InboundConfig

Config implements constant.InboundListener

func (*Tuic) Listen

func (t *Tuic) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type TuicOption

type TuicOption struct {
	BaseOption
	Token                 []string          `inbound:"token,omitempty"`
	Users                 map[string]string `inbound:"users,omitempty"`
	Certificate           string            `inbound:"certificate"`
	PrivateKey            string            `inbound:"private-key"`
	CongestionController  string            `inbound:"congestion-controller,omitempty"`
	MaxIdleTime           int               `inbound:"max-idle-time,omitempty"`
	AuthenticationTimeout int               `inbound:"authentication-timeout,omitempty"`
	ALPN                  []string          `inbound:"alpn,omitempty"`
	MaxUdpRelayPacketSize int               `inbound:"max-udp-relay-packet-size,omitempty"`
	CWND                  int               `inbound:"cwnd,omitempty"`
}

func (TuicOption) Equal

func (o TuicOption) Equal(config C.InboundConfig) bool

type Tun

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

func NewTun

func NewTun(options *TunOption) (*Tun, error)

func (*Tun) Address

func (t *Tun) Address() string

Address implements constant.InboundListener

func (*Tun) Close

func (t *Tun) Close() error

Close implements constant.InboundListener

func (*Tun) Config

func (t *Tun) Config() C.InboundConfig

Config implements constant.InboundListener

func (*Tun) Listen

func (t *Tun) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type TunOption

type TunOption struct {
	BaseOption
	Device              string   `inbound:"device,omitempty"`
	Stack               string   `inbound:"stack,omitempty"`
	DNSHijack           []string `inbound:"dns-hijack,omitempty"`
	AutoRoute           bool     `inbound:"auto-route,omitempty"`
	AutoDetectInterface bool     `inbound:"auto-detect-interface,omitempty"`

	MTU                      uint32   `inbound:"mtu,omitempty"`
	Inet4Address             []string `inbound:"inet4_address,omitempty"`
	Inet6Address             []string `inbound:"inet6_address,omitempty"`
	StrictRoute              bool     `inbound:"strict_route,omitempty"`
	Inet4RouteAddress        []string `inbound:"inet4_route_address,omitempty"`
	Inet6RouteAddress        []string `inbound:"inet6_route_address,omitempty"`
	Inet4RouteExcludeAddress []string `inbound:"inet4_route_exclude_address,omitempty"`
	Inet6RouteExcludeAddress []string `inbound:"inet6_route_exclude_address,omitempty"`
	IncludeUID               []uint32 `inbound:"include_uid,omitempty"`
	IncludeUIDRange          []string `inbound:"include_uid_range,omitempty"`
	ExcludeUID               []uint32 `inbound:"exclude_uid,omitempty"`
	ExcludeUIDRange          []string `inbound:"exclude_uid_range,omitempty"`
	IncludeAndroidUser       []int    `inbound:"include_android_user,omitempty"`
	IncludePackage           []string `inbound:"include_package,omitempty"`
	ExcludePackage           []string `inbound:"exclude_package,omitempty"`
	EndpointIndependentNat   bool     `inbound:"endpoint_independent_nat,omitempty"`
	UDPTimeout               int64    `inbound:"udp_timeout,omitempty"`
	FileDescriptor           int      `inbound:"file-descriptor,omitempty"`
}

func (TunOption) Equal

func (o TunOption) Equal(config C.InboundConfig) bool

type Tunnel

type Tunnel struct {
	*Base
	// contains filtered or unexported fields
}

func NewTunnel

func NewTunnel(options *TunnelOption) (*Tunnel, error)

func (*Tunnel) Address

func (t *Tunnel) Address() string

Address implements constant.InboundListener

func (*Tunnel) Close

func (t *Tunnel) Close() error

Close implements constant.InboundListener

func (*Tunnel) Config

func (t *Tunnel) Config() C.InboundConfig

Config implements constant.InboundListener

func (*Tunnel) Listen

func (t *Tunnel) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type TunnelOption

type TunnelOption struct {
	BaseOption
	Network []string `inbound:"network"`
	Target  string   `inbound:"target"`
}

func (TunnelOption) Equal

func (o TunnelOption) Equal(config C.InboundConfig) bool

type Vmess

type Vmess struct {
	*Base
	// contains filtered or unexported fields
}

func NewVmess

func NewVmess(options *VmessOption) (*Vmess, error)

func (*Vmess) Address

func (v *Vmess) Address() string

Address implements constant.InboundListener

func (*Vmess) Close

func (v *Vmess) Close() error

Close implements constant.InboundListener

func (*Vmess) Config

func (v *Vmess) Config() C.InboundConfig

Config implements constant.InboundListener

func (*Vmess) Listen

func (v *Vmess) Listen(tunnel C.Tunnel) error

Listen implements constant.InboundListener

type VmessOption

type VmessOption struct {
	BaseOption
	Users       []VmessUser `inbound:"users"`
	WsPath      string      `inbound:"ws-path,omitempty"`
	Certificate string      `inbound:"certificate,omitempty"`
	PrivateKey  string      `inbound:"private-key,omitempty"`
}

func (VmessOption) Equal

func (o VmessOption) Equal(config C.InboundConfig) bool

type VmessUser

type VmessUser struct {
	Username string `inbound:"username,omitempty"`
	UUID     string `inbound:"uuid"`
	AlterID  int    `inbound:"alterId"`
}

Jump to

Keyboard shortcuts

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