/**
* @JSON
* @return array
*/
public function getNodeInfo()
{
$id = trim($_REQUEST['id']);
$result = array('error' => -1, 'message' => 'Request failed');
$user = User::getUserByUserId(User::getCurrent()->uid);
$node = MNode::getNodeById($id);
$method = $node->method;
if ($node->custom_method == 1 && $user->method != '' && $user->method != null) {
$method = $user->method;
}
$info = self::nodeDetail($node->server, $user->port, $user->sspwd, $method, $node->name);
if (self::verifyPlan($user->plan, $node->type)) {
$result = array('error' => 0, 'message' => '获取成功', 'info' => $info, 'node' => $node);
} else {
$result = array('error' => -1, 'message' => '你不是 VIP, 无法使用高级节点!');
}
return $result;
}