feat(clients): allow attaching clients to socks/mixed inbounds

The client form, bulk-add form and the inbound-side attach entry all
filtered attachable inbounds by a protocol whitelist that lacked
socks/mixed (inherited from upstream), so SK5 inbounds could never be
picked as a client's associated inbound even though the backend
accepts the association. Add 'socks' and 'mixed' to all three gates.
The client record's existing password field is the socks credential;
no new credential shape is introduced.
This commit is contained in:
Muse
2026-10-21 22:01:30 +00:00
parent 051a74be80
commit bea7f4b2b6
3 changed files with 6 additions and 0 deletions
@@ -37,6 +37,8 @@ const MULTI_CLIENT_PROTOCOLS = new Set([
'hysteria', 'hysteria',
'wireguard', 'wireguard',
'amneziawg', 'amneziawg',
'socks',
'mixed',
]); ]);
const EMPTY: ClientBulkAddFormValues = { const EMPTY: ClientBulkAddFormValues = {
@@ -61,6 +61,8 @@ const MULTI_CLIENT_PROTOCOLS = new Set([
'wireguard', 'wireguard',
'mtproto', 'mtproto',
'amneziawg', 'amneziawg',
'socks',
'mixed',
]); ]);
const CLIENT_FORM_MODAL_Z_INDEX = 1000; const CLIENT_FORM_MODAL_Z_INDEX = 1000;
@@ -90,6 +90,8 @@ export function isInboundMultiUser(record: { protocol: string; settings: unknown
case 'mtproto': case 'mtproto':
case 'wireguard': case 'wireguard':
case 'amneziawg': case 'amneziawg':
case 'socks':
case 'mixed':
return true; return true;
case 'shadowsocks': case 'shadowsocks':
return isSSMultiUser({ protocol: 'shadowsocks', settings: readSettings(record.settings) }); return isSSMultiUser({ protocol: 'shadowsocks', settings: readSettings(record.settings) });