mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 14:41:23 +08:00
feat: add xeapi support and refactor eapi_decrypt to api_decrypt
- Added xeapi option to the API selection dropdown in api.html. - Removed eapi_decrypt.html and created a new api_decrypt.html for unified API decryption. - Implemented multi-crypto support in api_decrypt.html with corresponding UI changes. - Created decrypt.js module to handle decryption logic for different crypto types including xeapi. - Updated request.js to remove unnecessary debug logs and improve code clarity. - Updated index.html to link to the new api_decrypt.html instead of the removed eapi_decrypt.html.
This commit is contained in:
+11
-1
@@ -324,7 +324,6 @@ const createRequest = (uri, data, options) => {
|
||||
console.log('[ERR]', 'Unknown Crypto:', crypto)
|
||||
break
|
||||
}
|
||||
logger.debug(`[${crypto}]`, uri)
|
||||
// settings创建
|
||||
let settings = {
|
||||
method: 'POST',
|
||||
@@ -385,6 +384,17 @@ const createRequest = (uri, data, options) => {
|
||||
x.replace(/\s*Domain=[^(;|$)]+;*/, ''),
|
||||
)
|
||||
|
||||
// debug: 统一注释块,需要时取消注释查看请求/返回的原始密文
|
||||
|
||||
// logger.debug(`[${crypto}]`, uri)
|
||||
// logger.debug(`[${crypto}] encrypted data:`, JSON.stringify(encryptData))
|
||||
// logger.debug(
|
||||
// `[RAW] [${crypto}]`,
|
||||
// use_xeapi
|
||||
// ? Buffer.from(body).toString('base64')
|
||||
// : body.toString('hex').toUpperCase(),
|
||||
// )
|
||||
|
||||
try {
|
||||
if (use_xeapi) {
|
||||
if (res.headers['x-encr-ssid'] && res.headers['x-encr-sskey']) {
|
||||
|
||||
Reference in New Issue
Block a user