From c3135d5ba93f1eb75f4d02d67588689576232b5e Mon Sep 17 00:00:00 2001 From: xboard Date: Mon, 20 Jan 2025 02:37:53 +0800 Subject: [PATCH] fix: resolve Trojan subscription delivery issues in Loon and Shadowrocket --- app/Protocols/Loon.php | 2 +- app/Protocols/Shadowrocket.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Protocols/Loon.php b/app/Protocols/Loon.php index 7e14798..a30478a 100644 --- a/app/Protocols/Loon.php +++ b/app/Protocols/Loon.php @@ -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); diff --git a/app/Protocols/Shadowrocket.php b/app/Protocols/Shadowrocket.php index eeb1e1d..213db7e 100644 --- a/app/Protocols/Shadowrocket.php +++ b/app/Protocols/Shadowrocket.php @@ -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')) {