增加frpc响应处理

This commit is contained in:
gaoyutao
2025-12-22 18:54:47 +08:00
parent 2017bfe437
commit 5fd0e913ae
2 changed files with 16 additions and 0 deletions
@@ -77,6 +77,8 @@ public enum MsgEnum {
Agent版本更新应答("AGENT_VERSION_UPDATE_RSP"),
修改frp配置文件应答("UPDATE_FRP_RSP"),
多网IP探测上报("NETWORK_DETECT");
private String value;
@@ -414,6 +414,20 @@ public class AgentEndpoint {
}
}
@AgentDispatcher(msgId = MsgEnum.修改frp配置文件应答)
public class UpdateFrpHandler implements AgentHandler {
@Override
public UpMsgResponse upHandle(String data, String clientId) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("clientId", clientId);
jsonObject.put("dataType", MsgEnum.修改frp配置文件应答.getValue());
jsonObject.put("data", data);
MqMsg mqMsg = MqMsg.builder().topic(agentMqConfig.getAgentTopic()).content(jsonObject.toString()).build();
agentProducer.asyncSend(mqMsg);
return null;
}
}