vpn: dump transfer counters on 'vpn up' handshake timeout too

This commit is contained in:
Konstantin Passig PC
2026-08-25 18:06:12 +02:00
parent 61d2425ed6
commit 567e20027a
+6 -1
View File
@@ -94,9 +94,14 @@ def cmd_vpn(args: argparse.Namespace) -> int:
vpn.up(cfg)
print("tunnel up")
if not vpn.wait_for_handshake(cfg):
logging.error("no handshake — tunnel state:\n%s", vpn._diagnose(cfg))
vpn.down(cfg)
logging.error(
"tunnel is up but no WireGuard handshake was established — "
"downloads will be refused until the tunnel is active"
"if 'transfer' shows sent but 0 received, the endpoint "
"146.70.117.130:51820 is unreachable (try a different "
"Mullvad server); if 0 sent, the namespace has no route out. "
"Downloads will be refused until the tunnel is active."
)
return 1
print("handshake established")