Versions in this module Expand all Collapse all v0 v0.3.8 Mar 21, 2023 Changes in this version + var ErrorMissingQuery = errors.New("link missing query") + var ErrorNotSSLink = errors.New("not a correct ss link") + var ErrorNotSSRLink = errors.New("not a correct ssr link") + var ErrorNotTrojanink = errors.New("not a correct trojan link") + var ErrorNotVmessLink = errors.New("not a correct vmess link") + var ErrorObfsParamParseFail = errors.New("obfs param parse failed") + var ErrorPasswordParseFail = errors.New("password parse failed") + var ErrorPathNotComplete = errors.New("path not complete") + var ErrorProtocolParamParseFail = errors.New("protocol param parse failed") + var ErrorVmessPayloadParseFail = errors.New("vmess link payload parse failed") + var SSCipherList = []string + var SSRCipherList = []string + func GrepSSLinkFromString(text string) []string + func GrepSSRLinkFromString(text string) []string + func GrepTrojanLinkFromString(text string) []string + func GrepVmessLinkFromString(text string) []string + func InitGeoIpDB() + type Base struct + Country string + Name string + Port int + Server string + Type string + UDP bool + Useable bool + func (b *Base) BaseInfo() *Base + func (b *Base) Clone() Base + func (b *Base) SetCountry(country string) + func (b *Base) SetIP(ip string) + func (b *Base) SetName(name string) + func (b *Base) SetUseable(useable bool) + func (b *Base) TypeName() string + type CountryEmoji struct + Code string + Emoji string + type GeoIP struct + func NewGeoIP2() (geoip GeoIP) + func (g GeoIP) Find(ipORdomain string) (ip, country string, err error) + type HTTPOptions struct + Headers map[string][]string + Method string + Path []string + type Proxy interface + BaseInfo func() *Base + Clone func() Proxy + Identifier func() string + Link func() string + SetCountry func(country string) + SetIP func(ip string) + SetName func(name string) + SetUseable func(useable bool) + String func() string + ToClash func() string + ToSurge func() string + TypeName func() string + func CleanBadProxies(proxies []Proxy) (cproxies []Proxy) + func CleanBadProxiesWithGrpool(proxies []Proxy) (cproxies []Proxy) + type ProxyList []Proxy + func Deduplication(src ProxyList) ProxyList + func (ps ProxyList) Clone() ProxyList + func (ps ProxyList) Deduplication() ProxyList + func (ps ProxyList) Len() int + func (ps ProxyList) Less(i, j int) bool + func (ps ProxyList) NameAddCounrty() ProxyList + func (ps ProxyList) NameAddIndex() ProxyList + func (ps ProxyList) NameAddTG() ProxyList + func (ps ProxyList) NameReIndex() ProxyList + func (ps ProxyList) Sort() ProxyList + func (ps ProxyList) Swap(i, j int) + func (ps ProxyList) TypeLen(t string) int + type Shadowsocks struct + Cipher string + Password string + Plugin string + PluginOpts map[string]interface{} + func ParseSSLink(link string) (*Shadowsocks, error) + func SSR2SS(ssr *ShadowsocksR) (ss *Shadowsocks, err error) + func (ss Shadowsocks) Clone() Proxy + func (ss Shadowsocks) Identifier() string + func (ss Shadowsocks) Link() (link string) + func (ss Shadowsocks) String() string + func (ss Shadowsocks) ToClash() string + func (ss Shadowsocks) ToSurge() string + type ShadowsocksR struct + Cipher string + Group string + Obfs string + ObfsParam string + Password string + Protocol string + ProtocolParam string + func ParseSSRLink(link string) (*ShadowsocksR, error) + func SS2SSR(ss *Shadowsocks) (ssr *ShadowsocksR, err error) + func (ssr ShadowsocksR) Clone() Proxy + func (ssr ShadowsocksR) Identifier() string + func (ssr ShadowsocksR) Link() (link string) + func (ssr ShadowsocksR) String() string + func (ssr ShadowsocksR) ToClash() string + func (ssr ShadowsocksR) ToSurge() string + type Trojan struct + ALPN []string + Password string + SNI string + SkipCertVerify bool + UDP bool + func ParseTrojanLink(link string) (*Trojan, error) + func (t Trojan) Clone() Proxy + func (t Trojan) Identifier() string + func (t Trojan) Link() (link string) + func (t Trojan) String() string + func (t Trojan) ToClash() string + func (t Trojan) ToSurge() string + type Vmess struct + AlterID int + Cipher string + HTTPOpts HTTPOptions + Network string + ServerName string + SkipCertVerify bool + TLS bool + UUID string + WSHeaders map[string]string + WSPath string + func ParseVmessLink(link string) (*Vmess, error) + func (v Vmess) Clone() Proxy + func (v Vmess) Identifier() string + func (v Vmess) Link() (link string) + func (v Vmess) String() string + func (v Vmess) ToClash() string + func (v Vmess) ToSurge() string