Browse Source

Chore: change scenarios tests of VMess to AEAD

秋のかえで 3 years ago
parent
commit
1ebb564047

+ 5 - 5
testing/scenarios/command_test.go

@@ -183,7 +183,7 @@ func TestCommanderAddRemoveUser(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      u1.String(),
 								Id:      u1.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -250,7 +250,7 @@ func TestCommanderAddRemoveUser(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      u2.String(),
 										Id:      u2.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -287,7 +287,7 @@ func TestCommanderAddRemoveUser(t *testing.T) {
 					Email: "test@v2fly.org",
 					Email: "test@v2fly.org",
 					Account: serial.ToTypedMessage(&vmess.Account{
 					Account: serial.ToTypedMessage(&vmess.Account{
 						Id:      u2.String(),
 						Id:      u2.String(),
-						AlterId: 64,
+						AlterId: 0,
 					}),
 					}),
 				},
 				},
 			}),
 			}),
@@ -378,7 +378,7 @@ func TestCommanderStats(t *testing.T) {
 							Email: "test",
 							Email: "test",
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -434,7 +434,7 @@ func TestCommanderStats(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},

+ 2 - 2
testing/scenarios/feature_test.go

@@ -674,7 +674,7 @@ func TestDialV2Ray(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -706,7 +706,7 @@ func TestDialV2Ray(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},

+ 4 - 4
testing/scenarios/policy_test.go

@@ -78,7 +78,7 @@ func TestVMessClosing(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -132,7 +132,7 @@ func TestVMessClosing(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -192,7 +192,7 @@ func TestZeroBuffer(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -239,7 +239,7 @@ func TestZeroBuffer(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},

+ 4 - 4
testing/scenarios/reverse_test.go

@@ -96,7 +96,7 @@ func TestReverseProxy(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -171,7 +171,7 @@ func TestReverseProxy(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -280,7 +280,7 @@ func TestReverseProxyLongRunning(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -368,7 +368,7 @@ func TestReverseProxyLongRunning(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},

+ 2 - 2
testing/scenarios/transport_test.go

@@ -291,7 +291,7 @@ func TestVMessQuic(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -354,7 +354,7 @@ func TestVMessQuic(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},

+ 24 - 24
testing/scenarios/vmess_test.go

@@ -216,7 +216,7 @@ func TestVMessGCM(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -263,7 +263,7 @@ func TestVMessGCM(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -320,7 +320,7 @@ func TestVMessGCMReadv(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -367,7 +367,7 @@ func TestVMessGCMReadv(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -427,7 +427,7 @@ func TestVMessGCMUDP(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -474,7 +474,7 @@ func TestVMessGCMUDP(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -528,7 +528,7 @@ func TestVMessChacha20(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -575,7 +575,7 @@ func TestVMessChacha20(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_CHACHA20_POLY1305,
 											Type: protocol.SecurityType_CHACHA20_POLY1305,
 										},
 										},
@@ -630,7 +630,7 @@ func TestVMessNone(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -677,7 +677,7 @@ func TestVMessNone(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_NONE,
 											Type: protocol.SecurityType_NONE,
 										},
 										},
@@ -734,7 +734,7 @@ func TestVMessKCP(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -781,7 +781,7 @@ func TestVMessKCP(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -862,7 +862,7 @@ func TestVMessKCPLarge(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -909,7 +909,7 @@ func TestVMessKCPLarge(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -991,7 +991,7 @@ func TestVMessGCMMux(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -1044,7 +1044,7 @@ func TestVMessGCMMux(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -1108,7 +1108,7 @@ func TestVMessGCMMuxUDP(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -1175,7 +1175,7 @@ func TestVMessGCMMuxUDP(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -1237,7 +1237,7 @@ func TestVMessZero(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -1284,7 +1284,7 @@ func TestVMessZero(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_ZERO,
 											Type: protocol.SecurityType_ZERO,
 										},
 										},
@@ -1338,7 +1338,7 @@ func TestVMessGCMLengthAuth(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:      userID.String(),
 								Id:      userID.String(),
-								AlterId: 64,
+								AlterId: 0,
 							}),
 							}),
 						},
 						},
 					},
 					},
@@ -1385,7 +1385,7 @@ func TestVMessGCMLengthAuth(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},
@@ -1443,7 +1443,7 @@ func TestVMessGCMLengthAuthPlusNoTerminationSignal(t *testing.T) {
 						{
 						{
 							Account: serial.ToTypedMessage(&vmess.Account{
 							Account: serial.ToTypedMessage(&vmess.Account{
 								Id:           userID.String(),
 								Id:           userID.String(),
-								AlterId:      64,
+								AlterId:      0,
 								TestsEnabled: "AuthenticatedLength|NoTerminationSignal",
 								TestsEnabled: "AuthenticatedLength|NoTerminationSignal",
 							}),
 							}),
 						},
 						},
@@ -1491,7 +1491,7 @@ func TestVMessGCMLengthAuthPlusNoTerminationSignal(t *testing.T) {
 								{
 								{
 									Account: serial.ToTypedMessage(&vmess.Account{
 									Account: serial.ToTypedMessage(&vmess.Account{
 										Id:      userID.String(),
 										Id:      userID.String(),
-										AlterId: 64,
+										AlterId: 0,
 										SecuritySettings: &protocol.SecurityConfig{
 										SecuritySettings: &protocol.SecurityConfig{
 											Type: protocol.SecurityType_AES128_GCM,
 											Type: protocol.SecurityType_AES128_GCM,
 										},
 										},