Merge pull request #278 from DesperadoJ/patch-1

Enable UDP in Clash
This commit is contained in:
tokumeikoi 2020-07-21 16:19:45 +08:00 committed by GitHub
commit e096fd064d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@ class Clash
$array['uuid'] = $uuid;
$array['alterId'] = 2;
$array['cipher'] = 'auto';
$array['udp'] = true;
if ($server->tls) {
$tlsSettings = json_decode($server->tlsSettings);
$array['tls'] = true;
@ -42,6 +43,7 @@ class Clash
$array['server'] = $server->host;
$array['port'] = $server->port;
$array['password'] = $password;
$array['udp'] = true;
$array['sni'] = $server->server_name;
if ($server->allow_insecure) {
$array['skip-cert-verify'] = true;