Explorar o código

Add ws-headers check

gosip443 %!s(int64=4) %!d(string=hai) anos
pai
achega
be5d4c6590
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      app/Components/Client/Clash.php

+ 3 - 1
app/Components/Client/Clash.php

@@ -63,7 +63,9 @@ class Clash
 
         if ($server['v2_net'] === 'ws') {
             $array['ws-path'] = $server['v2_path'];
-            $array['ws-headers'] = ['Host' => $server['v2_host']];
+            if ($server['v2_host']) {
+                $array['ws-headers'] = ['Host' => $server['v2_host']];
+            }
         }
 
         return $array;