Versions in this module Expand all Collapse all v0 v0.7.13 Oct 27, 2023 Changes in this version + var DelayConn = 500 + var DelayTimeout = defaultURLTestTimeout + var RelayTimeout = defaultURLTestTimeout * 2 + var SpeedConn = 5 + var SpeedExist = false + var SpeedTimeout = time.Second * 10 + func CleanBadProxies(proxies []proxy.Proxy) (cproxies []proxy.Proxy) + func CleanBadProxiesWithGrpool(proxies []proxy.Proxy) (cproxies []proxy.Proxy) + func HTTPGetBodyViaProxy(clashProxy C.Proxy, url string) ([]byte, error) + func HTTPGetBodyViaProxyWithTime(clashProxy C.Proxy, url string, t time.Duration) ([]byte, error) + func HTTPGetBodyViaProxyWithTimeNoReturn(clashProxy C.Proxy, url string, t time.Duration) error + func HTTPGetViaProxy(clashProxy C.Proxy, url string) error + func HTTPHeadViaProxy(clashProxy C.Proxy, url string) error + func PingFromChina(host string, port string) (bool, time.Duration, error) + func ProxySpeedTest(p proxy.Proxy) (speedResult float64, err error) + func RelayCheck(proxies proxy.ProxyList) + func SpeedTestAll(proxies []proxy.Proxy) (cproxies []proxy.Proxy) + func SpeedTestNew(proxies []proxy.Proxy) + type ByDistance struct + func (b ByDistance) Less(i, j int) bool + type Server struct + Country string + DLSpeed float64 + Distance float64 + Host string + ID string + Lat string + Lon string + Name string + Sponsor string + URL string + URL2 string + type ServerList struct + Servers []Server + type Servers []Server + func (s Servers) Len() int + func (s Servers) Swap(i, j int) + func (svrs Servers) GetResult() float64 + func (svrs Servers) StartTest(clashProxy C.Proxy) + type Stat struct + Delay time.Duration + Id string + OutIp string + Pool bool + Relay bool + ReqCount uint16 + Speed float64 + func (ps *Stat) UpdatePSCount() + func (ps *Stat) UpdatePSDelay(delay time.Duration) + func (ps *Stat) UpdatePSOutIp(outIp string) + func (ps *Stat) UpdatePSSpeed(speed float64) + type StatList []Stat + var ProxyStats StatList + func (psList StatList) Find(p proxy.Proxy) (*Stat, bool) + func (psList StatList) ReqCountThan(n uint16, pl []proxy.Proxy, reset bool) []proxy.Proxy + func (psList StatList) SortProxiesBySpeed(proxies []proxy.Proxy) []proxy.Proxy + type User struct + IP string + Isp string + Lat string + Lon string + type Users struct + Users []User