This commit is contained in:
Andras Bacsai 2023-07-11 11:51:06 +02:00
parent 4c88944286
commit 3cc1731c12

View File

@ -31,18 +31,6 @@ public function switchProxy()
$this->server->proxy->type = null; $this->server->proxy->type = null;
$this->server->save(); $this->server->save();
} }
public function installProxy()
{
if (
$this->server->proxy->last_applied_settings &&
$this->server->proxy->last_saved_settings !== $this->server->proxy->last_applied_settings
) {
$this->saveConfiguration($this->server);
}
$activity = resolve(InstallProxy::class)($this->server);
$this->emit('newMonitorActivity', $activity->id);
}
public function setProxy(string $proxy_type) public function setProxy(string $proxy_type)
{ {
$this->server->proxy->type = $proxy_type; $this->server->proxy->type = $proxy_type;
@ -56,6 +44,7 @@ public function stopProxy()
], $this->server); ], $this->server);
$this->server->proxy->status = 'exited'; $this->server->proxy->status = 'exited';
$this->server->save(); $this->server->save();
$this->server->refresh();
} }
public function saveConfiguration() public function saveConfiguration()
{ {