Skip to content
API Documentation
BastionGuard™
BastionGuard::WgTunnelSpec Struct Reference

#include <WireguardBackend.hpp>

Public Member Functions

bool valid () const

Public Attributes

std::string private_key
std::vector< std::string > addresses
std::vector< std::string > dns
std::string listen_port
int mtu = 0
std::vector< WgPeer > peers

Detailed Description

Definition at line 34 of file WireguardBackend.hpp.

Member Function Documentation

◆ valid()

bool BastionGuard::WgTunnelSpec::valid ( ) const
inline

Definition at line 45 of file WireguardBackend.hpp.

45 {
46 return !private_key.empty() && !addresses.empty() && !peers.empty()
47 && !peers[0].public_key.empty() && !peers[0].endpoint.empty();
48 }
std::vector< WgPeer > peers
std::vector< std::string > addresses

References addresses, peers, and private_key.

Referenced by BastionGuard::WireguardBackend::has_spec(), and BastionGuard::validate_spec_().

Member Data Documentation

◆ addresses

◆ dns

◆ listen_port

◆ mtu

int BastionGuard::WgTunnelSpec::mtu = 0

◆ peers

◆ private_key


The documentation for this struct was generated from the following file: