mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update trojan server
This commit is contained in:
parent
747a3c5c06
commit
a1ae4caee3
@ -37,7 +37,7 @@ class TrojanTidalabController extends Controller
|
||||
if (!$server) {
|
||||
abort(500, 'fail');
|
||||
}
|
||||
Cache::put(CacheKey::get('SERVER_LAST_CHECK_AT', $server->id), time(), 3600);
|
||||
Cache::put(CacheKey::get('SERVER_TROJAN_LAST_CHECK_AT', $server->id), time(), 3600);
|
||||
$serverService = new ServerService();
|
||||
$users = $serverService->getAvailableUsers(json_decode($server->group_id));
|
||||
$result = [];
|
||||
@ -69,7 +69,7 @@ class TrojanTidalabController extends Controller
|
||||
}
|
||||
$data = file_get_contents('php://input');
|
||||
$data = json_decode($data, true);
|
||||
Cache::put(CacheKey::get('SERVER_ONLINE_USER', $server->id), count($data), 3600);
|
||||
Cache::put(CacheKey::get('SERVER_TROJAN_ONLINE_USER', $server->id), count($data), 3600);
|
||||
$serverService = new ServerService();
|
||||
$userService = new UserService();
|
||||
foreach ($data as $item) {
|
||||
|
@ -8,7 +8,9 @@ class CacheKey
|
||||
'EMAIL_VERIFY_CODE' => '邮箱验证吗',
|
||||
'LAST_SEND_EMAIL_VERIFY_TIMESTAMP' => '最后一次发送邮箱验证码时间',
|
||||
'SERVER_ONLINE_USER' => '节点在线用户',
|
||||
'SERVER_LAST_CHECK_AT' => '节点最后检查时间'
|
||||
'SERVER_LAST_CHECK_AT' => '节点最后检查时间',
|
||||
'SERVER_TROJAN_ONLINE_USER' => 'trojan节点在线用户',
|
||||
'SERVER_TROJAN_LAST_CHECK_AT' => 'trojan节点最后检查时间'
|
||||
];
|
||||
|
||||
public static function get(string $key, $uniqueValue)
|
||||
|
Loading…
Reference in New Issue
Block a user