Home / 开发 / v2board 面板添加api接口修改Vmess节点地址信息
\app\Http\Controllers\Server\DeepbworkController.php
在里面加入
// 后端更新ip
public function changeip(Request $request)
{
$host = $request->input('host');
if ($request->input('id')) {
$server = ServerVmess::find($request->input('id'));
if (!$server) {
abort(500, '服务器不存在');
}
try {
$server->host = $host;
$server->save();
} catch (\Exception $e) {
abort(500, '保存失败');
}
return response([
'data' => true
]);
}
return response([
'data' => true
]);
}
使用:
/api/v1/server/Deepbwork/changeip?token=你的token&id=节点id&host=地址