vpn: dump transfer counters on 'vpn up' handshake timeout too
This commit is contained in:
@@ -94,9 +94,14 @@ def cmd_vpn(args: argparse.Namespace) -> int:
|
|||||||
vpn.up(cfg)
|
vpn.up(cfg)
|
||||||
print("tunnel up")
|
print("tunnel up")
|
||||||
if not vpn.wait_for_handshake(cfg):
|
if not vpn.wait_for_handshake(cfg):
|
||||||
|
logging.error("no handshake — tunnel state:\n%s", vpn._diagnose(cfg))
|
||||||
|
vpn.down(cfg)
|
||||||
logging.error(
|
logging.error(
|
||||||
"tunnel is up but no WireGuard handshake was established — "
|
"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
|
return 1
|
||||||
print("handshake established")
|
print("handshake established")
|
||||||
|
|||||||
Reference in New Issue
Block a user