-
Notifications
You must be signed in to change notification settings - Fork 82
/
vless.go
38 lines (36 loc) · 998 Bytes
/
vless.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package features
type Vless struct {
TLS string
Add string
Port int
Net string
ID string
Type string // headerType
Security string // VlessUser.Security
Encryption string // VlessUser.encryption
Flow string // VlessUser.flow
Protocol string
Path string // ws path
Host string // ws host / http host
SNI string // tls sni
VmessOptions
}
func NewVless(Add string, Port int, ID string, TLS string, HeaderType string, Encryption string, Net string, Flow string, Security string, Path string, Host string, SNI string, opt []byte) *Vless {
options := NewVmessOptions(opt)
return &Vless{
TLS: TLS,
Add: Add,
Port: Port,
Net: Net,
ID: ID,
Type: HeaderType,
Encryption: Encryption,
Flow: Flow,
Security: Security,
Path: Path,
Host: Host,
SNI: SNI,
Protocol: "vless",
VmessOptions: options,
}
}