mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-12 23:56:07 +00:00
ce8b1bed77
Per-client IP limit only enforces where fail2ban is installed, so the panel now reports enforceability and disables the field otherwise: - Add GET /panel/api/server/fail2banStatus (enabled/installed/usable/windows), cached 30s. - ClientFormModal and ClientBulkAddModal disable the IP Limit input when not usable and show a hover tooltip; Windows gets a platform-specific message instead of the bash-menu hint. - One-time migration ResetIpLimitNoFail2ban zeroes existing client limitIp (inbound settings JSON + clients table) on hosts without fail2ban, where the limit never applied. - Drop the recurring '[LimitIP] Fail2Ban is not installed' warning. - Add limitIpFail2banMissing/limitIpFail2banWindows/limitIpDisabled across all 13 locales.
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
export const keys = {
|
|
server: {
|
|
status: () => ['server', 'status'] as const,
|
|
fail2banStatus: () => ['server', 'fail2banStatus'] as const,
|
|
},
|
|
nodes: {
|
|
root: () => ['nodes'] as const,
|
|
list: () => ['nodes', 'list'] as const,
|
|
},
|
|
hosts: {
|
|
root: () => ['hosts'] as const,
|
|
list: () => ['hosts', 'list'] as const,
|
|
byInbound: (inboundId: number) => ['hosts', 'byInbound', inboundId] as const,
|
|
tags: () => ['hosts', 'tags'] as const,
|
|
},
|
|
settings: {
|
|
root: () => ['settings'] as const,
|
|
all: () => ['settings', 'all'] as const,
|
|
defaults: () => ['settings', 'defaults'] as const,
|
|
},
|
|
inbounds: {
|
|
root: () => ['inbounds'] as const,
|
|
slim: () => ['inbounds', 'slim'] as const,
|
|
options: () => ['inbounds', 'options'] as const,
|
|
},
|
|
clients: {
|
|
root: () => ['clients'] as const,
|
|
list: (params: unknown) => ['clients', 'list', params] as const,
|
|
all: () => ['clients', 'all'] as const,
|
|
onlines: () => ['clients', 'onlines'] as const,
|
|
onlinesByGuid: () => ['clients', 'onlinesByGuid'] as const,
|
|
activeInbounds: () => ['clients', 'activeInbounds'] as const,
|
|
lastOnline: () => ['clients', 'lastOnline'] as const,
|
|
groups: () => ['clients', 'groups'] as const,
|
|
},
|
|
xray: {
|
|
root: () => ['xray'] as const,
|
|
config: () => ['xray', 'config'] as const,
|
|
outboundsTraffic: () => ['xray', 'outboundsTraffic'] as const,
|
|
},
|
|
} as const;
|