add: added "sni" field for Trojan Link

This commit is contained in:
QxQ 2020-08-13 19:30:07 +08:00 committed by GitHub
parent c94ecf1acd
commit 8f9e708e7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,8 @@ class Helper
$server->name = rawurlencode($server->name); $server->name = rawurlencode($server->name);
$query = http_build_query([ $query = http_build_query([
'allowInsecure' => $server->allow_insecure, 'allowInsecure' => $server->allow_insecure,
'peer' => $server->server_name 'peer' => $server->server_name,
'sni' => $server->server_name
]); ]);
$uri = "trojan://{$user->uuid}@{$server->host}:{$server->port}?{$query}#{$server->name}"; $uri = "trojan://{$user->uuid}@{$server->host}:{$server->port}?{$query}#{$server->name}";
$uri .= "\r\n"; $uri .= "\r\n";