24 lines
662 B
PHP
24 lines
662 B
PHP
<?php
|
|
|
|
namespace App\Services\Wireguard;
|
|
|
|
/**
|
|
* The CluPilot VM's WireGuard hub. Onboarding allocates a management IP and
|
|
* registers the new host as a peer so its Proxmox API is reachable over the tunnel.
|
|
*/
|
|
interface WireguardHub
|
|
{
|
|
/** Allocate a free management IP from the hub subnet. */
|
|
public function allocateIp(): string;
|
|
|
|
public function addPeer(string $publicKey, string $ip): void;
|
|
|
|
public function removePeer(string $publicKey): void;
|
|
|
|
/** Public endpoint (host:port) peers dial to reach the hub. */
|
|
public function endpoint(): string;
|
|
|
|
/** The hub's WireGuard public key. */
|
|
public function publicKey(): string;
|
|
}
|