Chore: adjust VLESS
This commit is contained in:
@ -37,7 +37,6 @@ func TestClash_VlessTLS(t *testing.T) {
|
||||
Server: localIP.String(),
|
||||
Port: 10002,
|
||||
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
|
||||
TLS: true,
|
||||
SkipCertVerify: true,
|
||||
ServerName: "example.org",
|
||||
UDP: true,
|
||||
@ -75,7 +74,6 @@ func TestClash_VlessXTLS(t *testing.T) {
|
||||
Server: localIP.String(),
|
||||
Port: 10002,
|
||||
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
|
||||
TLS: true,
|
||||
SkipCertVerify: true,
|
||||
ServerName: "example.org",
|
||||
UDP: true,
|
||||
@ -89,3 +87,41 @@ func TestClash_VlessXTLS(t *testing.T) {
|
||||
time.Sleep(waitTime)
|
||||
testSuit(t, proxy)
|
||||
}
|
||||
|
||||
func TestClash_VlessWS(t *testing.T) {
|
||||
cfg := &container.Config{
|
||||
Image: ImageVmess,
|
||||
ExposedPorts: defaultExposedPorts,
|
||||
}
|
||||
hostCfg := &container.HostConfig{
|
||||
PortBindings: defaultPortBindings,
|
||||
Binds: []string{
|
||||
fmt.Sprintf("%s:/etc/v2ray/config.json", C.Path.Resolve("vless-ws.json")),
|
||||
fmt.Sprintf("%s:/etc/ssl/v2ray/fullchain.pem", C.Path.Resolve("example.org.pem")),
|
||||
fmt.Sprintf("%s:/etc/ssl/v2ray/privkey.pem", C.Path.Resolve("example.org-key.pem")),
|
||||
},
|
||||
}
|
||||
|
||||
id, err := startContainer(cfg, hostCfg, "vless-ws")
|
||||
if err != nil {
|
||||
assert.FailNow(t, err.Error())
|
||||
}
|
||||
defer cleanContainer(id)
|
||||
|
||||
proxy, err := outbound.NewVless(outbound.VlessOption{
|
||||
Name: "vless",
|
||||
Server: localIP.String(),
|
||||
Port: 10002,
|
||||
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
|
||||
SkipCertVerify: true,
|
||||
ServerName: "example.org",
|
||||
Network: "ws",
|
||||
UDP: true,
|
||||
})
|
||||
if err != nil {
|
||||
assert.FailNow(t, err.Error())
|
||||
}
|
||||
|
||||
time.Sleep(waitTime)
|
||||
testSuit(t, proxy)
|
||||
}
|
||||
|
Reference in New Issue
Block a user