mirror of
https://github.com/v2board/v2board.git
synced 2025-06-13 21:28:27 +08:00
@ -24,6 +24,7 @@ class Clash
|
||||
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));
|
||||
header("profile-web-page-url:" . config('v2board.app_url'));
|
||||
$defaultConfig = base_path() . '/resources/rules/default.clash.yaml';
|
||||
$customConfig = base_path() . '/resources/rules/custom.clash.yaml';
|
||||
if (\File::exists($customConfig)) {
|
||||
@ -121,7 +122,6 @@ class Clash
|
||||
$array['ws-opts']['path'] = $wsSettings['path'];
|
||||
if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host']))
|
||||
$array['ws-opts']['headers'] = ['Host' => $wsSettings['headers']['Host']];
|
||||
// TODO: 2022.06.01 remove it
|
||||
if (isset($wsSettings['path']) && !empty($wsSettings['path']))
|
||||
$array['ws-path'] = $wsSettings['path'];
|
||||
if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host']))
|
||||
|
@ -122,7 +122,6 @@ class Stash
|
||||
$array['ws-opts']['path'] = $wsSettings['path'];
|
||||
if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host']))
|
||||
$array['ws-opts']['headers'] = ['Host' => $wsSettings['headers']['Host']];
|
||||
// TODO: 2022.06.01 remove it
|
||||
if (isset($wsSettings['path']) && !empty($wsSettings['path']))
|
||||
$array['ws-path'] = $wsSettings['path'];
|
||||
if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host']))
|
||||
@ -155,6 +154,11 @@ class Stash
|
||||
return $array;
|
||||
}
|
||||
|
||||
private function isRegex($exp)
|
||||
{
|
||||
return @preg_match($exp, null) !== false;
|
||||
}
|
||||
|
||||
private function isMatch($exp, $str)
|
||||
{
|
||||
try {
|
||||
|
@ -21,6 +21,9 @@ class Surfboard
|
||||
$servers = $this->servers;
|
||||
$user = $this->user;
|
||||
|
||||
$appName = config('v2board.app_name', 'V2Board');
|
||||
header("content-disposition:attachment;filename*=UTF-8''".rawurlencode($appName).".conf");
|
||||
|
||||
$proxies = '';
|
||||
$proxyGroup = '';
|
||||
|
||||
|
@ -21,6 +21,9 @@ class Surge
|
||||
$servers = $this->servers;
|
||||
$user = $this->user;
|
||||
|
||||
$appName = config('v2board.app_name', 'V2Board');
|
||||
header("content-disposition:attachment;filename*=UTF-8''".rawurlencode($appName).".conf");
|
||||
|
||||
$proxies = '';
|
||||
$proxyGroup = '';
|
||||
|
||||
|
Reference in New Issue
Block a user