start WG network when the machine is initialised via RPC call

This commit is contained in:
Pavel Sviderski
2024-09-10 18:23:55 +10:00
parent 4e2640bbd2
commit 676f22a935
2 changed files with 62 additions and 36 deletions
+1
View File
@@ -35,6 +35,7 @@ type PeerConfig struct {
PublicKey secret.Secret
}
// IsConfigured returns true if the configuration is complete to establish a WireGuard network.
func (c Config) IsConfigured() bool {
return c.Subnet != (netip.Prefix{}) && c.ManagementIP != (netip.Addr{}) &&
c.PrivateKey != nil && c.PublicKey != nil