cli: improve readability of `status` output

This commit is contained in:
Shiz 2022-02-01 12:51:25 +01:00
parent 2015861dd8
commit f40b62c19b
1 changed files with 2 additions and 1 deletions

View File

@ -98,7 +98,8 @@ def main():
last_handshake = timestampify(handshake) if handshake else 'never'
endpoint = wg_peer.last_endpoint()
last_endpoint = f'{endpoint[0]}:{endpoint[1]}' if endpoint else ''
print(f' {peer.name} ({wg_peer.name}): last handshake {last_handshake}{f" from {last_endpoint}" if last_endpoint else ""}, {tx} sent, {rx} received')
print(f' {peer.name} ({peer.interface.address}, {wg_peer.name})')
print(f' last handshake {last_handshake}{f" from {last_endpoint}" if last_endpoint else ""}, {tx} sent, {rx} received')
for wg_peer in wg_peers.values():
print(f' ({wg_peer.name}): found but not expected')
success = False