mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
Protocols: Surge: fix surge & surfboard MANAGED-CONFIG URL
This commit is contained in:
parent
84ce0cc0c9
commit
66815f4b91
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Client\Protocols;
|
namespace App\Http\Controllers\Client\Protocols;
|
||||||
|
|
||||||
|
use App\Utils\Helper;
|
||||||
|
|
||||||
class Surfboard
|
class Surfboard
|
||||||
{
|
{
|
||||||
@ -53,7 +54,8 @@ class Surfboard
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Subscription link
|
// 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'];
|
$subsDomain = $_SERVER['SERVER_NAME'];
|
||||||
|
|
||||||
$config = str_replace('$subs_link', $subsURL, $config);
|
$config = str_replace('$subs_link', $subsURL, $config);
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Client\Protocols;
|
namespace App\Http\Controllers\Client\Protocols;
|
||||||
|
|
||||||
|
use App\Utils\Helper;
|
||||||
|
|
||||||
class Surge
|
class Surge
|
||||||
{
|
{
|
||||||
public $flag = 'surge';
|
public $flag = 'surge';
|
||||||
@ -52,7 +54,8 @@ class Surge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Subscription link
|
// 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'];
|
$subsDomain = $_SERVER['SERVER_NAME'];
|
||||||
|
|
||||||
$config = str_replace('$subs_link', $subsURL, $config);
|
$config = str_replace('$subs_link', $subsURL, $config);
|
||||||
|
Loading…
Reference in New Issue
Block a user