From 7c76868797c997df5b2a5acefdacee942436dc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E3=81=AE=E3=81=8B=E3=81=88=E3=81=A7?= Date: Sat, 1 Jan 2022 11:10:09 +0800 Subject: [PATCH] Chore: change scenarios tests of VMess to AEAD --- testing/scenarios/command_test.go | 10 +++--- testing/scenarios/feature_test.go | 4 +-- testing/scenarios/policy_test.go | 8 ++--- testing/scenarios/reverse_test.go | 8 ++--- testing/scenarios/transport_test.go | 4 +-- testing/scenarios/vmess_test.go | 48 ++++++++++++++--------------- 6 files changed, 41 insertions(+), 41 deletions(-) diff --git a/testing/scenarios/command_test.go b/testing/scenarios/command_test.go index 41628802f..f957898a2 100644 --- a/testing/scenarios/command_test.go +++ b/testing/scenarios/command_test.go @@ -182,7 +182,7 @@ func TestCommanderAddRemoveUser(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: u1.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -249,7 +249,7 @@ func TestCommanderAddRemoveUser(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: u2.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -286,7 +286,7 @@ func TestCommanderAddRemoveUser(t *testing.T) { Email: "test@v2fly.org", Account: serial.ToTypedMessage(&vmess.Account{ Id: u2.String(), - AlterId: 64, + AlterId: 0, }), }, }), @@ -377,7 +377,7 @@ func TestCommanderStats(t *testing.T) { Email: "test", Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -433,7 +433,7 @@ func TestCommanderStats(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, diff --git a/testing/scenarios/feature_test.go b/testing/scenarios/feature_test.go index 9455ff6df..ac9cf3183 100644 --- a/testing/scenarios/feature_test.go +++ b/testing/scenarios/feature_test.go @@ -675,7 +675,7 @@ func TestDialV2Ray(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -707,7 +707,7 @@ func TestDialV2Ray(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, diff --git a/testing/scenarios/policy_test.go b/testing/scenarios/policy_test.go index f69b57f4e..27f23908a 100644 --- a/testing/scenarios/policy_test.go +++ b/testing/scenarios/policy_test.go @@ -77,7 +77,7 @@ func TestVMessClosing(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -131,7 +131,7 @@ func TestVMessClosing(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -191,7 +191,7 @@ func TestZeroBuffer(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -239,7 +239,7 @@ func TestZeroBuffer(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, diff --git a/testing/scenarios/reverse_test.go b/testing/scenarios/reverse_test.go index 6da74523b..e20573a57 100644 --- a/testing/scenarios/reverse_test.go +++ b/testing/scenarios/reverse_test.go @@ -94,7 +94,7 @@ func TestReverseProxy(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -169,7 +169,7 @@ func TestReverseProxy(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -279,7 +279,7 @@ func TestReverseProxyLongRunning(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -368,7 +368,7 @@ func TestReverseProxyLongRunning(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, diff --git a/testing/scenarios/transport_test.go b/testing/scenarios/transport_test.go index 447527565..f7db7725b 100644 --- a/testing/scenarios/transport_test.go +++ b/testing/scenarios/transport_test.go @@ -291,7 +291,7 @@ func TestVMessQuic(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -355,7 +355,7 @@ func TestVMessQuic(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, diff --git a/testing/scenarios/vmess_test.go b/testing/scenarios/vmess_test.go index 5fd69779f..f732dd60f 100644 --- a/testing/scenarios/vmess_test.go +++ b/testing/scenarios/vmess_test.go @@ -217,7 +217,7 @@ func TestVMessGCM(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -265,7 +265,7 @@ func TestVMessGCM(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -323,7 +323,7 @@ func TestVMessGCMReadv(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -371,7 +371,7 @@ func TestVMessGCMReadv(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -432,7 +432,7 @@ func TestVMessGCMUDP(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -480,7 +480,7 @@ func TestVMessGCMUDP(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -535,7 +535,7 @@ func TestVMessChacha20(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -583,7 +583,7 @@ func TestVMessChacha20(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_CHACHA20_POLY1305, }, @@ -639,7 +639,7 @@ func TestVMessNone(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -687,7 +687,7 @@ func TestVMessNone(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_NONE, }, @@ -745,7 +745,7 @@ func TestVMessKCP(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -793,7 +793,7 @@ func TestVMessKCP(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -875,7 +875,7 @@ func TestVMessKCPLarge(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -923,7 +923,7 @@ func TestVMessKCPLarge(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -1006,7 +1006,7 @@ func TestVMessGCMMux(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -1060,7 +1060,7 @@ func TestVMessGCMMux(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -1125,7 +1125,7 @@ func TestVMessGCMMuxUDP(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -1193,7 +1193,7 @@ func TestVMessGCMMuxUDP(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -1256,7 +1256,7 @@ func TestVMessZero(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -1304,7 +1304,7 @@ func TestVMessZero(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_ZERO, }, @@ -1359,7 +1359,7 @@ func TestVMessGCMLengthAuth(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, }), }, }, @@ -1407,7 +1407,7 @@ func TestVMessGCMLengthAuth(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, }, @@ -1466,7 +1466,7 @@ func TestVMessGCMLengthAuthPlusNoTerminationSignal(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, TestsEnabled: "AuthenticatedLength|NoTerminationSignal", }), }, @@ -1515,7 +1515,7 @@ func TestVMessGCMLengthAuthPlusNoTerminationSignal(t *testing.T) { { Account: serial.ToTypedMessage(&vmess.Account{ Id: userID.String(), - AlterId: 64, + AlterId: 0, SecuritySettings: &protocol.SecurityConfig{ Type: protocol.SecurityType_AES128_GCM, },