Protocols: Surge: fix surge & surfboard MANAGED-CONFIG URL

This commit is contained in:
Alpha Kane 2022-04-13 18:02:03 +08:00
parent 84ce0cc0c9
commit 66815f4b91
No known key found for this signature in database
GPG Key ID: 180A31AB98D5C156
2 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,7 @@
namespace App\Http\Controllers\Client\Protocols;
use App\Utils\Helper;
class Surfboard
{
@ -53,7 +54,8 @@ class Surfboard
}
// Subscription link
$subsURL = config('v2board.subscribe_url', config('v2board.app_url', env('APP_URL'))) . '/api/v1/client/subscribe?token=' . $user['token'];
$subsHost = Helper::getSubscribeHost();
$subsURL = "{$subsHost}/api/v1/client/subscribe?token={$user['token']}";
$subsDomain = $_SERVER['SERVER_NAME'];
$config = str_replace('$subs_link', $subsURL, $config);

View File

@ -2,6 +2,8 @@
namespace App\Http\Controllers\Client\Protocols;
use App\Utils\Helper;
class Surge
{
public $flag = 'surge';
@ -52,7 +54,8 @@ class Surge
}
// Subscription link
$subsURL = config('v2board.subscribe_url', config('v2board.app_url', env('APP_URL'))) . '/api/v1/client/subscribe?token=' . $user['token'];
$subsHost = Helper::getSubscribeHost();
$subsURL = "{$subsHost}/api/v1/client/subscribe?token={$user['token']}";
$subsDomain = $_SERVER['SERVER_NAME'];
$config = str_replace('$subs_link', $subsURL, $config);