From 89f17f6fefc6f2a90eb809ef9a10846afd06ec50 Mon Sep 17 00:00:00 2001 From: Kuzz007 Date: Mon, 27 Jul 2026 23:00:04 +0300 Subject: [PATCH] fix(frontend): give AmneziaWG the same UDP tag and its own tag color The Inbounds list only special-cased isWireguard/isHysteria for the "UDP" network badge, so an AmneziaWG row showed just the bare protocol tag with no transport badge next to it. Added the missing isAmneziawg flag (mirrors isWireguard exactly) and wired it into the same branch. Client-row protocol-color maps in ClientsPage/HostList had no amneziawg entry, silently falling back to grey -- ClientInfoModal already had amneziawg: 'yellow' from earlier work, these two just never got it. --- frontend/src/models/dbinbound.ts | 4 ++++ frontend/src/pages/clients/ClientsPage.tsx | 1 + frontend/src/pages/hosts/HostList.tsx | 1 + frontend/src/pages/inbounds/list/types.ts | 1 + frontend/src/pages/inbounds/list/useInboundColumns.tsx | 2 +- 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/models/dbinbound.ts b/frontend/src/models/dbinbound.ts index 81eecbdb5..bdfa52195 100644 --- a/frontend/src/models/dbinbound.ts +++ b/frontend/src/models/dbinbound.ts @@ -163,6 +163,10 @@ export class DBInbound { return this.protocol === Protocols.WIREGUARD; } + get isAmneziawg() { + return this.protocol === Protocols.AMNEZIAWG; + } + get isHysteria() { return this.protocol === Protocols.HYSTERIA; } diff --git a/frontend/src/pages/clients/ClientsPage.tsx b/frontend/src/pages/clients/ClientsPage.tsx index 75b6baac4..84fbc1c9e 100644 --- a/frontend/src/pages/clients/ClientsPage.tsx +++ b/frontend/src/pages/clients/ClientsPage.tsx @@ -142,6 +142,7 @@ const INBOUND_PROTOCOL_COLORS: Record = { hysteria: 'cyan', hysteria2: 'green', wireguard: 'gold', + amneziawg: 'yellow', http: 'purple', mixed: 'lime', tunnel: 'orange', diff --git a/frontend/src/pages/hosts/HostList.tsx b/frontend/src/pages/hosts/HostList.tsx index 88d2524e9..e016bfcfa 100644 --- a/frontend/src/pages/hosts/HostList.tsx +++ b/frontend/src/pages/hosts/HostList.tsx @@ -39,6 +39,7 @@ const INBOUND_PROTOCOL_COLORS: Record = { hysteria: 'cyan', hysteria2: 'green', wireguard: 'gold', + amneziawg: 'yellow', http: 'purple', mixed: 'lime', tunnel: 'orange', diff --git a/frontend/src/pages/inbounds/list/types.ts b/frontend/src/pages/inbounds/list/types.ts index b623e8b22..1ca44c370 100644 --- a/frontend/src/pages/inbounds/list/types.ts +++ b/frontend/src/pages/inbounds/list/types.ts @@ -15,6 +15,7 @@ export type ProtocolFlags = { isMixed?: boolean; isHTTP?: boolean; isWireguard?: boolean; + isAmneziawg?: boolean; isTunnel?: boolean; }; diff --git a/frontend/src/pages/inbounds/list/useInboundColumns.tsx b/frontend/src/pages/inbounds/list/useInboundColumns.tsx index 43fd3b94f..ddbc47f80 100644 --- a/frontend/src/pages/inbounds/list/useInboundColumns.tsx +++ b/frontend/src/pages/inbounds/list/useInboundColumns.tsx @@ -199,7 +199,7 @@ export function useInboundColumns({ sorter: (a, b) => compareText(a.protocol, b.protocol), render: (_, record) => { const tags: ReactElement[] = [{record.protocol}]; - if (record.isWireguard || record.isHysteria) { + if (record.isWireguard || record.isAmneziawg || record.isHysteria) { tags.push(UDP); } else if (record.isSS) { const stream = readStreamHints(record.streamSettings);