From 25cae4343071d67f7d2e720d72fd595afbdb6363 Mon Sep 17 00:00:00 2001 From: coldice945 Date: Thu, 19 May 2022 23:01:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A6=82=E6=9E=9C=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E5=90=8D=E7=A7=B0=E4=B8=BA=E4=B8=AD=E6=96=87=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=EF=BC=8CCFW=20and=20Stash=20=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=96=87=E4=BB=B6=E5=90=8D=E6=88=96=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=96=87=E4=BB=B6=E5=90=8D=E4=B9=B1=E7=A0=81=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Client/Protocols/Clash.php | 2 +- app/Http/Controllers/Client/Protocols/Stash.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Client/Protocols/Clash.php b/app/Http/Controllers/Client/Protocols/Clash.php index c3a2f813..06f40537 100644 --- a/app/Http/Controllers/Client/Protocols/Clash.php +++ b/app/Http/Controllers/Client/Protocols/Clash.php @@ -23,7 +23,7 @@ class Clash $appName = config('v2board.app_name', 'V2Board'); header("subscription-userinfo: upload={$user['u']}; download={$user['d']}; total={$user['transfer_enable']}; expire={$user['expired_at']}"); header('profile-update-interval: 24'); - header("content-disposition:attachment;filename={$appName}"); + header("content-disposition:attachment;filename*=UTF-8''".rawurlencode($appName)); $defaultConfig = base_path() . '/resources/rules/default.clash.yaml'; $customConfig = base_path() . '/resources/rules/custom.clash.yaml'; if (\File::exists($customConfig)) { diff --git a/app/Http/Controllers/Client/Protocols/Stash.php b/app/Http/Controllers/Client/Protocols/Stash.php index 5ba603f3..534b9d81 100644 --- a/app/Http/Controllers/Client/Protocols/Stash.php +++ b/app/Http/Controllers/Client/Protocols/Stash.php @@ -24,6 +24,7 @@ class Stash header("subscription-userinfo: upload={$user['u']}; download={$user['d']}; total={$user['transfer_enable']}; expire={$user['expired_at']}"); header('profile-update-interval: 24'); header("content-disposition: filename={$appName}"); + header("content-disposition: filename*=UTF-8''".rawurlencode($appName)); // 暂时使用clash配置文件,后续根据Stash更新情况更新 $defaultConfig = base_path() . '/resources/rules/default.clash.yaml'; $customConfig = base_path() . '/resources/rules/custom.clash.yaml';