Add server connection validation in CheckProxy.php

This commit is contained in:
Andras Bacsai 2024-04-09 08:45:37 +02:00
parent 1ef85242ec
commit a6cbabfba5

View File

@ -13,6 +13,9 @@ public function handle(Server $server, $fromUI = false)
if ($server->proxyType() === 'NONE') { if ($server->proxyType() === 'NONE') {
return false; return false;
} }
if (!$server->validateConnection()) {
throw new \Exception("Server Connection Error");
}
if (!$server->isProxyShouldRun()) { if (!$server->isProxyShouldRun()) {
if ($fromUI) { if ($fromUI) {
throw new \Exception("Proxy should not run. You selected the Custom Proxy."); throw new \Exception("Proxy should not run. You selected the Custom Proxy.");