update trojan

This commit is contained in:
Tokumeikoi
2020-07-01 15:23:39 +08:00
parent 37449b6640
commit 75588d46f1
8 changed files with 40 additions and 16 deletions

View File

@ -33,7 +33,8 @@ class QuantumultX
public static function buildTrojan($password, $server)
{
$uri = "trojan={$server->host}:{$server->port}, password={$password}, over-tls=true, tls-verification=true, fast-open=false, udp-relay=false, tag={$server->name}";
$tlsVerification = $server->allow_insecure ? true : false;
$uri = "trojan={$server->host}:{$server->port}, password={$password}, over-tls=true, tls-host={$server->server_name}, tls-verification={$tlsVerification}, fast-open=false, udp-relay=false, tag={$server->name}";
$uri .= "\r\n";
return $uri;
}