Browse Source

Add ws-headers check

gosip443 4 years ago
parent
commit
be5d4c6590
1 changed files with 3 additions and 1 deletions
  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;