fix(network): make non-VPN network selection robust + show failure reason

This commit is contained in:
klockky
2026-05-16 09:16:52 +03:00
parent cb7163d2ac
commit 5b3af0541f
3 changed files with 61 additions and 25 deletions
+6
View File
@@ -96,6 +96,12 @@ class VpnBypassService {
reason: 'no_plugin',
);
}
if (result.bound) {
logger.i('VPN bypass: привязано к ${result.boundInterface} '
'(${result.transport})');
} else {
logger.w('VPN bypass: обойти не удалось (${result.reason})');
}
_eventController.add(result);
return result;
}
+2 -1
View File
@@ -161,7 +161,8 @@ class KometAppState extends State<KometApp> {
final msg = r.bound
? 'Соединение через VPN не работает — '
'используется ${r.boundInterface ?? r.transport ?? 'прямое подключение'}'
: 'Соединение через VPN не работает, обойти не удалось';
: 'Соединение через VPN не работает, обойти не удалось'
'${r.reason != null ? ' (${r.reason})' : ''}';
final now = DateTime.now();
if (msg == _lastVpnNotice &&