diff --git a/AppImage/components/security.tsx b/AppImage/components/security.tsx index dcb2a7a2..318b4823 100644 --- a/AppImage/components/security.tsx +++ b/AppImage/components/security.tsx @@ -96,6 +96,7 @@ export function Security() { dport: "", sport: "", source: "", iface: "", comment: "", level: "host", }) const [savingRule, setSavingRule] = useState(false) + const [networkInterfaces, setNetworkInterfaces] = useState<{name: string, type: string, status: string}[]>([]) // Security Tools state const [toolsLoading, setToolsLoading] = useState(true) @@ -217,6 +218,21 @@ export function Security() { } } + const loadNetworkInterfaces = async () => { + try { + const data = await fetchApi("/api/network") + if (data.interfaces) { + // Get physical + bridge + bond interfaces (exclude vm_lxc virtual taps) + const relevant = data.interfaces + .filter((i: any) => ["physical", "bridge", "bond", "vlan"].includes(i.type)) + .sort((a: any, b: any) => a.name.localeCompare(b.name)) + setNetworkInterfaces(relevant) + } + } catch { + // Silently fail - user can still type manually if needed + } + } + const loadSecurityTools = async () => { try { setToolsLoading(true)