diff --git a/client/ui/frontend/src/modules/settings/SettingsNetwork.tsx b/client/ui/frontend/src/modules/settings/SettingsNetwork.tsx index 79bb09837..9eef37dc8 100644 --- a/client/ui/frontend/src/modules/settings/SettingsNetwork.tsx +++ b/client/ui/frontend/src/modules/settings/SettingsNetwork.tsx @@ -45,6 +45,12 @@ export function SettingsNetwork() { label={"Enable Server Routes"} helpText={"Advertise this host's local routes to other peers."} /> + setField("disableIpv6", !v)} + label={"Enable IPv6"} + helpText={"Use IPv6 addressing for the NetBird overlay network."} + /> ); diff --git a/client/ui/frontend/src/screens/Networks.tsx b/client/ui/frontend/src/screens/Networks.tsx index 5fa7a31cc..7e82d71a6 100644 --- a/client/ui/frontend/src/screens/Networks.tsx +++ b/client/ui/frontend/src/screens/Networks.tsx @@ -55,7 +55,7 @@ export default function Networks() { const overlapping = useMemo(() => filterOverlapping(routes), [routes]); const exitNodes = useMemo( - () => routes.filter((r) => r.range === "0.0.0.0/0" || r.range === "::/0"), + () => routes.filter((r) => isDefaultRoute(r.range)), [routes], ); @@ -146,6 +146,15 @@ function NetworkList({ ); } +// range is the merged display string from the daemon, e.g. "0.0.0.0/0", +// "::/0", or "0.0.0.0/0, ::/0" when a v4 exit node has a paired v6 entry. +function isDefaultRoute(range: string): boolean { + return range.split(",").some((part) => { + const trimmed = part.trim(); + return trimmed === "0.0.0.0/0" || trimmed === "::/0"; + }); +} + function filterOverlapping(routes: Network[]): Network[] { const byRange = new Map(); for (const r of routes) {