Skip to content

Commit

Permalink
RouterOS: update get_peers() method, add endpoint port
Browse files Browse the repository at this point in the history
  • Loading branch information
subs1stem committed Sep 29, 2024
1 parent dfee958 commit 4720c2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wireguard/routeros.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ def get_peers(self) -> dict:

return {
peer['name']: {
'endpoint': peer.get('current-endpoint-address'),
'endpoint': f'{peer.get('current-endpoint-address')}:{peer.get('current-endpoint-port')}',
'allowed ips': peer.get('allowed-address'),
'latest handshake': peer.get('last-handshake'),
'transfer': f"{peer.get('rx')}, {peer.get('tx')}"
'transfer': f'{peer.get('rx')} , {peer.get('tx')}',
}
for peer in raw_peers
}
Expand Down

0 comments on commit 4720c2e

Please sign in to comment.