Skip to content

Commit 9117538

Browse files
bernardopgclaude
andcommitted
release: v1.3.3
Fix false-positive multi-default-route block that prevented TUN connections on startup and after every disconnect on systems with Ethernet + Wi-Fi. Route conflict detection now finds the minimum metric across all default routes and only counts routes at that metric. Higher-metric routes are failover entries and are no longer treated as conflicts. Virtual interfaces (lo, docker*, veth*, br-*, virbr*, dummy*) are also excluded from the count. Adds a bypassMultiRouteCheck toggle (Settings → Advanced) as an explicit escape hatch for setups that still produce false positives. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fd52148 commit 9117538

7 files changed

Lines changed: 66 additions & 6 deletions

File tree

AdGuardVpnService.qml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ Item {
2121
autoRefreshLocations: true,
2222
autoConnectOnStartup: false,
2323
autoReconnectOnDrop: false,
24-
favoriteLocationIsos: []
24+
favoriteLocationIsos: [],
25+
bypassMultiRouteCheck: false
2526
})
2627

2728
property string adguardBinary: defaults.adguardBinary
@@ -34,6 +35,7 @@ Item {
3435
property bool autoConnectOnStartup: defaults.autoConnectOnStartup
3536
property bool autoReconnectOnDrop: defaults.autoReconnectOnDrop
3637
property var favoriteLocationIsos: defaults.favoriteLocationIsos
38+
property bool bypassMultiRouteCheck: defaults.bypassMultiRouteCheck
3739
property bool startupAutoConnectAttempted: false
3840
property bool suppressReconnectOnce: false
3941

@@ -159,6 +161,7 @@ Item {
159161
autoConnectOnStartup = asBool(load("autoConnectOnStartup", defaults.autoConnectOnStartup), defaults.autoConnectOnStartup);
160162
autoReconnectOnDrop = asBool(load("autoReconnectOnDrop", defaults.autoReconnectOnDrop), defaults.autoReconnectOnDrop);
161163
favoriteLocationIsos = normalizeFavoriteLocationIsos(load("favoriteLocationIsos", defaults.favoriteLocationIsos));
164+
bypassMultiRouteCheck = asBool(load("bypassMultiRouteCheck", defaults.bypassMultiRouteCheck), defaults.bypassMultiRouteCheck);
162165

163166
restartTimers();
164167
checkCliAvailability();
@@ -796,8 +799,10 @@ Item {
796799
;;
797800
esac
798801
799-
if [ "${tunPreflightRequired ? "1" : "0"}" = "1" ] && command -v ip >/dev/null 2>&1; then
800-
DEFAULT_ROUTE_COUNT="$(ip -o route show to default | wc -l | tr -d ' ')"
802+
if [ "${tunPreflightRequired ? "1" : "0"}" = "1" ] && [ "${bypassMultiRouteCheck ? "1" : "0"}" = "0" ] && command -v ip >/dev/null 2>&1; then
803+
_ROUTES="$(ip -o route show to default)"
804+
_MIN_MET="$(printf '%s\n' "$_ROUTES" | awk '{m="0"; for(i=1;i<=NF;i++){if($i=="metric"){m=$(i+1);break}}; print m+0}' | sort -n | head -1)"
805+
DEFAULT_ROUTE_COUNT="$(printf '%s\n' "$_ROUTES" | awk -v minm="$_MIN_MET" '{iface=""; m="0"; for(i=1;i<=NF;i++){if($i=="dev") iface=$(i+1); if($i=="metric") m=$(i+1)}; if(iface~/^(lo$|docker|veth|br-|virbr|dummy)/) next; if(m+0==minm+0) print}' | wc -l | tr -d ' ')"
801806
if [ "\${DEFAULT_ROUTE_COUNT:-0}" -gt 1 ]; then
802807
printf 'multi-default'
803808
exit 44

AdGuardVpnSettings.qml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,4 +317,19 @@ PluginSettings {
317317
description: root.t("settings.auto_reconnect_drop.description", "Automatically reconnect when the tunnel drops unexpectedly.")
318318
defaultValue: false
319319
}
320+
321+
StyledText {
322+
width: parent.width
323+
text: root.t("settings.group.advanced", "Advanced")
324+
font.pixelSize: Theme.fontSizeSmall
325+
font.weight: Font.DemiBold
326+
color: Theme.surfaceVariantText
327+
}
328+
329+
ToggleSetting {
330+
settingKey: "bypassMultiRouteCheck"
331+
label: root.t("settings.bypass_multi_route.label", "Bypass Multi-Route Check")
332+
description: root.t("settings.bypass_multi_route.description", "Skip the pre-connection check for multiple default routes. Enable if TUN connections are blocked by a false positive on startup or after disconnect.")
333+
defaultValue: false
334+
}
320335
}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [Sem
99

1010
---
1111

12+
## [1.3.3] - 2026-04-22
13+
14+
### Fixed
15+
16+
- Multi-default-route preflight check now only counts routes sharing the minimum metric. Physical interfaces with different metrics (e.g. Ethernet metric 100 + Wi-Fi metric 600) are no longer treated as a routing conflict, eliminating false-positive TUN-connect blocks on startup and after every disconnect.
17+
- Virtual interfaces (`lo`, `docker*`, `veth*`, `br-*`, `virbr*`, `dummy*`) are excluded from the route count to prevent false positives from container runtimes.
18+
19+
### Added
20+
21+
- **Bypass Multi-Route Check** toggle in Settings → Advanced to explicitly skip the preflight route check on setups where it still produces false positives.
22+
23+
> **Full notes ->** [docs/releases/v1.3.3.md](./docs/releases/v1.3.3.md)
24+
25+
---
26+
1227
## [1.3.2] - 2026-04-12
1328

1429
### Changed

docs/releases/v1.3.3.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# AdGuard VPN Plugin v1.3.3
2+
3+
This hotfix release eliminates a persistent false positive that blocked TUN connections on startup and after every disconnect on systems with more than one physical network interface.
4+
5+
## Highlights
6+
7+
- Fixed the multi-default-route preflight check that incorrectly blocked TUN connections when two physical interfaces (e.g. Ethernet + Wi-Fi) each had a default route with different metrics.
8+
- Route conflict detection now only counts routes that share the same minimum metric — higher-metric routes are fallbacks, not conflicts.
9+
- Virtual interfaces (`lo`, `docker*`, `veth*`, `br-*`, `virbr*`, `dummy*`) are excluded from the route count to prevent false positives from container runtimes.
10+
- Added **Bypass Multi-Route Check** toggle (Settings → Advanced) as an explicit escape hatch for setups where the preflight still produces false positives.
11+
12+
## Compatibility
13+
14+
- Requires DankMaterialShell `>= 1.4.0`.
15+
- Requires `adguardvpn-cli` available in PATH (or configured binary path).
16+
17+
## Notes
18+
19+
- Previous release: `v1.3.2`

i18n/en.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,8 @@ var translations = ({
171171
"settings.language.ur_PK": "Urdu",
172172
"settings.language.ms_MY": "Malay",
173173
"settings.unit.sec": "sec",
174-
"settings.unit.items": "items"
174+
"settings.unit.items": "items",
175+
"settings.group.advanced": "Advanced",
176+
"settings.bypass_multi_route.label": "Bypass Multi-Route Check",
177+
"settings.bypass_multi_route.description": "Skip the pre-connection check for multiple default routes. Enable if TUN connections are blocked by a false positive on startup or after disconnect."
175178
});

i18n/pt_BR.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,8 @@ var translations = ({
171171
"settings.language.ur_PK": "Urdu",
172172
"settings.language.ms_MY": "Malaio",
173173
"settings.unit.sec": "seg",
174-
"settings.unit.items": "itens"
174+
"settings.unit.items": "itens",
175+
"settings.group.advanced": "Avançado",
176+
"settings.bypass_multi_route.label": "Ignorar Verificação de Múltiplas Rotas",
177+
"settings.bypass_multi_route.description": "Ignora a verificação de múltiplas rotas padrão antes de conectar. Ative se conexões TUN forem bloqueadas por falso positivo na inicialização ou após desconexão."
175178
});

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "adguardVPplugin",
33
"name": "AdGuard VPN",
44
"description": "Control, configure, and monitor adguardvpn-cli directly from DankBar",
5-
"version": "1.3.2",
5+
"version": "1.3.3",
66
"author": "Bernardo Gomes",
77
"type": "widget",
88
"capabilities": ["vpn", "network", "dankbar-widget"],

0 commit comments

Comments
 (0)