diff --git a/app/Client/Client.php b/app/Client/Client.php index 913e186..8eaaa47 100644 --- a/app/Client/Client.php +++ b/app/Client/Client.php @@ -77,9 +77,11 @@ class Client $deferred = new Deferred(); $promise = $deferred->promise(); + $exposeVersion = config('app.version'); + $wsProtocol = $this->configuration->port() === 443 ? 'wss' : 'ws'; - connect($wsProtocol."://{$this->configuration->host()}:{$this->configuration->port()}/expose/control?authToken={$authToken}", [], [ + connect($wsProtocol."://{$this->configuration->host()}:{$this->configuration->port()}/expose/control?authToken={$authToken}&version={$exposeVersion}", [], [ 'X-Expose-Control' => 'enabled', ], $this->loop) ->then(function (WebSocket $clientConnection) use ($sharedUrl, $subdomain, $serverHost, $deferred, $authToken) { diff --git a/app/Server/Connections/ControlConnection.php b/app/Server/Connections/ControlConnection.php index a85fa59..5bacc8b 100644 --- a/app/Server/Connections/ControlConnection.php +++ b/app/Server/Connections/ControlConnection.php @@ -2,6 +2,7 @@ namespace App\Server\Connections; +use App\Http\QueryParameters; use Evenement\EventEmitterTrait; use Ratchet\ConnectionInterface; @@ -16,6 +17,7 @@ class ControlConnection public $authToken; public $subdomain; public $client_id; + public $client_version; public $proxies = []; protected $shared_at; @@ -28,6 +30,7 @@ class ControlConnection $this->authToken = $authToken; $this->serverHost = $serverHost; $this->shared_at = now()->toDateTimeString(); + $this->client_version = QueryParameters::create($socket->httpRequest)->get('version'); } public function setMaximumConnectionLength(int $maximumConnectionLength) @@ -65,6 +68,7 @@ class ControlConnection 'host' => $this->host, 'server_host' => $this->serverHost, 'client_id' => $this->client_id, + 'client_version' => $this->client_version, 'auth_token' => $this->authToken, 'subdomain' => $this->subdomain, 'shared_at' => $this->shared_at, diff --git a/config/expose.php b/config/expose.php index 303438a..0014b81 100644 --- a/config/expose.php +++ b/config/expose.php @@ -32,7 +32,7 @@ return [ | if available. | */ - 'server_endpoint' => 'https://beyondco.de/api/expose/servers', + 'server_endpoint' => 'https://expose.beyondco.de/api/expose/servers', /* |--------------------------------------------------------------------------