Add external session management and support for remote servers

This commit is contained in:
netkas 2025-01-10 14:58:24 -05:00
parent da3fe9c5a7
commit fde3ccfc68
7 changed files with 272 additions and 47 deletions

View file

@ -11,6 +11,7 @@
{
private string $peerAddress;
private string $rpcEndpoint;
private string $remoteServer;
private string $sessionUUID;
private string $transportEncryptionAlgorithm;
private int $serverKeypairExpires;
@ -41,6 +42,7 @@
{
$this->peerAddress = $data['peer_address'];
$this->rpcEndpoint = $data['rpc_endpoint'];
$this->remoteServer = $data['remote_server'];
$this->sessionUUID = $data['session_uuid'];
$this->transportEncryptionAlgorithm = $data['transport_encryption_algorithm'];
$this->serverKeypairExpires = $data['server_keypair_expires'];
@ -75,6 +77,16 @@
return $this->rpcEndpoint;
}
/**
* Retrieves the remote server.
*
* @return string The remote server.
*/
public function getRemoteServer(): string
{
return $this->remoteServer;
}
/**
* Retrieves the session UUID associated with the current instance.
*
@ -203,6 +215,7 @@
return [
'peer_address' => $this->peerAddress,
'rpc_endpoint' => $this->rpcEndpoint,
'remote_server' => $this->remoteServer,
'session_uuid' => $this->sessionUUID,
'transport_encryption_algorithm' => $this->transportEncryptionAlgorithm,
'server_keypair_expires' => $this->serverKeypairExpires,