Skip to content

Commit

Permalink
fix: update webvpn url key (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
chiyuki0325 authored Oct 31, 2024
1 parent 2d20dbb commit 711e67f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 3 additions & 4 deletions encrypt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 711e67f

Please sign in to comment.