Documentation
¶
Index ¶
- Constants
- Variables
- func ClashToString(proxyList ProxyList) string
- func ProxieToClash(node Proxy) map[string]any
- func ProxieToSurge(node Proxy) string
- func SsToString(proxyList ProxyList) string
- func SsrToString(proxyList ProxyList) string
- func SurgeToString(proxyList ProxyList) string
- func TrojanToString(proxyList ProxyList) string
- func V2rayToString(proxyList ProxyList) string
- func VmessToString(proxyList ProxyList) string
- type HTTPProxy
- func (h *HTTPProxy) GetCountry() string
- func (h *HTTPProxy) GetIdentifier() string
- func (h *HTTPProxy) GetName() string
- func (h *HTTPProxy) GetOriginName() string
- func (h *HTTPProxy) GetSpeed() float64
- func (h *HTTPProxy) GetType() string
- func (h *HTTPProxy) IsValid() bool
- func (h *HTTPProxy) SetCountry(country string)
- func (h *HTTPProxy) SetIsValid(isValid bool)
- func (h *HTTPProxy) SetName(name string)
- func (h *HTTPProxy) SetSpeed(speed float64)
- func (h *HTTPProxy) ToString() string
- type Hy2Proxy
- func (p *Hy2Proxy) GetCountry() string
- func (p *Hy2Proxy) GetIdentifier() string
- func (p *Hy2Proxy) GetName() string
- func (p *Hy2Proxy) GetOriginName() string
- func (p *Hy2Proxy) GetSpeed() float64
- func (p *Hy2Proxy) GetType() string
- func (p *Hy2Proxy) IsValid() bool
- func (p *Hy2Proxy) SetCountry(country string)
- func (p *Hy2Proxy) SetIsValid(isValid bool)
- func (p *Hy2Proxy) SetName(name string)
- func (p *Hy2Proxy) SetSpeed(speed float64)
- func (p *Hy2Proxy) ToString() string
- type HysteriaProxy
- func (p *HysteriaProxy) GetCountry() string
- func (p *HysteriaProxy) GetIdentifier() string
- func (p *HysteriaProxy) GetName() string
- func (p *HysteriaProxy) GetOriginName() string
- func (p *HysteriaProxy) GetSpeed() float64
- func (p *HysteriaProxy) GetType() string
- func (p *HysteriaProxy) IsValid() bool
- func (p *HysteriaProxy) SetCountry(country string)
- func (p *HysteriaProxy) SetIsValid(isValid bool)
- func (p *HysteriaProxy) SetName(name string)
- func (p *HysteriaProxy) SetSpeed(speed float64)
- func (p *HysteriaProxy) ToString() string
- type ParamToString
- type Proxy
- type ProxyList
- func (pl ProxyList) Count() (int, int, int, int, int, int, int, int, int, int)
- func (pl ProxyList) Filter(proxyTypes, proxyNotTypes, proxyCountry, proxyNotCountry, proxySpeed string, ...) ProxyList
- func (pl ProxyList) RenameAll() ProxyList
- func (pl *ProxyList) UniqAppendProxy(newProxy Proxy)
- func (pl *ProxyList) UniqAppendProxys(newProxyList ProxyList)
- type SSProxy
- func (s *SSProxy) GetCountry() string
- func (s *SSProxy) GetIdentifier() string
- func (s *SSProxy) GetName() string
- func (s *SSProxy) GetOriginName() string
- func (s *SSProxy) GetSpeed() float64
- func (s *SSProxy) GetType() string
- func (s *SSProxy) IsValid() bool
- func (s *SSProxy) SetCountry(country string)
- func (s *SSProxy) SetIsValid(isValid bool)
- func (s *SSProxy) SetName(name string)
- func (s *SSProxy) SetSpeed(speed float64)
- func (s *SSProxy) ToString() string
- func (s *SSProxy) ToStringWithParam(param string) string
- type SSRProxy
- func (s *SSRProxy) GetCountry() string
- func (s *SSRProxy) GetIdentifier() string
- func (s *SSRProxy) GetName() string
- func (s *SSRProxy) GetOriginName() string
- func (s *SSRProxy) GetSpeed() float64
- func (s *SSRProxy) GetType() string
- func (s *SSRProxy) IsValid() bool
- func (s *SSRProxy) SetCountry(country string)
- func (s *SSRProxy) SetIsValid(isValid bool)
- func (s *SSRProxy) SetName(name string)
- func (s *SSRProxy) SetSpeed(speed float64)
- func (s *SSRProxy) ToString() string
- func (s *SSRProxy) ToStringWithParam(param string) string
- type SnellProxy
- func (p *SnellProxy) GetCountry() string
- func (p *SnellProxy) GetIdentifier() string
- func (p *SnellProxy) GetName() string
- func (p *SnellProxy) GetOriginName() string
- func (p *SnellProxy) GetSpeed() float64
- func (p *SnellProxy) GetType() string
- func (p *SnellProxy) IsValid() bool
- func (p *SnellProxy) SetCountry(country string)
- func (p *SnellProxy) SetIsValid(isValid bool)
- func (p *SnellProxy) SetName(name string)
- func (p *SnellProxy) SetSpeed(speed float64)
- func (p *SnellProxy) ToString() string
- type Socks5Proxy
- func (s *Socks5Proxy) GetCountry() string
- func (s *Socks5Proxy) GetIdentifier() string
- func (s *Socks5Proxy) GetName() string
- func (s *Socks5Proxy) GetOriginName() string
- func (s *Socks5Proxy) GetSpeed() float64
- func (s *Socks5Proxy) GetType() string
- func (s *Socks5Proxy) IsValid() bool
- func (s *Socks5Proxy) SetCountry(country string)
- func (s *Socks5Proxy) SetIsValid(isValid bool)
- func (s *Socks5Proxy) SetName(name string)
- func (s *Socks5Proxy) SetSpeed(speed float64)
- func (s *Socks5Proxy) ToString() string
- type TrojanProxy
- func (t *TrojanProxy) GetCountry() string
- func (t *TrojanProxy) GetIdentifier() string
- func (t *TrojanProxy) GetName() string
- func (t *TrojanProxy) GetOriginName() string
- func (t *TrojanProxy) GetSpeed() float64
- func (t *TrojanProxy) GetType() string
- func (t *TrojanProxy) IsValid() bool
- func (t *TrojanProxy) SetCountry(country string)
- func (t *TrojanProxy) SetIsValid(isValid bool)
- func (t *TrojanProxy) SetName(name string)
- func (t *TrojanProxy) SetSpeed(speed float64)
- func (t *TrojanProxy) ToString() string
- type VlessProxy
- func (p *VlessProxy) GetCountry() string
- func (p *VlessProxy) GetIdentifier() string
- func (p *VlessProxy) GetName() string
- func (p *VlessProxy) GetOriginName() string
- func (p *VlessProxy) GetSpeed() float64
- func (p *VlessProxy) GetType() string
- func (p *VlessProxy) IsValid() bool
- func (p *VlessProxy) SetCountry(country string)
- func (p *VlessProxy) SetIsValid(isValid bool)
- func (p *VlessProxy) SetName(name string)
- func (p *VlessProxy) SetSpeed(speed float64)
- func (p *VlessProxy) ToString() string
- type Vmess
- func (v *Vmess) GetCountry() string
- func (v *Vmess) GetIdentifier() string
- func (v *Vmess) GetName() string
- func (v *Vmess) GetOriginName() string
- func (v *Vmess) GetSpeed() float64
- func (v *Vmess) GetType() string
- func (v *Vmess) IsValid() bool
- func (v *Vmess) SetCountry(country string)
- func (v *Vmess) SetIsValid(isValid bool)
- func (v *Vmess) SetName(name string)
- func (v *Vmess) SetSpeed(speed float64)
- func (v *Vmess) ToString() string
Constants ¶
const ( SSRServer = iota SSRPort SSRProtocol SSRCipher // ssr的method SSROBFS SSRSuffix )
Variables ¶
var ( SsCiphers = []string{"rc4-md5", "aes-128-gcm", "aes-192-gcm", "aes-256-gcm", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "bf-cfb", "chacha20-ietf-poly1305", "xchacha20-ietf-poly1305", "salsa20", "chacha20", "chacha20-ietf", "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305", "2022-blake3-chacha12-poly1305", "2022-blake3-chacha8-poly1305"} SsrCiphers = []string{"none", "table", "rc4", "rc4-md5", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "cast5-cfb", "des-cfb", "idea-cfb", "rc2-cfb", "seed-cfb", "salsa20", "chacha20", "chacha20-ietf"} )
Functions ¶
func ClashToString ¶
func ProxieToClash ¶
func ProxieToSurge ¶ added in v0.0.3
ProxieToSurge 将单个代理转换为 Surge 配置格式的字符串
func SsToString ¶ added in v0.0.2
SsToString 将代理列表中的 ss 代理转换为 Base64 编码的字符串
func SsrToString ¶ added in v0.0.2
SsrToString 将代理列表中的 ssr/ss 代理转换为 Base64 编码的字符串
func SurgeToString ¶ added in v0.0.3
SurgeToString 将代理列表转换为 Surge 配置格式的字符串
func TrojanToString ¶ added in v0.0.2
TrojanToString 将代理列表中的 trojan 代理转换为 Base64 编码的字符串
func V2rayToString ¶ added in v1.0.0
TrojanToString 将代理列表中的 trojan 代理转换为 Base64 编码的字符串
func VmessToString ¶ added in v0.0.2
VmessToString 将代理列表中的 vmess 代理转换为 Base64 编码的字符串
Types ¶
type HTTPProxy ¶ added in v1.0.0
type HTTPProxy struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Server string `json:"server,omitempty"` Port int `json:"port,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` TLSSecure bool `json:"tlsSecure,omitempty"` UDP bool `json:"udp,omitempty"` TCPFastOpen bool `json:"tfo,omitempty"` SkipCertVerify bool `json:"skipCertVerify,omitempty"` Country string `json:"country,omitempty"` Speed float64 `json:"speed,omitempty"` IsValidFlag bool `json:"isValidFlag,omitempty"` OriginName string `json:"-,omitempty"` // 原始名称 }
HTTPProxy http 代理结构体
func (*HTTPProxy) GetCountry ¶ added in v1.0.0
GetCountry 实现 Proxy 接口的 GetCountry 方法
func (*HTTPProxy) GetIdentifier ¶ added in v1.0.0
GetIdentifier 实现 Proxy 接口的 GetIdentifier 方法
func (*HTTPProxy) GetOriginName ¶ added in v1.0.0
GetOriginName 实现 Proxy 接口的 GetOriginName 方法
func (*HTTPProxy) SetCountry ¶ added in v1.0.0
SetCountry 实现 Proxy 接口的 SetCountry 方法
func (*HTTPProxy) SetIsValid ¶ added in v1.0.0
SetIsValid 实现 Proxy 接口的 SetIsValid 方法
type Hy2Proxy ¶ added in v1.0.0
type Hy2Proxy struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Server string `json:"server,omitempty"` Port int `json:"port,omitempty"` Auth string `json:"auth,omitempty"` Obfs string `json:"obfs,omitempty"` ObfsPassword string `json:"obfs-password,omitempty"` SNI string `json:"sni,omitempty"` Insecure bool `json:"insecure,omitempty"` PinSHA256 string `json:"pinSHA256,omitempty"` Country string `json:"country,omitempty"` Speed float64 `json:"speed,omitempty"` IsValidFlag bool `json:"is-valid,omitempty"` OriginName string `json:"-,omitempty"` // 原始名称 }
Hy2Proxy hysteria 2 代理结构体
func (*Hy2Proxy) GetCountry ¶ added in v1.0.0
GetCountry 实现 Proxy 接口的 GetCountry 方法,返回代理所属国家
func (*Hy2Proxy) GetIdentifier ¶ added in v1.0.0
GetIdentifier 实现 Proxy 接口的 GetIdentifier 方法,返回代理唯一标识
func (*Hy2Proxy) GetOriginName ¶ added in v1.0.0
GetOriginName 实现 Proxy 接口的 GetOriginName 方法,返回代理原始名称
func (*Hy2Proxy) SetCountry ¶ added in v1.0.0
SetCountry 实现 Proxy 接口的 SetCountry 方法
func (*Hy2Proxy) SetIsValid ¶ added in v1.0.0
SetIsValid 实现 Proxy 接口的 SetIsValid 方法
type HysteriaProxy ¶ added in v1.0.0
type HysteriaProxy struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Server string `json:"server,omitempty"` Port int `json:"port,omitempty"` Auth string `json:"auth,omitempty"` SNI string `json:"sni,omitempty"` Up string `json:"upmbps,omitempty"` Down string `json:"downmbps,omitempty"` ALPN []string `json:"alpn,omitempty"` Obfs string `json:"obfs,omitempty"` ObfsParam string `json:"obfsParam,omitempty"` UDP bool `json:"udp,omitempty"` TLS13 bool `json:"tls13,omitempty"` SkipCertVerify bool `json:"skip-cert-verify,omitempty"` Country string `json:"country,omitempty"` Speed float64 `json:"speed,omitempty"` IsValidFlag bool `json:"is-valid,omitempty"` OriginName string `json:"-,omitempty"` // 原始名称 }
HysteriaProxy hysteria 代理结构体
func (*HysteriaProxy) GetCountry ¶ added in v1.0.0
func (p *HysteriaProxy) GetCountry() string
GetCountry 实现 Proxy 接口的 GetCountry 方法,返回代理所属国家
func (*HysteriaProxy) GetIdentifier ¶ added in v1.0.0
func (p *HysteriaProxy) GetIdentifier() string
GetIdentifier 实现 Proxy 接口的 GetIdentifier 方法,返回代理唯一标识
func (*HysteriaProxy) GetName ¶ added in v1.0.0
func (p *HysteriaProxy) GetName() string
GetName 实现 Proxy 接口的 GetName 方法,返回代理节点名称
func (*HysteriaProxy) GetOriginName ¶ added in v1.0.0
func (p *HysteriaProxy) GetOriginName() string
GetOriginName 实现 Proxy 接口的 GetOriginName 方法,返回代理原始名称
func (*HysteriaProxy) GetSpeed ¶ added in v1.0.0
func (p *HysteriaProxy) GetSpeed() float64
GetSpeed 实现 Proxy 接口的 GetSpeed 方法,返回代理速度
func (*HysteriaProxy) GetType ¶ added in v1.0.0
func (p *HysteriaProxy) GetType() string
GetType 实现 Proxy 接口的 GetType 方法,返回代理类型
func (*HysteriaProxy) IsValid ¶ added in v1.0.0
func (p *HysteriaProxy) IsValid() bool
IsValid 实现 Proxy 接口的 IsValid 方法,判断代理是否有效
func (*HysteriaProxy) SetCountry ¶ added in v1.0.0
func (p *HysteriaProxy) SetCountry(country string)
SetCountry 实现 Proxy 接口的 SetCountry 方法
func (*HysteriaProxy) SetIsValid ¶ added in v1.0.0
func (p *HysteriaProxy) SetIsValid(isValid bool)
SetIsValid 实现 Proxy 接口的 SetIsValid 方法
func (*HysteriaProxy) SetName ¶ added in v1.0.0
func (p *HysteriaProxy) SetName(name string)
SetName 实现 Proxy 接口的 SetName 方法,设置代理节点名称
func (*HysteriaProxy) SetSpeed ¶ added in v1.0.0
func (p *HysteriaProxy) SetSpeed(speed float64)
SetSpeed 实现 Proxy 接口的 SetSpeed 方法
func (*HysteriaProxy) ToString ¶ added in v1.0.0
func (p *HysteriaProxy) ToString() string
ToString 实现 Proxy 接口的 ToString 方法,将代理信息转换为 hysteria 协议链接字符串
type ParamToString ¶ added in v1.0.0
ParamToString 定义带参数的 ToString 接口
type Proxy ¶
type Proxy interface { GetType() string GetName() string SetName(name string) GetOriginName() string GetCountry() string SetCountry(country string) GetSpeed() float64 SetSpeed(speed float64) IsValid() bool SetIsValid(isValid bool) GetIdentifier() string ToString() string // 新增输出节点字符串的方法 }
Proxy 定义代理接口
type ProxyList ¶
type ProxyList []Proxy
func ExplodeClash ¶
func (ProxyList) Filter ¶
func (pl ProxyList) Filter(proxyTypes, proxyNotTypes, proxyCountry, proxyNotCountry, proxySpeed string, isOnlyValid bool) ProxyList
Filter 根据代理类型、国家和排除国家筛选代理列表
func (*ProxyList) UniqAppendProxy ¶
UniqAppendProxy 向代理列表中唯一添加一个代理
func (*ProxyList) UniqAppendProxys ¶
UniqAppendProxys 向代理列表中唯一添加多个代理
type SSProxy ¶ added in v1.0.0
type SSProxy struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Server string `json:"server,omitempty"` Port int `json:"port,omitempty"` Password string `json:"password,omitempty"` EncryptMethod string `json:"encryptMethod,omitempty"` Plugin string `json:"plugin,omitempty"` PluginOption string `json:"pluginOption,omitempty"` UDP bool `json:"udp,omitempty"` TCPFastOpen bool `json:"tfo,omitempty"` SkipCertVerify bool `json:"skipCertVerify,omitempty"` Country string `json:"country,omitempty"` Speed float64 `json:"speed,omitempty"` IsValidFlag bool `json:"isValidFlag,omitempty"` OriginName string `json:"-,omitempty"` // 原始名称 }
SSProxy ss 代理结构体
func (*SSProxy) GetCountry ¶ added in v1.0.0
GetCountry 实现 Proxy 接口的 GetCountry 方法
func (*SSProxy) GetIdentifier ¶ added in v1.0.0
GetIdentifier 实现 Proxy 接口的 GetIdentifier 方法
func (*SSProxy) GetOriginName ¶ added in v1.0.0
GetOriginName 实现 Proxy 接口的 GetOriginName 方法,返回代理原始名称
func (*SSProxy) SetCountry ¶ added in v1.0.0
SetCountry 实现 Proxy 接口的 SetCountry 方法
func (*SSProxy) SetIsValid ¶ added in v1.0.0
SetIsValid 实现 Proxy 接口的 SetIsValid 方法
func (*SSProxy) ToStringWithParam ¶ added in v1.0.0
实现 ParamProxy 接口的 ToStringWithParam 方法
type SSRProxy ¶ added in v1.0.0
type SSRProxy struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Server string `json:"server,omitempty"` Port int `json:"port,omitempty"` Password string `json:"password,omitempty"` EncryptMethod string `json:"cipher,omitempty"` Protocol string `json:"protocol,omitempty"` ProtocolParam string `json:"protocol-param,omitempty"` OBFS string `json:"obfs,omitempty"` OBFSParam string `json:"obfs-param,omitempty"` UDP bool `json:"udp,omitempty"` TCPFastOpen bool `json:"tfo,omitempty"` SkipCertVerify bool `json:"skip-cert-verify,omitempty"` Country string `json:"country,omitempty"` Speed float64 `json:"speed,omitempty"` IsValidFlag bool `json:"is-valid,omitempty"` OriginName string `json:"-,omitempty"` // 原始名称 }
SSRProxy ssr 代理结构体
func (*SSRProxy) GetCountry ¶ added in v1.0.0
GetCountry 实现 Proxy 接口的 GetCountry 方法
func (*SSRProxy) GetIdentifier ¶ added in v1.0.0
GetIdentifier 实现 Proxy 接口的 GetIdentifier 方法
func (*SSRProxy) GetOriginName ¶ added in v1.0.0
GetOriginName 实现 Proxy 接口的 GetOriginName 方法,返回代理原始名称
func (*SSRProxy) SetCountry ¶ added in v1.0.0
SetCountry 实现 Proxy 接口的 SetCountry 方法
func (*SSRProxy) SetIsValid ¶ added in v1.0.0
SetIsValid 实现 Proxy 接口的 SetIsValid 方法
func (*SSRProxy) ToStringWithParam ¶ added in v1.0.0
实现 ParamProxy 接口的 ToStringWithParam 方法
type SnellProxy ¶ added in v1.0.0
type SnellProxy struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Server string `json:"server,omitempty"` Port int `json:"port,omitempty"` PSK string `json:"psk,omitempty"` Version int `json:"version,omitempty"` Obfs string `json:"obfs,omitempty"` ObfsParam string `json:"obfs-param,omitempty"` UDP bool `json:"udp,omitempty"` SkipCertVerify bool `json:"skip-cert-verify,omitempty"` Country string `json:"country,omitempty"` Speed float64 `json:"speed,omitempty"` IsValidFlag bool `json:"is-valid,omitempty"` OriginName string `json:"-,omitempty"` // 原始名称 }
SnellProxy snell 代理结构体
func (*SnellProxy) GetCountry ¶ added in v1.0.0
func (p *SnellProxy) GetCountry() string
GetCountry 实现 Proxy 接口的 GetCountry 方法,返回代理所属国家
func (*SnellProxy) GetIdentifier ¶ added in v1.0.0
func (p *SnellProxy) GetIdentifier() string
GetIdentifier 实现 Proxy 接口的 GetIdentifier 方法,返回代理唯一标识
func (*SnellProxy) GetName ¶ added in v1.0.0
func (p *SnellProxy) GetName() string
GetName 实现 Proxy 接口的 GetName 方法,返回代理节点名称
func (*SnellProxy) GetOriginName ¶ added in v1.0.0
func (p *SnellProxy) GetOriginName() string
GetOriginName 实现 Proxy 接口的 GetOriginName 方法,返回代理原始名称
func (*SnellProxy) GetSpeed ¶ added in v1.0.0
func (p *SnellProxy) GetSpeed() float64
GetSpeed 实现 Proxy 接口的 GetSpeed 方法,返回代理速度
func (*SnellProxy) GetType ¶ added in v1.0.0
func (p *SnellProxy) GetType() string
GetType 实现 Proxy 接口的 GetType 方法,返回代理类型
func (*SnellProxy) IsValid ¶ added in v1.0.0
func (p *SnellProxy) IsValid() bool
IsValid 实现 Proxy 接口的 IsValid 方法,判断代理是否有效
func (*SnellProxy) SetCountry ¶ added in v1.0.0
func (p *SnellProxy) SetCountry(country string)
SetCountry 实现 Proxy 接口的 SetCountry 方法
func (*SnellProxy) SetIsValid ¶ added in v1.0.0
func (p *SnellProxy) SetIsValid(isValid bool)
SetIsValid 实现 Proxy 接口的 SetIsValid 方法
func (*SnellProxy) SetName ¶ added in v1.0.0
func (p *SnellProxy) SetName(name string)
SetName 实现 Proxy 接口的 SetName 方法,设置代理节点名称
func (*SnellProxy) SetSpeed ¶ added in v1.0.0
func (p *SnellProxy) SetSpeed(speed float64)
SetSpeed 实现 Proxy 接口的 SetSpeed 方法
func (*SnellProxy) ToString ¶ added in v1.0.0
func (p *SnellProxy) ToString() string
ToString 实现 Proxy 接口的 ToString 方法,将代理信息转换为 snell 协议链接字符串
type Socks5Proxy ¶ added in v1.0.0
type Socks5Proxy struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Server string `json:"server,omitempty"` Port int `json:"port,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` UDP bool `json:"udp,omitempty"` TCPFastOpen bool `json:"tfo,omitempty"` SkipCertVerify bool `json:"skipCertVerify,omitempty"` Country string `json:"country,omitempty"` Speed float64 `json:"speed,omitempty"` IsValidFlag bool `json:"isValidFlag,omitempty"` OriginName string `json:"-,omitempty"` // 原始名称 }
Socks5Proxy socks5 代理结构体
func (*Socks5Proxy) GetCountry ¶ added in v1.0.0
func (s *Socks5Proxy) GetCountry() string
GetCountry 实现 Proxy 接口的 GetCountry 方法
func (*Socks5Proxy) GetIdentifier ¶ added in v1.0.0
func (s *Socks5Proxy) GetIdentifier() string
GetIdentifier 实现 Proxy 接口的 GetIdentifier 方法
func (*Socks5Proxy) GetName ¶ added in v1.0.0
func (s *Socks5Proxy) GetName() string
GetName 实现 Proxy 接口的 GetName 方法
func (*Socks5Proxy) GetOriginName ¶ added in v1.0.0
func (s *Socks5Proxy) GetOriginName() string
GetOriginName 实现 Proxy 接口的 GetOriginName 方法,返回代理原始名称
func (*Socks5Proxy) GetSpeed ¶ added in v1.0.0
func (s *Socks5Proxy) GetSpeed() float64
GetSpeed 实现 Proxy 接口的 GetSpeed 方法
func (*Socks5Proxy) GetType ¶ added in v1.0.0
func (s *Socks5Proxy) GetType() string
GetType 实现 Proxy 接口的 GetType 方法
func (*Socks5Proxy) IsValid ¶ added in v1.0.0
func (s *Socks5Proxy) IsValid() bool
IsValid 实现 Proxy 接口的 IsValid 方法
func (*Socks5Proxy) SetCountry ¶ added in v1.0.0
func (s *Socks5Proxy) SetCountry(country string)
SetCountry 实现 Proxy 接口的 SetCountry 方法
func (*Socks5Proxy) SetIsValid ¶ added in v1.0.0
func (s *Socks5Proxy) SetIsValid(isValid bool)
SetIsValid 实现 Proxy 接口的 SetIsValid 方法
func (*Socks5Proxy) SetName ¶ added in v1.0.0
func (s *Socks5Proxy) SetName(name string)
SetName 实现 Proxy 接口的 SetName 方法,设置代理节点名称
func (*Socks5Proxy) SetSpeed ¶ added in v1.0.0
func (s *Socks5Proxy) SetSpeed(speed float64)
SetSpeed 实现 Proxy 接口的 SetSpeed 方法
func (*Socks5Proxy) ToString ¶ added in v1.0.0
func (s *Socks5Proxy) ToString() string
ToString 实现 Proxy 接口的 ToString 方法,将 socks5 代理转换为 socks5 链接
type TrojanProxy ¶ added in v1.0.0
type TrojanProxy struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Server string `json:"server,omitempty"` Port int `json:"port,omitempty"` Password string `json:"password,omitempty"` TransferProtocol string `json:"network,omitempty"` Host string `json:"host,omitempty"` Path string `json:"path,omitempty"` TLSSecure bool `json:"tls,omitempty"` UDP bool `json:"udp,omitempty"` TCPFastOpen bool `json:"tfo,omitempty"` SkipCertVerify bool `json:"skip-cert-verify,omitempty"` TLS13 bool `json:"tls13,omitempty"` Country string `json:"country,omitempty"` Speed float64 `json:"speed,omitempty"` IsValidFlag bool `json:"is-valid,omitempty"` OriginName string `json:"-,omitempty"` // 原始名称 }
TrojanProxy trojan 代理结构体
func (*TrojanProxy) GetCountry ¶ added in v1.0.0
func (t *TrojanProxy) GetCountry() string
GetCountry 实现 Proxy 接口的 GetCountry 方法
func (*TrojanProxy) GetIdentifier ¶ added in v1.0.0
func (t *TrojanProxy) GetIdentifier() string
GetIdentifier 实现 Proxy 接口的 GetIdentifier 方法
func (*TrojanProxy) GetName ¶ added in v1.0.0
func (t *TrojanProxy) GetName() string
GetName 实现 Proxy 接口的 GetName 方法
func (*TrojanProxy) GetOriginName ¶ added in v1.0.0
func (t *TrojanProxy) GetOriginName() string
GetOriginName 实现 Proxy 接口的 GetOriginName 方法,返回代理原始名称
func (*TrojanProxy) GetSpeed ¶ added in v1.0.0
func (t *TrojanProxy) GetSpeed() float64
GetSpeed 实现 Proxy 接口的 GetSpeed 方法
func (*TrojanProxy) GetType ¶ added in v1.0.0
func (t *TrojanProxy) GetType() string
GetType 实现 Proxy 接口的 GetType 方法
func (*TrojanProxy) IsValid ¶ added in v1.0.0
func (t *TrojanProxy) IsValid() bool
IsValid 实现 Proxy 接口的 IsValid 方法
func (*TrojanProxy) SetCountry ¶ added in v1.0.0
func (t *TrojanProxy) SetCountry(country string)
SetCountry 实现 Proxy 接口的 SetCountry 方法
func (*TrojanProxy) SetIsValid ¶ added in v1.0.0
func (t *TrojanProxy) SetIsValid(isValid bool)
SetIsValid 实现 Proxy 接口的 SetIsValid 方法
func (*TrojanProxy) SetName ¶ added in v1.0.0
func (t *TrojanProxy) SetName(name string)
SetName 实现 Proxy 接口的 SetName 方法,设置代理节点名称
func (*TrojanProxy) SetSpeed ¶ added in v1.0.0
func (t *TrojanProxy) SetSpeed(speed float64)
SetSpeed 实现 Proxy 接口的 SetSpeed 方法
func (*TrojanProxy) ToString ¶ added in v1.0.0
func (t *TrojanProxy) ToString() string
ToString 实现 Proxy 接口的 ToString 方法
type VlessProxy ¶ added in v1.0.0
type VlessProxy struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Server string `json:"server,omitempty"` Port int `json:"port,omitempty"` UUID string `json:"uuid,omitempty"` Flow string `json:"flow,omitempty"` Transport string `json:"transport,omitempty"` Security string `json:"security,omitempty"` SNI string `json:"sni,omitempty"` ALPN []string `json:"alpn,omitempty"` Path string `json:"path,omitempty"` Host string `json:"host,omitempty"` UDP bool `json:"udp,omitempty"` SkipCertVerify bool `json:"skip-cert-verify,omitempty"` Country string `json:"country,omitempty"` Speed float64 `json:"speed,omitempty"` IsValidFlag bool `json:"is-valid,omitempty"` ClientFingerprint string `json:"client-fingerprint,omitempty"` XUDP bool `json:"xudp,omitempty"` Encryption string `json:"encryption,omitempty"` OriginName string `json:"-,omitempty"` // 原始名称 RealityOpts struct { PublicKey string `json:"public-key,omitempty"` ShortID string `json:"short-id,omitempty"` } `json:"reality-opts,omitempty"` WSOpts struct { Path string `json:"path,omitempty"` Headers map[string]string `json:"headers,omitempty"` } `json:"ws-opts,omitempty"` GRPCOpts struct { ServiceName string `json:"serviceName,omitempty"` } `json:"grpc-opts,omitempty"` }
VlessProxy vless 代理结构体
func (*VlessProxy) GetCountry ¶ added in v1.0.0
func (p *VlessProxy) GetCountry() string
GetCountry 实现 Proxy 接口的 GetCountry 方法,返回代理所属国家
func (*VlessProxy) GetIdentifier ¶ added in v1.0.0
func (p *VlessProxy) GetIdentifier() string
GetIdentifier 实现 Proxy 接口的 GetIdentifier 方法,返回代理唯一标识
func (*VlessProxy) GetName ¶ added in v1.0.0
func (p *VlessProxy) GetName() string
GetName 实现 Proxy 接口的 GetName 方法,返回代理节点名称
func (*VlessProxy) GetOriginName ¶ added in v1.0.0
func (p *VlessProxy) GetOriginName() string
GetOriginName 实现 Proxy 接口的 GetOriginName 方法,返回代理原始名称
func (*VlessProxy) GetSpeed ¶ added in v1.0.0
func (p *VlessProxy) GetSpeed() float64
GetSpeed 实现 Proxy 接口的 GetSpeed 方法,返回代理速度
func (*VlessProxy) GetType ¶ added in v1.0.0
func (p *VlessProxy) GetType() string
GetType 实现 Proxy 接口的 GetType 方法,返回代理类型
func (*VlessProxy) IsValid ¶ added in v1.0.0
func (p *VlessProxy) IsValid() bool
IsValid 实现 Proxy 接口的 IsValid 方法,判断代理是否有效
func (*VlessProxy) SetCountry ¶ added in v1.0.0
func (p *VlessProxy) SetCountry(country string)
SetCountry 实现 Proxy 接口的 SetCountry 方法
func (*VlessProxy) SetIsValid ¶ added in v1.0.0
func (p *VlessProxy) SetIsValid(isValid bool)
SetIsValid 实现 Proxy 接口的 SetIsValid 方法
func (*VlessProxy) SetName ¶ added in v1.0.0
func (p *VlessProxy) SetName(name string)
SetName 实现 Proxy 接口的 SetName 方法,设置代理节点名称
func (*VlessProxy) SetSpeed ¶ added in v1.0.0
func (p *VlessProxy) SetSpeed(speed float64)
SetSpeed 实现 Proxy 接口的 SetSpeed 方法
func (*VlessProxy) ToString ¶ added in v1.0.0
func (p *VlessProxy) ToString() string
type Vmess ¶
type Vmess struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Server string `json:"server,omitempty"` Port int `json:"port,omitempty"` UUID string `json:"uuid,omitempty"` AlterID int `json:"alterId,omitempty"` EncryptMethod string `json:"encryptMethod,omitempty"` TransferProtocol string `json:"transferProtocol,omitempty"` Edge string `json:"edge,omitempty"` ServerName string `json:"serverName,omitempty"` Host string `json:"host,omitempty"` Path string `json:"path,omitempty"` QUICSecure string `json:"quicSecure,omitempty"` QUICSecret string `json:"quicSecret,omitempty"` FakeType string `json:"fakeType,omitempty"` TLSSecure bool `json:"tlsSecure,omitempty"` UDP bool `json:"udp,omitempty"` TCPFastOpen bool `json:"tfo,omitempty"` SkipCertVerify bool `json:"skipCertVerify,omitempty"` TLS13 bool `json:"tls13,omitempty"` Country string `json:"country,omitempty"` Speed float64 `json:"speed,omitempty"` IsValidFlag bool `json:"isValidFlag,omitempty"` OriginName string `json:"-,omitempty"` // 原始名称 }
Vmess 结构体实现 Proxy 接口
func (*Vmess) GetCountry ¶ added in v1.0.0
GetCountry 实现 Proxy 接口的 GetCountry 方法
func (*Vmess) GetIdentifier ¶ added in v1.0.0
GetIdentifier 实现 Proxy 接口的 GetIdentifier 方法
func (*Vmess) GetOriginName ¶ added in v1.0.0
GetOriginName 实现 Proxy 接口的 GetOriginName 方法,返回代理原始名称
func (*Vmess) SetCountry ¶ added in v1.0.0
SetCountry 实现 Proxy 接口的 SetCountry 方法
func (*Vmess) SetIsValid ¶ added in v1.0.0
SetIsValid 实现 Proxy 接口的 SetIsValid 方法