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:
MoeFurina
2026-05-30 00:17:24 +08:00
parent 3e0337ab94
commit d0935f6e42
10 changed files with 950 additions and 411 deletions
+11 -1
View File
@@ -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']) {