Peer¶
- class pywireguard.base.peer.Peer(public_key: bytes, preshared_key: Optional[bytes] = None, endpoint: Optional[str] = None, allowed_ips: Optional[List[str]] = None, persistent_keepalive_interval: Optional[int] = None, rx_bytes: Optional[int] = None, tx_bytes: Optional[int] = None, last_handshake_time_sec: Optional[int] = None, last_handshake_time_nsec: Optional[int] = None)¶
Class representing peer information.
- public_key¶
The base64 representation of a WireGuard public key for this peer. (read-only)
- Type
bytes
The base64 representation of a WireGuard preshared key for this peer.
- Type
bytes
- endpoint¶
An endpoint IP followed by a colon, and then a port number.
- Type
str
- allowed_ips¶
The list of peer allowed IPs.
- Type
List[str]
- persistent_keepalive_interval¶
The value for this is a integer corresponding to the persistent keepalive interval of the peer. The value 0 disables it.
- Type
int
- rx_bytes¶
The number of received bytes for the peer. (read-only)
- Type
int
- tx_bytes¶
The number of transmitted bytes for the peer. (read-only)
- Type
int
- last_handshake_time_sec¶
The number of seconds of the most recent handshake for the peer. (read-only)
- Type
int
- last_handshake_time_nsec¶
The number of nano-seconds of the most recent handshake for the peer. (read-only)
- Type
int