Documentation
¶
Index ¶
- Constants
- Variables
- func GetVpnScheme(rawUri string) string
- func HandleQuery(rawUri string) (result string)
- func ParseRawUri(rawUri string) (result string)
- func SSRTest()
- func TestWireguard()
- func TrojanTest()
- func VlessTest()
- func VmessTest()
- type ParserHysteria
- type ParserHysteria2
- type ParserSS
- type ParserSSR
- type ParserTrojan
- type ParserVless
- type ParserVmess
- type ParserWirguard
- type StreamField
Constants ¶
View Source
const ( SchemeSS string = "ss://" SchemeSSR string = "ssr://" SchemeTrojan string = "trojan://" SchemeVless string = "vless://" SchemeVmess string = "vmess://" SchemeWireguard string = "wireguard://" SchemeHy2 string = "hy2://" SchemeHysteria2 string = "hysteria2://" SchemeHysteria string = "hysteria://" )
Variables ¶
View Source
var ObfsTypes map[string]struct{} = map[string]struct{}{
"salamander": {},
}
View Source
var SSMethod map[string]struct{} = map[string]struct{}{
"2022-blake3-aes-128-gcm": {},
"2022-blake3-aes-256-gcm": {},
"2022-blake3-chacha20-poly1305": {},
"none": {},
"aes-128-gcm": {},
"aes-192-gcm": {},
"aes-256-gcm": {},
"chacha20-ietf-poly1305": {},
"xchacha20-ietf-poly1305": {},
"aes-128-ctr": {},
"aes-192-ctr": {},
"aes-256-ctr": {},
"aes-128-cfb": {},
"aes-192-cfb": {},
"aes-256-cfb": {},
"rc4-md5": {},
"chacha20-ietf": {},
"xchacha20": {},
}
View Source
var SSRMethod map[string]struct{} = map[string]struct{}{
"aes-128-ctr": {},
"aes-192-ctr": {},
"aes-256-ctr": {},
"aes-128-cfb": {},
"aes-192-cfb": {},
"aes-256-cfb": {},
"rc4-md5": {},
"chacha20-ietf": {},
"xchacha20": {},
}
View Source
var SSROBFS map[string]struct{} = map[string]struct{}{
"plain": {},
"http_simple": {},
"http_post": {},
"random_head": {},
"tls1.2_ticket_auth": {},
}
Functions ¶
func GetVpnScheme ¶
func HandleQuery ¶
func ParseRawUri ¶
func TestWireguard ¶
func TestWireguard()
func TrojanTest ¶
func TrojanTest()
Types ¶
type ParserHysteria ¶
type ParserHysteria struct {
Address string
Port int
Up string
UpMbps int
Down string
DownMbps int
Auth string
Obfs string
*StreamField
}
func (*ParserHysteria) GetAddr ¶
func (that *ParserHysteria) GetAddr() string
func (*ParserHysteria) GetPort ¶
func (that *ParserHysteria) GetPort() int
func (*ParserHysteria) Parse ¶
func (that *ParserHysteria) Parse(rawURI string)
type ParserHysteria2 ¶
type ParserHysteria2 struct {
Address string
Port int
UpMbps int
DownMbps int
Password string
ObfType string
ObfPassword string
*StreamField
}
func (*ParserHysteria2) GetAddr ¶
func (that *ParserHysteria2) GetAddr() string
func (*ParserHysteria2) GetPort ¶
func (that *ParserHysteria2) GetPort() int
func (*ParserHysteria2) Parse ¶
func (that *ParserHysteria2) Parse(rawURI string)
type ParserSS ¶
type ParserSSR ¶
type ParserTrojan ¶
type ParserTrojan struct {
Address string
Port int
Password string
*StreamField
}
func (*ParserTrojan) GetAddr ¶
func (that *ParserTrojan) GetAddr() string
func (*ParserTrojan) GetPort ¶
func (that *ParserTrojan) GetPort() int
func (*ParserTrojan) Parse ¶
func (that *ParserTrojan) Parse(rawUri string)
func (*ParserTrojan) Show ¶
func (that *ParserTrojan) Show()
type ParserVless ¶
type ParserVless struct {
Address string
Port int
UUID string
Encryption string
Flow string
*StreamField
}
func (*ParserVless) GetAddr ¶
func (that *ParserVless) GetAddr() string
func (*ParserVless) GetPort ¶
func (that *ParserVless) GetPort() int
func (*ParserVless) Parse ¶
func (that *ParserVless) Parse(rawUri string)
func (*ParserVless) Show ¶
func (that *ParserVless) Show()
type ParserVmess ¶
type ParserVmess struct {
Address string
Port int
UUID string
Security string
AID string
Nation string
Path string
PS string
ServerPort string
SkipCertVerify bool
TestName string
V string
*StreamField
}
func (*ParserVmess) GetAddr ¶
func (that *ParserVmess) GetAddr() string
func (*ParserVmess) GetPort ¶
func (that *ParserVmess) GetPort() int
func (*ParserVmess) Parse ¶
func (that *ParserVmess) Parse(rawUri string)
func (*ParserVmess) Show ¶
func (that *ParserVmess) Show()
type ParserWirguard ¶
type ParserWirguard struct {
PrivateKey string `koanf,json:"private_key"`
AddrV4 string `koanf,json:"addr_v4"`
AddrV6 string `koanf,json:"addr_v6"`
DNS string `koanf,json:"dns"`
MTU int `koanf,json:"mtu"`
PublicKey string `koanf,json:"public_key"`
AllowedIPs []string `koanf,json:"allowed_ips"`
Endpoint string `koanf,json:"endpoint"`
ClientID string `koanf,json:"client_id"`
DeviceName string `koanf,json:"device_name"`
Reserved []int `koanf,json:"reserved"`
Address string `koanf,json:"address"`
Port int `koanf,json:"port"`
}
func (*ParserWirguard) GetAddr ¶
func (that *ParserWirguard) GetAddr() string
func (*ParserWirguard) GetPort ¶
func (that *ParserWirguard) GetPort() int
func (*ParserWirguard) Parse ¶
func (that *ParserWirguard) Parse(rawUri string)
func (*ParserWirguard) Show ¶
func (that *ParserWirguard) Show()
type StreamField ¶
type StreamField struct {
Network string
StreamSecurity string
Path string
Host string
TCPHeaderType string
GRPCServiceName string
GRPCMultiMode string
ServerName string
TLSALPN string
TLSAllowInsecure string
Fingerprint string
RealityShortId string
RealitySpiderX string
RealityPublicKey string
PacketEncoding string
Mode string
}
Click to show internal directories.
Click to hide internal directories.