ClientController: clash: add subscription-userinfo header

This commit is contained in:
Beta Soft 2021-05-26 17:07:38 +08:00
parent 1fb3f62cff
commit 2e7544c71c
No known key found for this signature in database
GPG Key ID: 180A31AB98D5C156

View File

@ -245,6 +245,7 @@ class ClientController extends Controller
private function clash($user, $servers = [])
{
header("subscription-userinfo: upload={$user['u']}; download={$user['d']}; total={$user['transfer_enable']}; expire={$user['expired_at']}");
$defaultConfig = base_path() . '/resources/rules/default.clash.yaml';
$customConfig = base_path() . '/resources/rules/custom.clash.yaml';
if (\File::exists($customConfig)) {