app

package
v1.1.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2025 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Getters = make([]getter.Getter, 0)

Functions

func CrawlBestNode added in v0.10.3

func CrawlBestNode()

func CrawlGo

func CrawlGo()

func ExtractHostPort added in v0.10.0

func ExtractHostPort(link string) (addr string, err error)

func InitConfigAndGetters

func InitConfigAndGetters(path string) (err error)

func IsIPv6 added in v1.0.12

func IsIPv6(addr string) bool

func SpeedTest

func SpeedTest(proxies proxy.ProxyList)

Speed test for all proxies in proxy.ProxyList

func SubNiceCfProxyIp added in v1.0.4

func SubNiceCfProxyIp(format string, distNodeCountry string, isIPV6 bool) (s string, err error)

func SubNiceCfProxyIpProvider added in v1.0.7

func SubNiceCfProxyIpProvider(format string, isp string, distNodeCountry string, isIPV6 bool) (s string, err error)

SubNiceCfProxyIpProvider 获取 https://vps789.com/openApi/cfIpApi

func SubNiceCfProxyIpTop20 added in v1.0.6

func SubNiceCfProxyIpTop20(format string, distNodeCountry string, isConvertIp bool, isIPV6 bool) (s string, err error)

SubNiceCfProxyIpTop20 获取 https://vps789.com/openApi/cfIpTop20

func SubNiceCfProxySub added in v1.0.9

func SubNiceCfProxySub(format string, sub string, distNodeCountry string, isIPV6 bool) (s string, err error)

SubNiceCfProxySub 从 cf sub 订阅连接替换为自己的 IP

func SubNiceProxyIp added in v0.10.1

func SubNiceProxyIp(format string, distNodeCountry string, proxyCountryIsoCode string, limit int, random bool, isIPV6 bool, cdnFilter string) (s string, err error)

func Unique added in v1.1.6

func Unique[T comparable](s []T) []T

Types

type CfIpProvider added in v1.0.7

type CfIpProvider struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Count   int    `json:"count"`
	Data    struct {
		CT []struct {
			Ip               string  `json:"ip"`
			YdLatencyAvg     float64 `json:"ydLatencyAvg"`
			YdPkgLostRateAvg float64 `json:"ydPkgLostRateAvg"`
			LtLatencyAvg     float64 `json:"ltLatencyAvg"`
			LtPkgLostRateAvg float64 `json:"ltPkgLostRateAvg"`
			DxLatencyAvg     float64 `json:"dxLatencyAvg"`
			DxPkgLostRateAvg float64 `json:"dxPkgLostRateAvg"`
			DownloadSpeed    int     `json:"downloadSpeed"`
			CreatedTime      string  `json:"createdTime"`
			AvgScore         int     `json:"avgScore"`
			YdScore          int     `json:"ydScore"`
			DxScore          int     `json:"dxScore"`
			LtScore          int     `json:"ltScore"`
		} `json:"CT"`
		CU []struct {
			Ip               string  `json:"ip"`
			YdLatencyAvg     float64 `json:"ydLatencyAvg"`
			YdPkgLostRateAvg float64 `json:"ydPkgLostRateAvg"`
			LtLatencyAvg     float64 `json:"ltLatencyAvg"`
			LtPkgLostRateAvg float64 `json:"ltPkgLostRateAvg"`
			DxLatencyAvg     float64 `json:"dxLatencyAvg"`
			DxPkgLostRateAvg float64 `json:"dxPkgLostRateAvg"`
			DownloadSpeed    int     `json:"downloadSpeed"`
			CreatedTime      string  `json:"createdTime"`
			AvgScore         int     `json:"avgScore"`
			YdScore          int     `json:"ydScore"`
			DxScore          int     `json:"dxScore"`
			LtScore          int     `json:"ltScore"`
		} `json:"CU"`
		CM []struct {
			Ip               string  `json:"ip"`
			YdLatencyAvg     float64 `json:"ydLatencyAvg"`
			YdPkgLostRateAvg float64 `json:"ydPkgLostRateAvg"`
			LtLatencyAvg     float64 `json:"ltLatencyAvg"`
			LtPkgLostRateAvg float64 `json:"ltPkgLostRateAvg"`
			DxLatencyAvg     float64 `json:"dxLatencyAvg"`
			DxPkgLostRateAvg float64 `json:"dxPkgLostRateAvg"`
			DownloadSpeed    int     `json:"downloadSpeed"`
			CreatedTime      string  `json:"createdTime"`
			AvgScore         int     `json:"avgScore"`
			YdScore          int     `json:"ydScore"`
			DxScore          int     `json:"dxScore"`
			LtScore          int     `json:"ltScore"`
		} `json:"CM"`
		AllAvg []struct {
			Ip               string  `json:"ip"`
			YdLatencyAvg     float64 `json:"ydLatencyAvg"`
			YdPkgLostRateAvg float64 `json:"ydPkgLostRateAvg"`
			LtLatencyAvg     float64 `json:"ltLatencyAvg"`
			LtPkgLostRateAvg float64 `json:"ltPkgLostRateAvg"`
			DxLatencyAvg     float64 `json:"dxLatencyAvg"`
			DxPkgLostRateAvg float64 `json:"dxPkgLostRateAvg"`
			DownloadSpeed    int     `json:"downloadSpeed"`
			CreatedTime      string  `json:"createdTime"`
			AvgScore         int     `json:"avgScore"`
			YdScore          int     `json:"ydScore"`
			DxScore          int     `json:"dxScore"`
			LtScore          int     `json:"ltScore"`
		} `json:"AllAvg"`
	} `json:"data"`
}

type CfIpTop20 added in v1.0.6

type CfIpTop20 struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Count   int    `json:"count"`
	Data    struct {
		Good []struct {
			Id              int     `json:"id"`
			VpsId           int     `json:"vpsId"`
			Ip              string  `json:"ip"`
			AvgLatency      int     `json:"avgLatency"`
			AvgPkgLostRate  float64 `json:"avgPkgLostRate"`
			YdLatency       int     `json:"ydLatency"`
			YdPkgLostRate   int     `json:"ydPkgLostRate"`
			LtLatency       int     `json:"ltLatency"`
			LtPkgLostRate   int     `json:"ltPkgLostRate"`
			DxLatency       int     `json:"dxLatency"`
			DxPkgLostRate   int     `json:"dxPkgLostRate"`
			Label           string  `json:"label"`
			CreatedTime     string  `json:"createdTime"`
			AvgScore        int     `json:"avgScore"`
			YdScore         int     `json:"ydScore"`
			DxScore         int     `json:"dxScore"`
			LtScore         int     `json:"ltScore"`
			HostProvider    string  `json:"hostProvider,omitempty"`
			LocationCountry string  `json:"locationCountry,omitempty"`
			LocationCity    string  `json:"locationCity,omitempty"`
		} `json:"good"`
	} `json:"data"`
}

vps789 openapi

type Format added in v0.10.0

type Format struct {
	Surge  bool
	Clash  bool
	QuanX  bool
	Loon   bool
	Vmess  bool
	Trojan bool
	Vless  bool
	V2rayn bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL