mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update trojan
This commit is contained in:
parent
2d67446ce3
commit
4c457d183f
@ -42,7 +42,11 @@ class Clash
|
|||||||
$array['port'] = $server->port;
|
$array['port'] = $server->port;
|
||||||
$array['password'] = $password;
|
$array['password'] = $password;
|
||||||
$array['sni'] = $server->server_name;
|
$array['sni'] = $server->server_name;
|
||||||
$array['skip-cert-verify'] = (string)($server->allow_insecure ? true : false);
|
if ($server->allow_insecure) {
|
||||||
|
$array['skip-cert-verify'] = true;
|
||||||
|
} else {
|
||||||
|
$array['skip-cert-verify'] = false;
|
||||||
|
}
|
||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,13 +33,12 @@ class QuantumultX
|
|||||||
|
|
||||||
public static function buildTrojan($password, $server)
|
public static function buildTrojan($password, $server)
|
||||||
{
|
{
|
||||||
$tlsVerification = (string)($server->allow_insecure ? true : false);
|
|
||||||
$config = [
|
$config = [
|
||||||
"trojan={$server->host}:{$server->port}",
|
"trojan={$server->host}:{$server->port}",
|
||||||
"password={$password}",
|
"password={$password}",
|
||||||
"over-tls=true",
|
"over-tls=true",
|
||||||
$server->server_name ? "tls-host={$server->server_name}" : "",
|
$server->server_name ? "tls-host={$server->server_name}" : "",
|
||||||
"tls-verification={$tlsVerification}",
|
$server->allow_insecure ? 'tls-verification=true' : 'tls-verification=false',
|
||||||
"fast-open=false",
|
"fast-open=false",
|
||||||
"udp-relay=false",
|
"udp-relay=false",
|
||||||
"tag={$server->name}"
|
"tag={$server->name}"
|
||||||
|
@ -29,13 +29,12 @@ class Surge
|
|||||||
|
|
||||||
public static function buildTrojan($password, $server)
|
public static function buildTrojan($password, $server)
|
||||||
{
|
{
|
||||||
$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={$skipCertVerify}",
|
$server->allow_insecure ? 'skip-cert-verify=true' : 'skip-cert-verify=false',
|
||||||
$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