Documentation
¶
Index ¶
- Variables
- func ParseHysteria(proxy string) (model.Outbound, error)
- func ParseHysteria2(proxy string) (model.Outbound, error)
- func ParsePort(portStr string) (uint16, error)
- func ParseShadowsocks(proxy string) (model.Outbound, error)
- func ParseSocks(proxy string) (model.Outbound, error)
- func ParseTrojan(proxy string) (model.Outbound, error)
- func ParseVless(proxy string) (model.Outbound, error)
- func ParseVmess(proxy string) (model.Outbound, error)
- type ParseError
- type ParseErrorType
Constants ¶
This section is empty.
Variables ¶
View Source
var ParserMap map[string]func(string) (model.Outbound, error) = map[string]func(string) (model.Outbound, error){ constant.ShadowsocksPrefix: ParseShadowsocks, constant.VMessPrefix: ParseVmess, constant.TrojanPrefix: ParseTrojan, constant.VLESSPrefix: ParseVless, constant.HysteriaPrefix: ParseHysteria, constant.Hysteria2Prefix1: ParseHysteria2, constant.Hysteria2Prefix2: ParseHysteria2, constant.SocksPrefix: ParseSocks, }
Functions ¶
Types ¶
type ParseError ¶
type ParseError struct { Type ParseErrorType Message string Raw string }
func (*ParseError) Error ¶
func (e *ParseError) Error() string
type ParseErrorType ¶
type ParseErrorType string
const ( ErrInvalidPrefix ParseErrorType = "invalid url prefix" ErrInvalidStruct ParseErrorType = "invalid struct" ErrInvalidPort ParseErrorType = "invalid port number" )
Click to show internal directories.
Click to hide internal directories.