Documentation ¶
Index ¶
- type Base
- type BaseOption
- type BrutalOptions
- type HTTP
- type HTTPOption
- type Hysteria2
- type Hysteria2Option
- type Mixed
- type MixedOption
- type MuxOption
- type Redir
- type RedirOption
- type ShadowSocks
- type ShadowSocksOption
- type Socks
- type SocksOption
- type TProxy
- type TProxyOption
- type Tuic
- type TuicOption
- type Tun
- type TunOption
- type Tunnel
- type TunnelOption
- type Vmess
- type VmessOption
- type VmessUser
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) Config ¶
func (b *Base) Config() C.InboundConfig
Config implements constant.InboundListener
func (*Base) RawAddress ¶
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 BrutalOptions ¶
type HTTP ¶
type HTTP struct { *Base // contains filtered or unexported fields }
func NewHTTP ¶
func NewHTTP(options *HTTPOption) (*HTTP, error)
func (*HTTP) Config ¶
func (h *HTTP) Config() C.InboundConfig
Config 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) Config ¶
func (t *Hysteria2) Config() C.InboundConfig
Config 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"` UdpMTU int `inbound:"udp-mtu,omitempty"` MuxOption MuxOption `inbound:"mux-option,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) Config ¶
func (m *Mixed) Config() C.InboundConfig
Config 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 MuxOption ¶
type MuxOption struct { Padding bool `inbound:"padding,omitempty"` Brutal BrutalOptions `inbound:"brutal,omitempty"` }
type Redir ¶
type Redir struct { *Base // contains filtered or unexported fields }
func NewRedir ¶
func NewRedir(options *RedirOption) (*Redir, error)
func (*Redir) Config ¶
func (r *Redir) Config() C.InboundConfig
Config 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
type ShadowSocksOption ¶
type ShadowSocksOption struct { BaseOption Password string `inbound:"password"` Cipher string `inbound:"cipher"` UDP bool `inbound:"udp,omitempty"` MuxOption MuxOption `inbound:"mux-option,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) Config ¶
func (s *Socks) Config() C.InboundConfig
Config 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) Config ¶
func (t *TProxy) Config() C.InboundConfig
Config 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) Config ¶
func (t *Tuic) Config() C.InboundConfig
Config 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"` MuxOption MuxOption `inbound:"mux-option,omitempty"` }
func (TuicOption) Equal ¶
func (o TuicOption) Equal(config C.InboundConfig) bool
type Tun ¶
type Tun struct { *Base // contains filtered or unexported fields }
func (*Tun) Config ¶
func (t *Tun) Config() C.InboundConfig
Config 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"` GSO bool `inbound:"gso,omitempty"` GSOMaxSize uint32 `inbound:"gso-max-size,omitempty"` Inet4Address []string `inbound:"inet4_address,omitempty"` Inet6Address []string `inbound:"inet6_address,omitempty"` IPRoute2TableIndex int `inbound:"iproute2-table-index"` IPRoute2RuleIndex int `inbound:"iproute2-rule-index"` AutoRedirect bool `inbound:"auto-redirect"` AutoRedirectInputMark uint32 `inbound:"auto-redirect-input-mark"` AutoRedirectOutputMark uint32 `inbound:"auto-redirect-output-mark"` StrictRoute bool `inbound:"strict_route,omitempty"` RouteAddress []string `inbound:"route-address"` RouteAddressSet []string `inbound:"route-address-set"` RouteExcludeAddress []string `inbound:"route-exclude-address"` RouteExcludeAddressSet []string `inbound:"route-exclude-address-set"` IncludeInterface []string `inbound:"include-interface,omitempty"` ExcludeInterface []string `inbound:"exclude-interface"` 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"` 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"` }
type Tunnel ¶
type Tunnel struct { *Base // contains filtered or unexported fields }
func NewTunnel ¶
func NewTunnel(options *TunnelOption) (*Tunnel, error)
func (*Tunnel) Config ¶
func (t *Tunnel) Config() C.InboundConfig
Config 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) Config ¶
func (v *Vmess) Config() C.InboundConfig
Config 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"` MuxOption MuxOption `inbound:"mux-option,omitempty"` }
func (VmessOption) Equal ¶
func (o VmessOption) Equal(config C.InboundConfig) bool