fix: resolve Trojan subscription delivery issues in Loon and Shadowrocket

This commit is contained in:
xboard 2025-01-20 02:37:53 +08:00
parent 96df9305b6
commit c3135d5ba9
2 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ class Loon implements ProtocolInterface
'udp=true'
];
if (!empty($protocol_settings['allow_insecure'])) {
array_push($config, data_get($protocol_settings, 'tls_settings')['allow_insecure'] ? 'skip-cert-verify=true' : 'skip-cert-verify=false');
array_push($config, data_get($protocol_settings, 'allow_insecure') ? 'skip-cert-verify=true' : 'skip-cert-verify=false');
}
$config = array_filter($config);
$uri = implode(',', $config);

View File

@ -197,8 +197,8 @@ class Shadowrocket implements ProtocolInterface
{
$protocol_settings = $server['protocol_settings'];
$name = rawurlencode($server['name']);
$params['allowInsecure'] = data_get($protocol_settings, 'tls.allow_insecure');
if ($serverName = data_get($protocol_settings, 'tls.server_name')) {
$params['allowInsecure'] = data_get($protocol_settings, 'allow_insecure');
if ($serverName = data_get($protocol_settings, 'server_name')) {
$params['peer'] = $serverName;
}
switch (data_get($protocol_settings, 'network')) {