From 711e67f81b1605b556cb75c085eb362be6de401d Mon Sep 17 00:00:00 2001 From: Kirikaze Chiyuki Date: Thu, 31 Oct 2024 23:04:02 +0800 Subject: [PATCH] fix: update webvpn url key (#1) --- encrypt.go | 2 +- encrypt_test.go | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/encrypt.go b/encrypt.go index f1ab10c..10a8b12 100644 --- a/encrypt.go +++ b/encrypt.go @@ -40,7 +40,7 @@ func EncryptURLToWebVPN(url string) string { } index := strings.Index(url, "/") - key := "wrdvpnisthebest!" + key := "b0A58a69394ce73@" if index == -1 { url = encrypt(url, key, key) diff --git a/encrypt_test.go b/encrypt_test.go index 272219e..3ea14d7 100644 --- a/encrypt_test.go +++ b/encrypt_test.go @@ -9,10 +9,9 @@ func TestEncryptWebVPNUrl(t *testing.T) { a := assert.New(t) testCases := map[string]string{ - "http://202.118.8.7:8991/F/29DK3KT4SV9VBRI548R8UD3MBIT991BXE4HLXENCFEGE54551T-22111?func=find-b-0": "https://webvpn.neu.edu.cn/http-8991/77726476706e69737468656265737421a2a713d27661301e2646de/F/29DK3KT4SV9VBRI548R8UD3MBIT991BXE4HLXENCFEGE54551T-22111?func=find-b-0", - "http://219.216.96.4/eams/": "https://webvpn.neu.edu.cn/http/77726476706e69737468656265737421a2a618d275613e1e275ec7f8/eams/", - "https://portal.neu.edu.cn/": "https://webvpn.neu.edu.cn/https/77726476706e69737468656265737421e0f85388263c265e7b1dc7a99c406d369a/", - "//ipgw.neu.edu.cn": "https://webvpn.neu.edu.cn/http/77726476706e69737468656265737421f9e7468b693e6d45300d8db9d6562d", + "http://219.216.96.4/eams/": "https://webvpn.neu.edu.cn/http/62304135386136393339346365373340e2b0fd71d8941093ab4e2527/eams/", + "https://portal.neu.edu.cn/": "https://webvpn.neu.edu.cn/https/62304135386136393339346365373340a0eeb62b8bc908d3f70d257682109b84a2/", + "//ipgw.neu.edu.cn": "https://webvpn.neu.edu.cn/http/62304135386136393339346365373340b9f1a328c4cb43c8bc1d6f66c806db", } for origin, encrypted := range testCases {