clash: add tls servername support

Signed-off-by: Beta Soft <betaxab@gmail.com>
This commit is contained in:
Beta Soft 2020-07-18 00:55:24 +08:00
parent e500fb77dc
commit d94b361f2f
No known key found for this signature in database
GPG Key ID: 180A31AB98D5C156

View File

@ -19,6 +19,7 @@ class Clash
$tlsSettings = json_decode($server->tlsSettings);
$array['tls'] = true;
if (isset($tlsSettings->allowInsecure)) $array['skip-cert-verify'] = ($tlsSettings->allowInsecure ? true : false );
if (isset($tlsSettings->serverName)) $array['servername'] = $tlsSettings->serverName;
}
if ($server->network == 'ws') {
$array['network'] = $server->network;