Merge pull request #290 from betaxab/p1

Fixes Quantumult X tls-verification
This commit is contained in:
tokumeikoi 2020-07-29 20:16:30 +08:00 committed by GitHub
commit 855e3c1c26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,8 @@ class QuantumultX
$tlsSettings = json_decode($server->tlsSettings);
array_push($config, 'obfs=over-tls');
if (isset($tlsSettings->allowInsecure)) {
array_push($config, $server->allow_insecure ? 'tls-verification=true' : 'tls-verification=false');
// Tips: allowInsecure=false = tls-verification=true
array_push($config, $tlsSettings->allowInsecure ? 'tls-verification=false' : 'tls-verification=true');
}
if (isset($tlsSettings->serverName)) {
array_push($config, "obfs-host={$tlsSettings->serverName}");
@ -31,7 +32,7 @@ class QuantumultX
$tlsSettings = json_decode($server->tlsSettings);
array_push($config, 'obfs=wss');
if (isset($tlsSettings->allowInsecure)) {
array_push($config, $server->allow_insecure ? 'tls-verification=true' : 'tls-verification=false');
array_push($config, $tlsSettings->allowInsecure ? 'tls-verification=false' : 'tls-verification=true');
}
} else {
array_push($config, 'obfs=ws');
@ -55,7 +56,8 @@ class QuantumultX
"password={$password}",
"over-tls=true",
$server->server_name ? "tls-host={$server->server_name}" : "",
$server->allow_insecure ? 'tls-verification=true' : 'tls-verification=false',
// Tips: allowInsecure=false = tls-verification=true
$server->allow_insecure ? 'tls-verification=false' : 'tls-verification=true',
"fast-open=false",
"udp-relay=false",
"tag={$server->name}"