Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckWGExists ¶
func CheckWGExists() bool
CheckWGExists will check if it can find the wg bin on the user path
func GenPrivateKey ¶
func GenPrivateKey() string
GenPrivateKey generate a new private key using the command wg
func GenPublicKey ¶
GenPublicKey generate a new private key using the command wg
func SyncPeerConf ¶
SyncPeerConf will sync the peer configuration file with the interface file
Types ¶
type ClientConfig ¶
type ClientConfig struct { Interface ClientInterface // Client Interface specification Peer ClientPeer // Client Peer specificiation }
ClientConfig is the WireGuard Client Configuration specification
type ClientInterface ¶
type ClientInterface struct { PrivateKey string // Client Private Key Address string // Client Virtual Private IP DNS string // DNS Server }
ClientInterface is the WireGuard Client Interface specification
type ClientPeer ¶
type ClientPeer struct { PublicKey string // Server Public Key Endpoint string // Server Endpoint AllowedIPs string // IP ranges routed to the VPN KeepAlive uint32 // Seconds between each keep alive }
ClientPeer is the WireGuard Client Peer specification
type ServerConfig ¶
type ServerConfig struct { Interface ServerInterface Peers []ServerPeer }
ServerConfig is the WireGuard Server Configuration specification
type ServerInterface ¶
type ServerInterface struct { PrivateKey string PublicKey string Address string SaveConfig bool ListenPort uint32 }
ServerInterface is the WireGuard Server Interface specification
type ServerPeer ¶
ServerPeer is the WireGuard Server Peer specification
Click to show internal directories.
Click to hide internal directories.