Przeglądaj źródła

Merge pull request #355 from wloot/patch-1

Patch 1
tokumeikoi 4 lat temu
rodzic
commit
b58df71db4
3 zmienionych plików z 4 dodań i 4 usunięć
  1. 2 2
      app/Utils/QuantumultX.php
  2. 1 1
      app/Utils/Surfboard.php
  3. 1 1
      app/Utils/Surge.php

+ 2 - 2
app/Utils/QuantumultX.php

@@ -46,9 +46,9 @@ class QuantumultX
             if ($server['tlsSettings']) {
                 $tlsSettings = json_decode($server['tlsSettings'], true);
                 if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure']))
-                    array_push($config, 'tls-verification=' . $tlsSettings['allowInsecure'] ? 'false' : 'true');
+                    array_push($config, 'tls-verification=' . ($tlsSettings['allowInsecure'] ? 'false' : 'true'));
                 if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
-                    array_push($config, "sni={$tlsSettings['serverName']}");
+                    array_push($config, "tls-host={$tlsSettings['serverName']}");
             }
         }
         if ($server['network'] === 'ws') {

+ 1 - 1
app/Utils/Surfboard.php

@@ -39,7 +39,7 @@ class Surfboard
             if ($server['tlsSettings']) {
                 $tlsSettings = json_decode($server['tlsSettings'], true);
                 if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure']))
-                    array_push($config, 'skip-cert-verify=' . $tlsSettings['allowInsecure'] ? 'true' : 'false');
+                    array_push($config, 'skip-cert-verify=' . ($tlsSettings['allowInsecure'] ? 'true' : 'false'));
                 if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
                     array_push($config, "sni={$tlsSettings['serverName']}");
             }

+ 1 - 1
app/Utils/Surge.php

@@ -38,7 +38,7 @@ class Surge
             if ($server['tlsSettings']) {
                 $tlsSettings = json_decode($server['tlsSettings'], true);
                 if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure']))
-                    array_push($config, 'skip-cert-verify=' . $tlsSettings['allowInsecure'] ? 'true' : 'false');
+                    array_push($config, 'skip-cert-verify=' . ($tlsSettings['allowInsecure'] ? 'true' : 'false'));
                 if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
                     array_push($config, "sni={$tlsSettings['serverName']}");
             }