lvfengfree b92e1119ae fix: 修复菜单为空问题 - 移除后端过滤home路由的错误逻辑
- 修复RouteService中错误过滤home路由的问题
- 后端现在正确返回所有用户有权限的路由
- 添加设备管理相关功能(列表、在线监控、电源管理、远程监控)
- 添加详细的修复文档和重启脚本
- 更新权限配置脚本

问题根源:后端代码中有逻辑会过滤掉home路由,导致前端收到空数组,无法生成菜单
解决方案:移除过滤home路由的逻辑,让后端返回所有有权限的路由
2026-03-01 09:50:19 +08:00

152 lines
4.5 KiB
C++

//----------------------------------------------------------------------------
//
// Copyright (C) Intel Corporation, 2006 - 2007.
//
// File: TcpConsumer.h
//
// Contents: Handles outgoing TCP messages.
//
// Notes:
//----------------------------------------------------------------------------
#ifndef _MPS_TCP_CONSUMER_H__
#define _MPS_TCP_CONSUMER_H__
//===================================================
// INCLUDES
//===================================================
#include <ace/Message_Block.h>
#include <ace/SOCK_Stream.h>
#include <ace/Message_Queue_T.h>
#include "TcpSvcHandler.h"
#include "SOCKSv5.h"
/***************************************************************************************
// Tcp_Consumer
//
/**************************************************************************************/
class Tcp_Consumer
{
public:
enum REP_STATUS{SUCCESS, FAILURE};
//===================================================
// CTOR / DTOR
//===================================================
Tcp_Consumer(Tcp_Svc_Handler* handler);
virtual ~Tcp_Consumer();
//===================================================
// PROTOTYPE:
//===================================================
//-----------------------------------------
// Get reference to socket stream
//-----------------------------------------
ACE_SOCK_Stream& getPeer(void) const;
//-----------------------------------------
// Finish sending event when flow control conditions abate.
//-----------------------------------------
STATUS handle_output (ACE_HANDLE h);
//-----------------------------------------
//
//-----------------------------------------
void handle_close();
void connectionClose();
//-----------------------------------------
// add message block to message queue, and
// register to write handler.
//-----------------------------------------
STATUS sendData(ACE_Message_Block* mb);
virtual STATUS sendVersionMsg(SOCKS_V5_METHOD support_method){return STATUS_FAILURE;}
// Put message in this tunnel handler queue
STATUS putq(ACE_Message_Block *mb, ACE_Time_Value *tv=0);
//-----------------------------------------
// Notify this consumer wether there is tunnelSupplier that uses its services.
// In case tcpSvcHandler released this tcpConsumer, (is_hold = false)
// there is no nned to use this instance- and thus we delete it.
//-----------------------------------------
//int setTunnelHold(bool is_hold);
virtual const char* identifier() { return _svc_handler->identifier();}
protected:
// ACE_Recursive_Thread_Mutex& socket_mutex() {return _svc_handler->_socket_mutex;};
//===================================================
// Data Member
//===================================================
Tcp_Svc_Handler* _svc_handler;
ACE_Recursive_Thread_Mutex _mutex;
ACE_UINT32 _msg_counter; //for DEBUG purpose only.
};
/***************************************************************************************
//
//
/**************************************************************************************/
class SocksConsumer: public Tcp_Consumer
{
public:
enum CHANNEL_REP_REASON
{
SUCCEEDED =0,
SERVER_FAILURE =1,
CONNECTION_NOT_ALLOWED =2,
NETWORK_UNREACHABLE =3,
HOST_UNREACHABLE =4,
CONNECTION_REFUESED =5,
TTL_EXPIRED =6,
COMMAND_NOT_SUPPORTED =7,
ADDRESS_TYPE_NOT_SUPPORTED =8
};
//===================================================
// CTOR / DTOR
//===================================================
SocksConsumer(Tcp_Svc_Handler* handler):Tcp_Consumer(handler){};
virtual ~SocksConsumer(){};
//===================================================
// PROTOTYPE:
//===================================================
//-----------------------------------------
// send Socks negotiation message according to
// openChannel reply
//-----------------------------------------
STATUS openRep(REP_STATUS status, CHANNEL_REP_REASON reason=CONNECTION_REFUESED);
//-----------------------------------------
// send Socks version message
//-----------------------------------------
virtual STATUS sendVersionMsg(SOCKS_V5_METHOD support_method);
//-----------------------------------------
// send Socks authentication message
//-----------------------------------------
STATUS sendAuthMsg(SOCKS_V5_REP status);
protected:
//===================================================
// Data Member
//===================================================
};
#endif //_MPS_TCP_CONSUMER_H__