types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrProxyDead = errors.New("proxy is dead")

ErrProxyDead возвращается когда прокси недоступен или заблокирован.

Functions

This section is empty.

Types

type CheckResult

type CheckResult struct {
	URL  string
	Ping time.Duration
}

CheckResult содержит результат проверки прокси.

type CheckResults

type CheckResults struct {
	Alive []string
	Dead  []string
}

CheckResults содержит результаты проверки прокси, разделённые на живые и мёртвые.

type Provider

type Provider struct {
	Name  string
	Fetch func() []string
}

Provider структура, описывающая провайдера данных

type ProxyData

type ProxyData struct {
	Host   string `json:"host"`
	Port   int    `json:"port"`
	Secret string `json:"secret"`
}

ProxyData структура для парсинга JSON из раскодированных JS скриптов

type Result

type Result struct {
	Ping time.Duration
}

Result содержит результат проверки tg-прокси.

type VpnAPIResponse

type VpnAPIResponse struct {
	Pages   int        `json:"pages"`
	Proxies []vpnProxy `json:"proxies"`
}

VpnAPIResponse структуры для парсинга JSON api.telegramvpn.org

Jump to

Keyboard shortcuts

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