Compare commits

...

2 Commits

Author SHA1 Message Date
xream
3f8269e835 feat: Node.js 环境支持自定义 JSON Body limit, 例: SUB_STORE_BODY_JSON_LIMIT=10mb 2025-03-07 13:59:22 +08:00
xream
465b62218a feat: 验证 mihomo ss cipher
Some checks failed
build / build (push) Has been cancelled
2025-03-05 15:25:16 +08:00
3 changed files with 48 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.17.4",
"version": "2.17.6",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"scripts": {

View File

@@ -10,6 +10,47 @@ export default function ClashMeta_Producer() {
return false;
} else if (['juicity'].includes(proxy.type)) {
return false;
} else if (
['ss'].includes(proxy.type) &&
![
'aes-128-ctr',
'aes-192-ctr',
'aes-256-ctr',
'aes-128-cfb',
'aes-192-cfb',
'aes-256-cfb',
'aes-128-gcm',
'aes-192-gcm',
'aes-256-gcm',
'aes-128-ccm',
'aes-192-ccm',
'aes-256-ccm',
'aes-128-gcm-siv',
'aes-256-gcm-siv',
'chacha20-ietf',
'chacha20',
'xchacha20',
'chacha20-ietf-poly1305',
'xchacha20-ietf-poly1305',
'chacha8-ietf-poly1305',
'xchacha8-ietf-poly1305',
'2022-blake3-aes-128-gcm',
'2022-blake3-aes-256-gcm',
'2022-blake3-chacha20-poly1305',
'lea-128-gcm',
'lea-192-gcm',
'lea-256-gcm',
'rabbit128-poly1305',
'aegis-128l',
'aegis-256',
'aez-384',
'deoxys-ii-256-128',
'rc4-md5',
'none',
].includes(proxy.cipher)
) {
// https://wiki.metacubex.one/config/proxies/ss/#cipher
return false;
}
return true;
})

View File

@@ -17,7 +17,12 @@ export default function express({ substore: $, port, host }) {
const express_ = eval(`require("express")`);
const bodyParser = eval(`require("body-parser")`);
const app = express_();
app.use(bodyParser.json({ verify: rawBodySaver, limit: '1mb' }));
app.use(
bodyParser.json({
verify: rawBodySaver,
limit: eval('process.env.SUB_STORE_BODY_JSON_LIMIT') || '1mb',
}),
);
app.use(
bodyParser.urlencoded({ verify: rawBodySaver, extended: true }),
);