fix: save proxy configuration
This commit is contained in:
parent
b4d69a22df
commit
301469de6b
@ -10,9 +10,11 @@ class SaveConfiguration
|
|||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
public function handle(Server $server)
|
public function handle(Server $server, ?string $proxy_settings = null)
|
||||||
{
|
{
|
||||||
|
if (is_null($proxy_settings)) {
|
||||||
$proxy_settings = CheckConfiguration::run($server, true);
|
$proxy_settings = CheckConfiguration::run($server, true);
|
||||||
|
}
|
||||||
$proxy_path = get_proxy_path();
|
$proxy_path = get_proxy_path();
|
||||||
$docker_compose_yml_base64 = base64_encode($proxy_settings);
|
$docker_compose_yml_base64 = base64_encode($proxy_settings);
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public function select_proxy($proxy_type)
|
|||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
SaveConfiguration::run($this->server);
|
SaveConfiguration::run($this->server, $this->proxy_settings);
|
||||||
$this->server->proxy->redirect_url = $this->redirect_url;
|
$this->server->proxy->redirect_url = $this->redirect_url;
|
||||||
$this->server->save();
|
$this->server->save();
|
||||||
|
|
||||||
|
@ -20,13 +20,6 @@ public function proxyStatusUpdated()
|
|||||||
public function startProxy()
|
public function startProxy()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (
|
|
||||||
$this->server->proxy->last_applied_settings &&
|
|
||||||
$this->server->proxy->last_saved_settings !== $this->server->proxy->last_applied_settings
|
|
||||||
) {
|
|
||||||
SaveConfiguration::run($this->server);
|
|
||||||
}
|
|
||||||
|
|
||||||
$activity = StartProxy::run($this->server);
|
$activity = StartProxy::run($this->server);
|
||||||
$this->emit('newMonitorActivity', $activity->id);
|
$this->emit('newMonitorActivity', $activity->id);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user