refactor(inbounds): drop the single-user shadowsocks inbound paths

isSSMultiUser treated 2022-blake3-chacha20-poly1305 as a single-user
inbound, and the inbounds page grew a row QR modal, a separate link
panel in the info modal and a client-count skip for that case. The
method is no longer allowed on inbounds, so every shadowsocks inbound
carries clients and those paths cannot be reached: remove them along
with the inbound-level QrCodeModal they alone opened.
This commit is contained in:
MHSanaei
2026-10-11 21:24:25 +02:00
parent f1ed1a9b17
commit c20082d254
15 changed files with 9 additions and 533 deletions
File diff suppressed because it is too large Load Diff
+1 -19
View File
@@ -8,7 +8,7 @@ import {
genWireguardLinks,
getInboundClients,
} from '@/lib/xray/inbound-link';
import { canEnableTlsFlow, isSS2022, isSSMultiUser } from '@/lib/xray/protocol-capabilities';
import { canEnableTlsFlow, isSS2022 } from '@/lib/xray/protocol-capabilities';
const FALLBACK_HOST = 'panel.example.test';
@@ -171,24 +171,6 @@ describe('inboundFromDb', () => {
});
describe('protocol-capability helpers with raw coerced shapes', () => {
it('isSSMultiUser returns true for legacy SS methods', () => {
expect(isSSMultiUser({ protocol: 'shadowsocks', settings: { method: 'aes-256-gcm' } })).toBe(
true,
);
expect(
isSSMultiUser({ protocol: 'shadowsocks', settings: { method: '2022-blake3-aes-128-gcm' } }),
).toBe(true);
});
it('isSSMultiUser returns false for single-user blake3-chacha20 method', () => {
expect(
isSSMultiUser({
protocol: 'shadowsocks',
settings: { method: '2022-blake3-chacha20-poly1305' },
}),
).toBe(false);
});
it('isSS2022 detects 2022-blake3 family', () => {
expect(
isSS2022({ protocol: 'shadowsocks', settings: { method: '2022-blake3-aes-128-gcm' } }),
@@ -8,7 +8,6 @@ import {
canEnableStream,
canEnableVisionSeed,
isSS2022,
isSSMultiUser,
} from '@/lib/xray/protocol-capabilities';
// Pure-function tests for the capability predicates. Each fixture × stream
@@ -67,7 +66,6 @@ describe('protocol capability predicates', () => {
canEnableStream: canEnableStream(values),
canEnableVisionSeed: canEnableVisionSeed(values),
isSS2022: isSS2022(values),
isSSMultiUser: isSSMultiUser(values),
};
expect(result).toMatchSnapshot();
});