Fix some tests and format code (#830)

* Increase some tls test timeout

* Fix TestUserValidator

* Change all tests to VMessAEAD

Old VMess MD5 tests will be rejected and fail in 2022

* Chore: auto format code
This commit is contained in:
yuhan6665 2021-12-14 19:28:47 -05:00 committed by GitHub
parent d5a7901601
commit e93da4bd02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 137 additions and 234 deletions

View file

@ -47,8 +47,7 @@ func TestVMessOutbound(t *testing.T) {
Email: "love@example.com",
Level: 255,
Account: serial.ToTypedMessage(&vmess.Account{
Id: "e641f5ad-9397-41e3-bf1a-e8740dfed019",
AlterId: 0,
Id: "e641f5ad-9397-41e3-bf1a-e8740dfed019",
SecuritySettings: &protocol.SecurityConfig{
Type: protocol.SecurityType_AUTO,
},
@ -74,14 +73,12 @@ func TestVMessInbound(t *testing.T) {
{
"id": "27848739-7e62-4138-9fd3-098a63964b6b",
"level": 0,
"alterId": 16,
"email": "love@example.com",
"security": "aes-128-gcm"
}
],
"default": {
"level": 0,
"alterId": 32
"level": 0
},
"detour": {
"to": "tag_to_detour"
@ -95,8 +92,7 @@ func TestVMessInbound(t *testing.T) {
Level: 0,
Email: "love@example.com",
Account: serial.ToTypedMessage(&vmess.Account{
Id: "27848739-7e62-4138-9fd3-098a63964b6b",
AlterId: 16,
Id: "27848739-7e62-4138-9fd3-098a63964b6b",
SecuritySettings: &protocol.SecurityConfig{
Type: protocol.SecurityType_AES128_GCM,
},
@ -104,8 +100,7 @@ func TestVMessInbound(t *testing.T) {
},
},
Default: &inbound.DefaultConfig{
Level: 0,
AlterId: 32,
Level: 0,
},
Detour: &inbound.DetourConfig{
To: "tag_to_detour",