mirror of
https://github.com/v2board/v2board.git
synced 2024-11-13 11:09:11 +08:00
update trojan
This commit is contained in:
parent
ee762fe69a
commit
4c73d55342
@ -29,13 +29,13 @@ class Surge
|
|||||||
|
|
||||||
public static function buildTrojan($password, $server)
|
public static function buildTrojan($password, $server)
|
||||||
{
|
{
|
||||||
$allowInsecure = $server->allow_insecure ? true : false;
|
$skipCertVerify = (string)($server->allow_insecure ? true : false);
|
||||||
$config = [
|
$config = [
|
||||||
"{$server->name}=trojan",
|
"{$server->name}=trojan",
|
||||||
"{$server->host}",
|
"{$server->host}",
|
||||||
"{$server->port}",
|
"{$server->port}",
|
||||||
"password={$password}",
|
"password={$password}",
|
||||||
"skip-cert-verify={$allowInsecure}",
|
"skip-cert-verify={$skipCertVerify}",
|
||||||
$server->server_name ? "sni={$server->server_name}" : "",
|
$server->server_name ? "sni={$server->server_name}" : "",
|
||||||
"tfo=true"
|
"tfo=true"
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user