mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update
This commit is contained in:
parent
31721f3f7b
commit
361506b897
@ -95,7 +95,13 @@ class DeepbworkController extends Controller
|
|||||||
public function config (Request $request) {
|
public function config (Request $request) {
|
||||||
$nodeId = $request->input('node_id');
|
$nodeId = $request->input('node_id');
|
||||||
$localPort = $request->input('local_port');
|
$localPort = $request->input('local_port');
|
||||||
|
if (empty($nodeId) || empty($localPort)) {
|
||||||
|
abort(1000, '参数错误');
|
||||||
|
}
|
||||||
$server = Server::find($nodeId);
|
$server = Server::find($nodeId);
|
||||||
|
if (!$server) {
|
||||||
|
abort(1001, '节点不存在');
|
||||||
|
}
|
||||||
$json = json_decode(self::SERVER_CONFIG);
|
$json = json_decode(self::SERVER_CONFIG);
|
||||||
$json->inboundDetour[0]->port = (int)$localPort;
|
$json->inboundDetour[0]->port = (int)$localPort;
|
||||||
$json->inbound->port = (int)$server->server_port;
|
$json->inbound->port = (int)$server->server_port;
|
||||||
|
Loading…
Reference in New Issue
Block a user