Merge pull request #445 from betaxab/p1

ClientController: clash: add subscription-userinfo header
This commit is contained in:
tokumeikoi 2021-05-26 23:26:35 +09:00 committed by GitHub
commit 04a05a6ba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)) {