瀏覽代碼

update trojan

Tokumeikoi 4 年之前
父節點
當前提交
4c73d55342
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Utils/Surge.php

+ 2 - 2
app/Utils/Surge.php

@@ -29,13 +29,13 @@ class Surge
 
     public static function buildTrojan($password, $server)
     {
-        $allowInsecure = $server->allow_insecure ? true : false;
+        $skipCertVerify = (string)($server->allow_insecure ? true : false);
         $config = [
             "{$server->name}=trojan",
             "{$server->host}",
             "{$server->port}",
             "password={$password}",
-            "skip-cert-verify={$allowInsecure}",
+            "skip-cert-verify={$skipCertVerify}",
             $server->server_name ? "sni={$server->server_name}" : "",
             "tfo=true"
         ];