mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 03:57:27 +08:00
fix: improve node filtering by client base_version, set subscription content-type, and add hop_interval support for hysteria2
- Refactor node filtering logic to correctly handle client base_version requirements. - Set appropriate Content-Type header for subscription responses. - Add support for hop_interval configuration in hysteria2 node delivery.
This commit is contained in:
@@ -154,7 +154,8 @@ class ClashMeta extends AbstractProtocol
|
||||
|
||||
$yaml = Yaml::dump($config, 2, 4, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);
|
||||
$yaml = str_replace('$app_name', admin_setting('app_name', 'XBoard'), $yaml);
|
||||
return response($yaml, 200)
|
||||
return response($yaml)
|
||||
->header('content-type', 'text/yaml')
|
||||
->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*=UTF-8\'\'' . rawurlencode($appName));
|
||||
|
||||
Reference in New Issue
Block a user