From 60ed240e6697e09171a4c047e6441e331309d0ce Mon Sep 17 00:00:00 2001 From: Yusum <47137031+yushum@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:16:56 +0800 Subject: [PATCH 1/3] Update ClashMeta.php --- app/Protocols/ClashMeta.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Protocols/ClashMeta.php b/app/Protocols/ClashMeta.php index aff8982..845e052 100644 --- a/app/Protocols/ClashMeta.php +++ b/app/Protocols/ClashMeta.php @@ -194,8 +194,6 @@ class ClashMeta $array['server'] = $server['host']; $array['port'] = $server['port']; $array['uuid'] = $password; - $array['alterId'] = 0; - $array['cipher'] = 'auto'; $array['udp'] = true; // XTLS流控算法 @@ -242,10 +240,8 @@ class ClashMeta $array['ws-opts']['path'] = $wsSettings['path']; if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host'])) $array['ws-opts']['headers'] = ['Host' => $wsSettings['headers']['Host']]; - if (isset($wsSettings['path']) && !empty($wsSettings['path'])) - $array['ws-path'] = $wsSettings['path']; - if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host'])) - $array['ws-headers'] = ['Host' => $wsSettings['headers']['Host']]; + $array['ws-opts']['max-early-data'] = 2560; + $array['ws-opts']['early-data-header-name'] = 'Sec-WebSocket-Protocol'; } } if ($server['network'] === 'grpc') { From ab34ef327a788b2877a28e326299cc85d76ba3a3 Mon Sep 17 00:00:00 2001 From: Yusum <47137031+yushum@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:21:36 +0800 Subject: [PATCH 2/3] Update SingBox.php --- app/Protocols/SingBox.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Protocols/SingBox.php b/app/Protocols/SingBox.php index a0e1e18..5fd19c0 100644 --- a/app/Protocols/SingBox.php +++ b/app/Protocols/SingBox.php @@ -148,7 +148,7 @@ class SingBox $array['transport']['path'] = $wsSettings['path']; if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host'])) $array['transport']['headers'] = ['Host' => array($wsSettings['headers']['Host'])]; - $array['transport']['max_early_data'] = 2048; + $array['transport']['max_early_data'] = 2560; $array['transport']['early_data_header_name'] = 'Sec-WebSocket-Protocol'; } } @@ -216,7 +216,7 @@ class SingBox $array['transport']['path'] = $wsSettings['path']; if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host'])) $array['transport']['headers'] = ['Host' => array($wsSettings['headers']['Host'])]; - $array['transport']['max_early_data'] = 2048; + $array['transport']['max_early_data'] = 2560; $array['transport']['early_data_header_name'] = 'Sec-WebSocket-Protocol'; } } @@ -271,7 +271,7 @@ class SingBox if (isset($server['network_settings']['headers']['Host'])) { $array['transport']['headers'] = ['Host' => array($server['network_settings']['headers']['Host'])]; } - $array['transport']['max_early_data'] = 2048; + $array['transport']['max_early_data'] = 2560; $array['transport']['early_data_header_name'] = 'Sec-WebSocket-Protocol'; } } @@ -318,4 +318,4 @@ class SingBox return $array; } -} \ No newline at end of file +} From 42542725f7be8a130b820c90b9c094c1b6a20af4 Mon Sep 17 00:00:00 2001 From: Yusum <47137031+yushum@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:56:49 +0800 Subject: [PATCH 3/3] Update Shadowrocket.php --- app/Protocols/Shadowrocket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Protocols/Shadowrocket.php b/app/Protocols/Shadowrocket.php index c4cc8db..345783e 100644 --- a/app/Protocols/Shadowrocket.php +++ b/app/Protocols/Shadowrocket.php @@ -190,7 +190,7 @@ class Shadowrocket if ($server['network_settings']) { $wsSettings = $server['network_settings']; if (isset($wsSettings['path']) && !empty($wsSettings['path'])) - $config['path'] = $wsSettings['path']; + $config['path'] = $wsSettings['path'] . '?ed=2560'; if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host'])) $config['obfsParam'] = $wsSettings['headers']['Host']; }