2024-03-12 10:22:02 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Listeners;
|
|
|
|
|
|
|
|
use App\Events\ProxyStarted;
|
|
|
|
use App\Models\Server;
|
|
|
|
|
|
|
|
class ProxyStartedNotification
|
|
|
|
{
|
|
|
|
public Server $server;
|
2024-06-10 20:43:34 +00:00
|
|
|
|
2024-06-19 06:59:46 +00:00
|
|
|
public function __construct() {}
|
2024-03-12 10:22:02 +00:00
|
|
|
|
|
|
|
public function handle(ProxyStarted $event): void
|
|
|
|
{
|
2024-03-12 11:30:40 +00:00
|
|
|
$this->server = data_get($event, 'data');
|
2024-03-12 10:22:02 +00:00
|
|
|
$this->server->setupDefault404Redirect();
|
|
|
|
$this->server->setupDynamicProxyConfiguration();
|
2024-05-22 18:42:08 +00:00
|
|
|
$this->server->proxy->force_stop = false;
|
|
|
|
$this->server->save();
|
2024-03-12 10:22:02 +00:00
|
|
|
}
|
|
|
|
}
|