Skip to content

Commit

Permalink
Chore: vmess test remove all alterid
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamacro committed Feb 27, 2022
1 parent 132a6a6 commit b52d0c1
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 97 deletions.
28 changes: 0 additions & 28 deletions test/config/vmess-aead.json

This file was deleted.

3 changes: 1 addition & 2 deletions test/config/vmess-grpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 32
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions test/config/vmess-http.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 32
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions test/config/vmess-http2.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 32
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions test/config/vmess-tls.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 32
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions test/config/vmess-ws-0rtt.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 32
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions test/config/vmess-ws-tls.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 32
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions test/config/vmess-ws.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 32
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions test/config/vmess.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 32
"id": "b831381d-6324-4d53-ad4f-8cda48b30811"
}
]
},
Expand Down
59 changes: 6 additions & 53 deletions test/vmess_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,51 +34,12 @@ func TestClash_Vmess(t *testing.T) {
})

proxy, err := outbound.NewVmess(outbound.VmessOption{
Name: "vmess",
Server: localIP.String(),
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
AlterID: 32,
UDP: true,
})
if err != nil {
assert.FailNow(t, err.Error())
}

time.Sleep(waitTime)
testSuit(t, proxy)
}

func TestClash_VmessAEAD(t *testing.T) {
configPath := C.Path.Resolve("vmess-aead.json")

cfg := &container.Config{
Image: ImageVmess,
ExposedPorts: defaultExposedPorts,
}
hostCfg := &container.HostConfig{
PortBindings: defaultPortBindings,
Binds: []string{fmt.Sprintf("%s:/etc/v2ray/config.json", configPath)},
}

id, err := startContainer(cfg, hostCfg, "vmess-aead")
if err != nil {
assert.FailNow(t, err.Error())
}

t.Cleanup(func() {
cleanContainer(id)
})

proxy, err := outbound.NewVmess(outbound.VmessOption{
Name: "vmess",
Server: localIP.String(),
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
AlterID: 0,
UDP: true,
Name: "vmess",
Server: localIP.String(),
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
UDP: true,
})
if err != nil {
assert.FailNow(t, err.Error())
Expand Down Expand Up @@ -114,7 +75,6 @@ func TestClash_VmessTLS(t *testing.T) {
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
AlterID: 32,
TLS: true,
SkipCertVerify: true,
ServerName: "example.org",
Expand Down Expand Up @@ -154,7 +114,6 @@ func TestClash_VmessHTTP2(t *testing.T) {
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
AlterID: 32,
Network: "h2",
TLS: true,
SkipCertVerify: true,
Expand Down Expand Up @@ -197,7 +156,6 @@ func TestClash_VmessHTTP(t *testing.T) {
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
AlterID: 32,
Network: "http",
UDP: true,
HTTPOpts: outbound.HTTPOptions{
Expand Down Expand Up @@ -250,7 +208,6 @@ func TestClash_VmessWebsocket(t *testing.T) {
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
AlterID: 32,
Network: "ws",
UDP: true,
})
Expand Down Expand Up @@ -288,7 +245,6 @@ func TestClash_VmessWebsocketTLS(t *testing.T) {
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
AlterID: 32,
Network: "ws",
TLS: true,
SkipCertVerify: true,
Expand Down Expand Up @@ -328,7 +284,6 @@ func TestClash_VmessGrpc(t *testing.T) {
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
AlterID: 32,
Network: "grpc",
TLS: true,
SkipCertVerify: true,
Expand Down Expand Up @@ -370,7 +325,6 @@ func TestClash_VmessWebsocket0RTT(t *testing.T) {
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
AlterID: 32,
Network: "ws",
UDP: true,
ServerName: "example.org",
Expand Down Expand Up @@ -411,7 +365,6 @@ func TestClash_VmessWebsocketXray0RTT(t *testing.T) {
Port: 10002,
UUID: "b831381d-6324-4d53-ad4f-8cda48b30811",
Cipher: "auto",
AlterID: 32,
Network: "ws",
UDP: true,
ServerName: "example.org",
Expand Down

0 comments on commit b52d0c1

Please sign in to comment.