Documentation
¶
Index ¶
- func DecodeBase64(s string) (string, error)
- func GetAllParsers() map[string]ProxyParser
- func ParsePort(portStr string) (int, error)
- func ParseProxies(proxies ...string) []P.Proxy
- func ParseProxyWithRegistry(proxy string) (P.Proxy, error)
- func RegisterParser(parser ProxyParser)
- type AnytlsParser
- type Hysteria2Parser
- type HysteriaParser
- type ProxyParser
- type ShadowsocksParser
- type ShadowsocksRParser
- type SocksParser
- type TrojanParser
- type VlessParser
- type VmessParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBase64 ¶
func ParseProxies ¶
func ParseProxyWithRegistry ¶
ParseProxyWithRegistry 使用注册机制解析代理
Types ¶
type AnytlsParser ¶
type AnytlsParser struct{}
func (*AnytlsParser) GetPrefixes ¶
func (p *AnytlsParser) GetPrefixes() []string
func (*AnytlsParser) GetType ¶
func (p *AnytlsParser) GetType() string
func (*AnytlsParser) SupportClash ¶
func (p *AnytlsParser) SupportClash() bool
func (*AnytlsParser) SupportMeta ¶
func (p *AnytlsParser) SupportMeta() bool
type Hysteria2Parser ¶
type Hysteria2Parser struct{}
func (*Hysteria2Parser) GetPrefixes ¶
func (p *Hysteria2Parser) GetPrefixes() []string
func (*Hysteria2Parser) GetType ¶
func (p *Hysteria2Parser) GetType() string
func (*Hysteria2Parser) SupportClash ¶
func (p *Hysteria2Parser) SupportClash() bool
func (*Hysteria2Parser) SupportMeta ¶
func (p *Hysteria2Parser) SupportMeta() bool
type HysteriaParser ¶
type HysteriaParser struct{}
func (*HysteriaParser) GetPrefixes ¶
func (p *HysteriaParser) GetPrefixes() []string
func (*HysteriaParser) GetType ¶
func (p *HysteriaParser) GetType() string
func (*HysteriaParser) SupportClash ¶
func (p *HysteriaParser) SupportClash() bool
func (*HysteriaParser) SupportMeta ¶
func (p *HysteriaParser) SupportMeta() bool
type ProxyParser ¶
type ProxyParser interface {
// Parse 解析代理字符串并返回Proxy对象
Parse(proxy string) (P.Proxy, error)
// GetPrefix 返回支持的协议前缀(可以返回多个)
GetPrefixes() []string
// GetType 返回协议类型名称
GetType() string
SupportClash() bool
SupportMeta() bool
}
ProxyParser 定义代理解析器接口
type ShadowsocksParser ¶
type ShadowsocksParser struct{}
ShadowsocksParser Shadowsocks协议解析器
func (*ShadowsocksParser) GetPrefixes ¶
func (p *ShadowsocksParser) GetPrefixes() []string
GetPrefixes 返回支持的协议前缀
func (*ShadowsocksParser) Parse ¶
func (p *ShadowsocksParser) Parse(proxy string) (P.Proxy, error)
Parse 解析Shadowsocks代理
func (*ShadowsocksParser) SupportClash ¶
func (p *ShadowsocksParser) SupportClash() bool
func (*ShadowsocksParser) SupportMeta ¶
func (p *ShadowsocksParser) SupportMeta() bool
type ShadowsocksRParser ¶
type ShadowsocksRParser struct{}
func (*ShadowsocksRParser) GetPrefixes ¶
func (p *ShadowsocksRParser) GetPrefixes() []string
func (*ShadowsocksRParser) GetType ¶
func (p *ShadowsocksRParser) GetType() string
func (*ShadowsocksRParser) Parse ¶
func (p *ShadowsocksRParser) Parse(proxy string) (P.Proxy, error)
func (*ShadowsocksRParser) SupportClash ¶
func (p *ShadowsocksRParser) SupportClash() bool
func (*ShadowsocksRParser) SupportMeta ¶
func (p *ShadowsocksRParser) SupportMeta() bool
type SocksParser ¶
type SocksParser struct{}
func (*SocksParser) GetPrefixes ¶
func (p *SocksParser) GetPrefixes() []string
func (*SocksParser) GetType ¶
func (p *SocksParser) GetType() string
func (*SocksParser) SupportClash ¶
func (p *SocksParser) SupportClash() bool
func (*SocksParser) SupportMeta ¶
func (p *SocksParser) SupportMeta() bool
type TrojanParser ¶
type TrojanParser struct{}
func (*TrojanParser) GetPrefixes ¶
func (p *TrojanParser) GetPrefixes() []string
func (*TrojanParser) GetType ¶
func (p *TrojanParser) GetType() string
func (*TrojanParser) SupportClash ¶
func (p *TrojanParser) SupportClash() bool
func (*TrojanParser) SupportMeta ¶
func (p *TrojanParser) SupportMeta() bool
type VlessParser ¶
type VlessParser struct{}
func (*VlessParser) GetPrefixes ¶
func (p *VlessParser) GetPrefixes() []string
func (*VlessParser) GetType ¶
func (p *VlessParser) GetType() string
func (*VlessParser) SupportClash ¶
func (p *VlessParser) SupportClash() bool
func (*VlessParser) SupportMeta ¶
func (p *VlessParser) SupportMeta() bool
type VmessParser ¶
type VmessParser struct{}
func (*VmessParser) GetPrefixes ¶
func (p *VmessParser) GetPrefixes() []string
func (*VmessParser) GetType ¶
func (p *VmessParser) GetType() string
func (*VmessParser) SupportClash ¶
func (p *VmessParser) SupportClash() bool
func (*VmessParser) SupportMeta ¶
func (p *VmessParser) SupportMeta() bool
Click to show internal directories.
Click to hide internal directories.