From 4387f9de1145dcefca01b8cd70a3fabc29179298 Mon Sep 17 00:00:00 2001 From: gua Date: Fri, 17 Nov 2023 16:34:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dvless=E7=9A=84=20ws?= =?UTF-8?q?=E3=80=81grpc=E8=AE=A2=E9=98=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Protocols/ClashMeta.php | 4 ++-- app/Protocols/General.php | 4 ++-- app/Protocols/Passwall.php | 4 ++-- app/Protocols/V2rayN.php | 4 ++-- app/Protocols/V2rayNG.php | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Protocols/ClashMeta.php b/app/Protocols/ClashMeta.php index 13874db..f7fc52f 100644 --- a/app/Protocols/ClashMeta.php +++ b/app/Protocols/ClashMeta.php @@ -217,8 +217,8 @@ class ClashMeta if ($server['network'] === 'ws') { $array['network'] = 'ws'; - if ($server['networkSettings']) { - $wsSettings = $server['networkSettings']; + if ($server['network_settings']) { + $wsSettings = $server['network_settings']; $array['ws-opts'] = []; if (isset($wsSettings['path']) && !empty($wsSettings['path'])) $array['ws-opts']['path'] = $wsSettings['path']; diff --git a/app/Protocols/General.php b/app/Protocols/General.php index 2d83832..2279c01 100644 --- a/app/Protocols/General.php +++ b/app/Protocols/General.php @@ -143,13 +143,13 @@ class General } // 如果传输协议为ws if ((string)$server['network'] === 'ws') { - $wsSettings = $server['networkSettings']; + $wsSettings = $server['network_settings']; if (isset($wsSettings['path'])) $config['path'] = $wsSettings['path']; if (isset($wsSettings['headers']['Host'])) $config['host'] = $wsSettings['headers']['Host']; } // 传输协议为grpc if ((string)$server['network'] === 'grpc') { - $grpcSettings = $server['networkSettings']; + $grpcSettings = $server['network_settings']; if (isset($grpcSettings['serviceName'])) $config['serviceName'] = $grpcSettings['serviceName']; } diff --git a/app/Protocols/Passwall.php b/app/Protocols/Passwall.php index 2a1fbe9..a08ff40 100644 --- a/app/Protocols/Passwall.php +++ b/app/Protocols/Passwall.php @@ -131,13 +131,13 @@ class Passwall } // 如果传输协议为ws if ((string)$server['network'] === 'ws') { - $wsSettings = $server['networkSettings']; + $wsSettings = $server['network_settings']; if (isset($wsSettings['path'])) $config['path'] = $wsSettings['path']; if (isset($wsSettings['headers']['Host'])) $config['host'] = $wsSettings['headers']['Host']; } // 传输协议为grpc if ((string)$server['network'] === 'grpc') { - $grpcSettings = $server['networkSettings']; + $grpcSettings = $server['network_settings']; if (isset($grpcSettings['serviceName'])) $config['serviceName'] = $grpcSettings['serviceName']; } diff --git a/app/Protocols/V2rayN.php b/app/Protocols/V2rayN.php index 870d79e..61fc1c1 100644 --- a/app/Protocols/V2rayN.php +++ b/app/Protocols/V2rayN.php @@ -144,13 +144,13 @@ class V2rayN } // 如果传输协议为ws if ((string)$server['network'] === 'ws') { - $wsSettings = $server['networkSettings']; + $wsSettings = $server['network_settings']; if (isset($wsSettings['path'])) $config['path'] = $wsSettings['path']; if (isset($wsSettings['headers']['Host'])) $config['host'] = $wsSettings['headers']['Host']; } // 传输协议为grpc if ((string)$server['network'] === 'grpc') { - $grpcSettings = $server['networkSettings']; + $grpcSettings = $server['network_settings']; if (isset($grpcSettings['serviceName'])) $config['serviceName'] = $grpcSettings['serviceName']; } diff --git a/app/Protocols/V2rayNG.php b/app/Protocols/V2rayNG.php index c4179d5..809585f 100644 --- a/app/Protocols/V2rayNG.php +++ b/app/Protocols/V2rayNG.php @@ -131,13 +131,13 @@ class V2rayNG } // 如果传输协议为ws if ((string)$server['network'] === 'ws') { - $wsSettings = $server['networkSettings']; + $wsSettings = $server['network_settings']; if (isset($wsSettings['path'])) $config['path'] = $wsSettings['path']; if (isset($wsSettings['headers']['Host'])) $config['host'] = $wsSettings['headers']['Host']; } // 传输协议为grpc if ((string)$server['network'] === 'grpc') { - $grpcSettings = $server['networkSettings']; + $grpcSettings = $server['network_settings']; if (isset($grpcSettings['serviceName'])) $config['serviceName'] = $grpcSettings['serviceName']; }