Documentation
¶
Index ¶
- Variables
- func EnableSingBox(rawUri string) bool
- type ClientType
- type IOutbound
- type ProxyItem
- func NewItem(rawUri string) *ProxyItem
- func NewItemByEncryptedRawUri(enRawUri string) (item *ProxyItem)
- func ParseEncryptedRawUriToProxyItem(rawUri string, clientType ...ClientType) (p *ProxyItem)
- func ParseRawUriToProxyItem(rawUri string, clientType ...ClientType) (p *ProxyItem)
- func TransferProxyItem(oldProxyItem *ProxyItem, clientType ...ClientType) (newProxyItem *ProxyItem)
- type Result
Constants ¶
This section is empty.
Variables ¶
View Source
var ShadowSocksMethodOnlyBySing = []string{
"aes-256-cfb",
"aes-128-ctr",
"aes-192-ctr",
"aes-256-ctr",
"aes-128-cfb",
"aes-192-cfb",
"rc4-md5",
"rc4",
"chacha20-ietf",
"xchacha20",
}
Functions ¶
func EnableSingBox ¶
Types ¶
type ClientType ¶
type ClientType string
const ( XrayCore ClientType = "xray" SingBox ClientType = "sing" )
type IOutbound ¶
type IOutbound interface {
Parse(string)
Addr() string
Port() int
Scheme() string
GetOutboundStr() string
GetRawUri() string
}
func GetOutbound ¶
func GetOutbound(clientType ClientType, rawUri string) (result IOutbound)
type ProxyItem ¶
type ProxyItem struct {
Scheme string `json:"scheme"`
Address string `json:"address"`
Port int `json:"port"`
RTT int64 `json:"rtt"`
RawUri string `json:"raw_uri"`
Location string `json:"location"`
Outbound string `json:"outbound"`
OutboundType ClientType `json:"outbound_type"`
}
func ParseEncryptedRawUriToProxyItem ¶
func ParseEncryptedRawUriToProxyItem(rawUri string, clientType ...ClientType) (p *ProxyItem)
func ParseRawUriToProxyItem ¶
func ParseRawUriToProxyItem(rawUri string, clientType ...ClientType) (p *ProxyItem)
Automatically parse rawUri to ProxyItem for certain Client[sing-box/xray-core]
func TransferProxyItem ¶
func TransferProxyItem(oldProxyItem *ProxyItem, clientType ...ClientType) (newProxyItem *ProxyItem)
Transfer ProxyItem to specified ClientType: sing-box or xray-core
func (*ProxyItem) GetOutbound ¶
func (*ProxyItem) GetOutboundType ¶
func (that *ProxyItem) GetOutboundType() ClientType
type Result ¶
type Result struct {
Vmess []*ProxyItem `json:"Vmess"`
Vless []*ProxyItem `json:"Vless"`
ShadowSocks []*ProxyItem `json:"Shadowsocks"`
ShadowSocksR []*ProxyItem `json:"ShadowsocksR"`
Trojan []*ProxyItem `json:"Trojan"`
UpdateAt string `json:"UpdateAt"`
VmessTotal int `json:"VmessTotal"`
VlessTotal int `json:"VlessTotal"`
TrojanTotal int `json:"TrojanTotal"`
SSTotal int `json:"SSTotal"`
SSRTotal int `json:"SSRTotal"`
// contains filtered or unexported fields
}
func (*Result) GetTotalList ¶
Click to show internal directories.
Click to hide internal directories.