Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotImplemented = E.New("not implemented")
)
errors
Functions ¶
func RegisterParser ¶
RegisterParser add a new link parser.
Types ¶
type Link ¶
type Link interface { // URL returns the url representation of the link URL() (string, error) // Outbound returns equivalent outbound options of the link Outbound() (*option.Outbound, error) }
Link is the interface for links
func ParseCollection ¶
ParseCollection parses a links collection string to []Link
type ShadowSocks ¶
type ShadowSocks struct { Method string `json:"method,omitempty"` Password string `json:"password,omitempty"` Address string `json:"address,omitempty"` Port uint16 `json:"port,omitempty"` Ps string `json:"ps,omitempty"` Plugin string `json:"plugin,omitempty"` PluginOpts string `json:"plugin-opts,omitempty"` }
ShadowSocks represents a parsed shadowsocks link
func ParseShadowSocks ¶
func ParseShadowSocks(u *url.URL) (*ShadowSocks, error)
ParseShadowSocks parses a shadowsocks link
https://github.com/shadowsocks/shadowsocks-org/wiki/SIP002-URI-Scheme
type TrojanQt5 ¶
type TrojanQt5 struct { Remarks string Address string Port uint16 Password string AllowInsecure bool TFO bool }
TrojanQt5 represents a parsed Trojan-Qt5 link
func ParseTrojanQt5 ¶
ParseTrojanQt5 parses a Trojan-Qt5 link
trojan://password@domain:port?allowinsecure=value&tfo=value#remarks
type VMessQuantumult ¶
type VMessQuantumult struct {
Vmess
}
VMessQuantumult is the vmess link of Quantumult
func ParseVMessQuantumult ¶
func ParseVMessQuantumult(u *url.URL) (*VMessQuantumult, error)
ParseVMessQuantumult parses a Quantumult vmess link
type VMessRocket ¶
type VMessRocket struct {
Vmess
}
VMessRocket is the vmess link of ShadowRocket
func ParseVMessRocket ¶
func ParseVMessRocket(u *url.URL) (*VMessRocket, error)
ParseVMessRocket parses a ShadowRocket vmess link
type VMessV2RayNG ¶
type VMessV2RayNG struct {
Vmess
}
VMessV2RayNG is the vmess link of V2RayNG
func ParseVMessV2RayNG ¶
func ParseVMessV2RayNG(u *url.URL) (*VMessV2RayNG, error)
ParseVMessV2RayNG parses vmess link of V2RayNG
type Vmess ¶
type Vmess struct { Tag string Server string ServerPort uint16 UUID string AlterID int Security string Transport string TransportHost string TransportPath string TLS bool SNI string ALPN []string TLSAllowInsecure bool Fingerprint string }
Vmess is the base struct of vmess link
func (*Vmess) URLQuantumult ¶
URLQuantumult returns the quantumultx url representation of vmess link
func (*Vmess) URLShadowRocket ¶
URLShadowRocket returns the shadowrocket url representation of vmess link
func (*Vmess) URLV2RayNG ¶
URLV2RayNG returns the shadowrocket url representation of vmess link