Skip to content

Commit cae599a

Browse files
authored
fix(hook): support newer clients
- Add `interfacepc.music.163.com` to hook targets / host list - Don't set `Accept-Encoding` for nativeFetch
1 parent 952b9e6 commit cae599a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ checknetisolation loopbackexempt -a -n="1F8B0F94.122165AE053F_j2p0p5q0044a6"
243243
<Server IP> music.163.com
244244
<Server IP> interface.music.163.com
245245
<Server IP> interface3.music.163.com
246+
<Server IP> interfacepc.music.163.com
246247
<Server IP> interface.music.163.com.163jiasu.com
247248
<Server IP> interface3.music.163.com.163jiasu.com
248249
```

src/hook.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ hook.target.host = new Set([
4545
'music.163.com',
4646
'interface.music.163.com',
4747
'interface3.music.163.com',
48+
'interfacepc.music.163.com',
4849
'apm.music.163.com',
4950
'apm3.music.163.com',
5051
'interface.music.163.com.163jiasu.com',
@@ -169,7 +170,8 @@ hook.request.before = (ctx) => {
169170
req.url.includes('/eapi/cloud/upload/check')
170171
)
171172
return; // look living/cloudupload eapi can not be decrypted
172-
req.headers['Accept-Encoding'] = 'gzip, deflate'; // https://blog.csdn.net/u013022222/article/details/51707352
173+
if (req.headers['Accept-Encoding'])
174+
req.headers['Accept-Encoding'] = 'gzip, deflate'; // https://blog.csdn.net/u013022222/article/details/51707352
173175
if (body) {
174176
const netease = {};
175177
netease.pad = (body.match(/%0+$/) || [''])[0];

0 commit comments

Comments
 (0)