mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 14:41:23 +08:00
feat: 支持启用全局解灰
This commit is contained in:
@@ -2,10 +2,14 @@
|
|||||||
CORS_ALLOW_ORIGIN = "*"
|
CORS_ALLOW_ORIGIN = "*"
|
||||||
|
|
||||||
### UnblockNeteaseMusic 设置项
|
### UnblockNeteaseMusic 设置项
|
||||||
|
## 启用全局解灰, 无论是否调用参数都会使用解灰(推荐开启)
|
||||||
|
ENABLE_GENERAL_UNBLOCK = true
|
||||||
## 歌曲启用无损音质
|
## 歌曲启用无损音质
|
||||||
ENABLE_FLAC = true
|
ENABLE_FLAC = true
|
||||||
## 启用无损音质时,是否选择音质最高的
|
## 启用无损音质时,是否选择音质最高的
|
||||||
SELECT_MAX_BR = true
|
SELECT_MAX_BR = true
|
||||||
|
## 音源设置
|
||||||
|
UNBLOCK_SOURCE = ['pyncmd','kuwo', 'qq', 'migu', 'kugou']
|
||||||
## 严格按照配置音源设置顺序进行匹配
|
## 严格按照配置音源设置顺序进行匹配
|
||||||
FOLLOW_SOURCE_ORDER = true
|
FOLLOW_SOURCE_ORDER = true
|
||||||
## Cookie设置项; 推荐在Vercel等平台进行环境变量的设置或者设置github secret
|
## Cookie设置项; 推荐在Vercel等平台进行环境变量的设置或者设置github secret
|
||||||
|
|||||||
Generated
+20
-20
@@ -24,8 +24,8 @@ importers:
|
|||||||
specifier: ^4.21.2
|
specifier: ^4.21.2
|
||||||
version: 4.21.2
|
version: 4.21.2
|
||||||
express-fileupload:
|
express-fileupload:
|
||||||
specifier: ^1.5.1
|
specifier: ^1.5.2
|
||||||
version: 1.5.1
|
version: 1.5.2
|
||||||
md5:
|
md5:
|
||||||
specifier: ^2.3.0
|
specifier: ^2.3.0
|
||||||
version: 2.3.0
|
version: 2.3.0
|
||||||
@@ -307,8 +307,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
|
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
|
||||||
engines: {node: '>= 6.0.0'}
|
engines: {node: '>= 6.0.0'}
|
||||||
|
|
||||||
[email protected].3:
|
[email protected].4:
|
||||||
resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==}
|
resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}
|
||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
@@ -982,8 +982,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==}
|
resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
|
|
||||||
[email protected].1:
|
[email protected].2:
|
||||||
resolution: {integrity: sha512-LsYG1ALXEB7vlmjuSw8ABeOctMp8a31aUC5ZF55zuz7O2jLFnmJYrCv10py357ky48aEoBQ/9bVXgFynjvaPmA==}
|
resolution: {integrity: sha512-wxUJn2vTHvj/kZCVmc5/bJO15C7aSMyHeuXYY3geKpeKibaAoQGcEv5+sM6nHS2T7VF+QHS4hTWPiY2mKofEdg==}
|
||||||
engines: {node: '>=12.0.0'}
|
engines: {node: '>=12.0.0'}
|
||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
@@ -1133,8 +1133,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==}
|
resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
[email protected].4:
|
[email protected].5:
|
||||||
resolution: {integrity: sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==}
|
resolution: {integrity: sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==}
|
||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
@@ -2125,8 +2125,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==}
|
resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==}
|
||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
|
|
||||||
[email protected].5:
|
[email protected].6:
|
||||||
resolution: {integrity: sha512-iF+tNDQla22geJdTyJB1wM/qrX9DMRwWrciEPwWLPRWAUEM8sQiyxgckLxWT1f7+9VabJS0jTGGr4QgBuvi6Ww==}
|
resolution: {integrity: sha512-pe4Y2yzru68lXCb38aAqRf5gvN8YdjP1lok5o0J7BOHljkyCGKVz7H3vpVIXKD27rj2giOJ7DwVyk/GWrPHDWA==}
|
||||||
engines: {node: '>= 10.0.0', npm: '>= 3.0.0'}
|
engines: {node: '>= 10.0.0', npm: '>= 3.0.0'}
|
||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
@@ -2730,7 +2730,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
[email protected].3: {}
|
[email protected].4: {}
|
||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -3537,7 +3537,7 @@ snapshots:
|
|||||||
|
|
||||||
[email protected]: {}
|
[email protected]: {}
|
||||||
|
|
||||||
[email protected].1:
|
[email protected].2:
|
||||||
dependencies:
|
dependencies:
|
||||||
busboy: 1.6.0
|
busboy: 1.6.0
|
||||||
|
|
||||||
@@ -3733,7 +3733,7 @@ snapshots:
|
|||||||
es-errors: 1.3.0
|
es-errors: 1.3.0
|
||||||
get-intrinsic: 1.3.0
|
get-intrinsic: 1.3.0
|
||||||
|
|
||||||
[email protected].4:
|
[email protected].5:
|
||||||
dependencies:
|
dependencies:
|
||||||
basic-ftp: 5.0.5
|
basic-ftp: 5.0.5
|
||||||
data-uri-to-buffer: 6.0.2
|
data-uri-to-buffer: 6.0.2
|
||||||
@@ -3836,7 +3836,7 @@ snapshots:
|
|||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.3
|
agent-base: 7.1.4
|
||||||
debug: 4.4.1([email protected])
|
debug: 4.4.1([email protected])
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -3850,7 +3850,7 @@ snapshots:
|
|||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.3
|
agent-base: 7.1.4
|
||||||
debug: 4.4.1([email protected])
|
debug: 4.4.1([email protected])
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -4363,9 +4363,9 @@ snapshots:
|
|||||||
[email protected]:
|
[email protected]:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tootallnate/quickjs-emscripten': 0.23.0
|
'@tootallnate/quickjs-emscripten': 0.23.0
|
||||||
agent-base: 7.1.3
|
agent-base: 7.1.4
|
||||||
debug: 4.4.1([email protected])
|
debug: 4.4.1([email protected])
|
||||||
get-uri: 6.0.4
|
get-uri: 6.0.5
|
||||||
http-proxy-agent: 7.0.2
|
http-proxy-agent: 7.0.2
|
||||||
https-proxy-agent: 7.0.6
|
https-proxy-agent: 7.0.6
|
||||||
pac-resolver: 7.0.1
|
pac-resolver: 7.0.1
|
||||||
@@ -4862,13 +4862,13 @@ snapshots:
|
|||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.3
|
agent-base: 7.1.4
|
||||||
debug: 4.4.1([email protected])
|
debug: 4.4.1([email protected])
|
||||||
socks: 2.8.5
|
socks: 2.8.6
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
[email protected].5:
|
[email protected].6:
|
||||||
dependencies:
|
dependencies:
|
||||||
ip-address: 9.0.5
|
ip-address: 9.0.5
|
||||||
smart-buffer: 4.2.0
|
smart-buffer: 4.2.0
|
||||||
|
|||||||
@@ -239,19 +239,22 @@ async function consturctServer(moduleDefs) {
|
|||||||
return request(...obj)
|
return request(...obj)
|
||||||
})
|
})
|
||||||
console.log('[OK]', decode(req.originalUrl))
|
console.log('[OK]', decode(req.originalUrl))
|
||||||
/*
|
|
||||||
if (req.baseUrl === '/song/url/v1' || req.baseUrl === '/song/url') {
|
if (
|
||||||
|
(req.baseUrl === '/song/url/v1' || req.baseUrl === '/song/url') &&
|
||||||
|
process.env.ENABLE_GENERAL_UNBLOCK === 'true'
|
||||||
|
) {
|
||||||
const song = moduleResponse['body']['data'][0]
|
const song = moduleResponse['body']['data'][0]
|
||||||
if (song.freeTrialInfo !== null || !song.url || [1, 4].includes(song.fee)) {
|
if (song.freeTrialInfo !== null || !song.url || [1, 4].includes(song.fee)) {
|
||||||
const match = require('@unblockneteasemusic/server')
|
const match = require('@unblockneteasemusic/server')
|
||||||
const source = ['pyncmd', 'kuwo']
|
const source = ['pyncmd','kuwo', 'qq', 'migu', 'kugou']
|
||||||
const { url } = await match(req.query.id, source)
|
const { url } = await match(req.query.id, source)
|
||||||
song.url = url
|
song.url = url
|
||||||
song.freeTrialInfo = 'unblock'
|
song.freeTrialInfo = 'null'
|
||||||
console.log("解灰成功!")// 对于Splayer来说,去除开通会员提示
|
console.log("解灰成功!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
const cookies = moduleResponse.cookie
|
const cookies = moduleResponse.cookie
|
||||||
if (!query.noCookie) {
|
if (!query.noCookie) {
|
||||||
|
|||||||
Reference in New Issue
Block a user