robot客户端抓包接口和登录包校验和强制指定,开启dev版本客户端的gm菜单
This commit is contained in:
1 parent
2a4f75d188
commit
a894237d41
8 files changed
+146
-48
No files matched your search
+75
-20
@@ -1,6 +1,7 @@
|
||||
package region
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
|
||||
"hk4e/common/config"
|
||||
@@ -38,22 +39,35 @@ func NewRegionEc2b() *random.Ec2b {
|
||||
return random.NewEc2b()
|
||||
}
|
||||
|
||||
// RegionCustomConfig 区服相关的配置,避免在http中使用Json格式
|
||||
type RegionCustomConfig struct {
|
||||
CloseAntiDebug bool `json:"close_antidebug"` // 默认false: 默认打开反调开关
|
||||
ForceKill bool `json:"force_kill"` // 默认false:
|
||||
AntiDebugPc bool `json:"antidebug_pc"` // 默认false: pc默认不开启反调
|
||||
AntiDebugIos bool `json:"antidubug_ios"` // 默认false: ios默认不开启反调
|
||||
AntiDebugAndroid bool `json:"antidubug_androd"` // 默认false: android默认不开启反调
|
||||
}
|
||||
|
||||
// ClientCustomConfig 客户端版本定义的配置 客户端版本号对应的配置, 需要兼容老的json格式
|
||||
type ClientCustomConfig struct {
|
||||
Visitor bool `json:"visitor"` // 游客功能
|
||||
SdkEnv string `json:"sdkenv"` // sdk环境类型
|
||||
DebugMenu bool `json:"debugmenu"` // debug菜单
|
||||
DebugLogSwitch []int32 `json:"debuglogswitch"` // 打开的log类型
|
||||
DebugLog bool `json:"debuglog"` // log总开关
|
||||
DeviceList map[string]string `json:"devicelist"`
|
||||
LoadJsonData bool `json:"loadjsondata"` // 用json读取InLevel数据
|
||||
ShowException bool `json:"showexception"` // 是否显示异常提示框 默认为:true
|
||||
CheckDevice bool `json:"checkdevice"`
|
||||
LoadPatch bool `json:"loadPatch"`
|
||||
RegionConfig string `json:"regionConfig"`
|
||||
DownloadMode int32 `json:"downloadMode"`
|
||||
}
|
||||
|
||||
func GetRegionList(ec2b *random.Ec2b) *proto.QueryRegionListHttpRsp {
|
||||
dispatchEc2bData := ec2b.Bytes()
|
||||
dispatchXorKey := ec2b.XorKey()
|
||||
// RegionList
|
||||
customConfigStr := `
|
||||
{
|
||||
"sdkenv": "2",
|
||||
"checkdevice": "false",
|
||||
"loadPatch": "false",
|
||||
"showexception": "false",
|
||||
"regionConfig": "pm|fk|add",
|
||||
"downloadMode": "0",
|
||||
}
|
||||
`
|
||||
customConfig := []byte(customConfigStr)
|
||||
endec.Xor(customConfig, dispatchXorKey)
|
||||
regionList := new(proto.QueryRegionListHttpRsp)
|
||||
regionList.Retcode = 0
|
||||
serverList := make([]*proto.RegionSimpleInfo, 0)
|
||||
server := &proto.RegionSimpleInfo{
|
||||
Name: "os_usa",
|
||||
@@ -62,23 +76,64 @@ func GetRegionList(ec2b *random.Ec2b) *proto.QueryRegionListHttpRsp {
|
||||
DispatchUrl: config.GetConfig().Hk4e.DispatchUrl,
|
||||
}
|
||||
serverList = append(serverList, server)
|
||||
regionList := new(proto.QueryRegionListHttpRsp)
|
||||
regionList.RegionList = serverList
|
||||
regionList.ClientSecretKey = dispatchEc2bData
|
||||
regionList.ClientCustomConfigEncrypted = customConfig
|
||||
dispatchEc2bData := ec2b.Bytes()
|
||||
regionList.ClientSecretKey = dispatchEc2bData // 客户端使用密钥
|
||||
dispatchXorKey := ec2b.XorKey()
|
||||
clientCustomConfig, _ := json.Marshal(&ClientCustomConfig{
|
||||
SdkEnv: "2",
|
||||
CheckDevice: false,
|
||||
LoadPatch: false,
|
||||
ShowException: true,
|
||||
RegionConfig: "pm|fk|add",
|
||||
DownloadMode: 0,
|
||||
DebugMenu: true,
|
||||
DebugLogSwitch: []int32{0, 1, 2},
|
||||
DebugLog: true,
|
||||
})
|
||||
endec.Xor(clientCustomConfig, dispatchXorKey)
|
||||
regionList.ClientCustomConfigEncrypted = clientCustomConfig // 加密后的客户端版本定义的配置
|
||||
regionList.EnableLoginPc = true
|
||||
return regionList
|
||||
}
|
||||
|
||||
func GetRegionCurr(kcpAddr string, kcpPort int32, ec2b *random.Ec2b) *proto.QueryCurrRegionHttpRsp {
|
||||
dispatchEc2bData := ec2b.Bytes()
|
||||
// RegionCurr
|
||||
// region_info: retcode == 0 || RET_STOP_SERVER
|
||||
// force_udpate: retcode == RET_CLIENT_FORCE_UPDATE
|
||||
// stop_server: retcode == RET_STOP_SERVER
|
||||
regionCurr := new(proto.QueryCurrRegionHttpRsp)
|
||||
regionCurr.Retcode = 0 // 错误码
|
||||
regionCurr.Msg = "" // 错误信息
|
||||
dispatchEc2bData := ec2b.Bytes()
|
||||
regionCurr.RegionInfo = &proto.RegionInfo{
|
||||
GateserverIp: kcpAddr,
|
||||
GateserverPort: uint32(kcpPort),
|
||||
SecretKey: dispatchEc2bData,
|
||||
SecretKey: dispatchEc2bData, // 第一条协议加密密钥
|
||||
}
|
||||
regionCurr.ClientSecretKey = dispatchEc2bData
|
||||
regionCurr.ClientSecretKey = dispatchEc2bData // 客户端使用密钥
|
||||
dispatchXorKey := ec2b.XorKey()
|
||||
regionCustomConfig, _ := json.Marshal(&RegionCustomConfig{
|
||||
CloseAntiDebug: true,
|
||||
ForceKill: false,
|
||||
AntiDebugPc: false,
|
||||
AntiDebugIos: false,
|
||||
AntiDebugAndroid: false,
|
||||
})
|
||||
endec.Xor(regionCustomConfig, dispatchXorKey)
|
||||
regionCurr.RegionCustomConfigEncrypted = regionCustomConfig // 加密后的区服定义的配置
|
||||
clientCustomConfig, _ := json.Marshal(&ClientCustomConfig{
|
||||
SdkEnv: "2",
|
||||
CheckDevice: false,
|
||||
LoadPatch: false,
|
||||
ShowException: true,
|
||||
RegionConfig: "pm|fk|add",
|
||||
DownloadMode: 0,
|
||||
DebugMenu: true,
|
||||
DebugLogSwitch: []int32{0, 1, 2},
|
||||
DebugLog: true,
|
||||
})
|
||||
endec.Xor(clientCustomConfig, dispatchXorKey)
|
||||
regionCurr.ClientRegionCustomConfigEncrypted = clientCustomConfig // 加密后的客户端区服定义的配置
|
||||
return regionCurr
|
||||
}
|
||||
@@ -71,7 +71,9 @@ func (c *Controller) queryRegionList(context *gin.Context) {
|
||||
return
|
||||
}
|
||||
logger.Debug("QueryRegionListHttpRsp: %+v", queryRegionListHttpRsp)
|
||||
queryRegionListHttpRsp.RegionList[0].DispatchUrl = config.GetConfig().Hk4e.DispatchUrl
|
||||
for _, regionSimpleInfo := range queryRegionListHttpRsp.RegionList {
|
||||
regionSimpleInfo.DispatchUrl = config.GetConfig().Hk4e.DispatchUrl
|
||||
}
|
||||
regionListData, err := pb.Marshal(queryRegionListHttpRsp)
|
||||
if err != nil {
|
||||
_, _ = context.Writer.WriteString("500")
|
||||
|
||||
+7
-7
@@ -376,7 +376,7 @@ func (g *Game) SendSucc(cmdId uint16, player *model.Player, rsp pb.Message) {
|
||||
// SendToWorldA 给世界内所有玩家发消息
|
||||
func (g *Game) SendToWorldA(world *World, cmdId uint16, seq uint32, msg pb.Message) {
|
||||
for _, v := range world.GetAllPlayer() {
|
||||
GAME.SendMsg(cmdId, v.PlayerID, seq, msg)
|
||||
g.SendMsg(cmdId, v.PlayerID, seq, msg)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -386,13 +386,13 @@ func (g *Game) SendToWorldAEC(world *World, cmdId uint16, seq uint32, msg pb.Mes
|
||||
if aecUid == v.PlayerID {
|
||||
continue
|
||||
}
|
||||
GAME.SendMsg(cmdId, v.PlayerID, seq, msg)
|
||||
g.SendMsg(cmdId, v.PlayerID, seq, msg)
|
||||
}
|
||||
}
|
||||
|
||||
// SendToWorldH 给世界房主发消息
|
||||
func (g *Game) SendToWorldH(world *World, cmdId uint16, seq uint32, msg pb.Message) {
|
||||
GAME.SendMsg(cmdId, world.GetOwner().PlayerID, seq, msg)
|
||||
g.SendMsg(cmdId, world.GetOwner().PlayerID, seq, msg)
|
||||
}
|
||||
|
||||
// SendToSceneA 给场景内所有玩家发消息
|
||||
@@ -402,11 +402,11 @@ func (g *Game) SendToSceneA(scene *Scene, cmdId uint16, seq uint32, msg pb.Messa
|
||||
bigWorldAoi := world.GetBigWorldAoi()
|
||||
otherWorldAvatarMap := bigWorldAoi.GetObjectListByPos(float32(SELF.Pos.X), float32(SELF.Pos.Y), float32(SELF.Pos.Z))
|
||||
for uid := range otherWorldAvatarMap {
|
||||
GAME.SendMsg(cmdId, uint32(uid), seq, msg)
|
||||
g.SendMsg(cmdId, uint32(uid), seq, msg)
|
||||
}
|
||||
} else {
|
||||
for _, v := range scene.GetAllPlayer() {
|
||||
GAME.SendMsg(cmdId, v.PlayerID, seq, msg)
|
||||
g.SendMsg(cmdId, v.PlayerID, seq, msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -421,14 +421,14 @@ func (g *Game) SendToSceneAEC(scene *Scene, cmdId uint16, seq uint32, msg pb.Mes
|
||||
if aecUid == uint32(uid) {
|
||||
continue
|
||||
}
|
||||
GAME.SendMsg(cmdId, uint32(uid), seq, msg)
|
||||
g.SendMsg(cmdId, uint32(uid), seq, msg)
|
||||
}
|
||||
} else {
|
||||
for _, v := range scene.GetAllPlayer() {
|
||||
if aecUid == v.PlayerID {
|
||||
continue
|
||||
}
|
||||
GAME.SendMsg(cmdId, v.PlayerID, seq, msg)
|
||||
g.SendMsg(cmdId, v.PlayerID, seq, msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,7 @@ func (r *RouteManager) initRoute() {
|
||||
r.registerRouter(cmd.PlayerEnterDungeonReq, GAME.PlayerEnterDungeonReq)
|
||||
r.registerRouter(cmd.PlayerQuitDungeonReq, GAME.PlayerQuitDungeonReq)
|
||||
r.registerRouter(cmd.GadgetInteractReq, GAME.GadgetInteractReq)
|
||||
r.registerRouter(cmd.GmTalkReq, GAME.GmTalkReq)
|
||||
}
|
||||
|
||||
type HandlerFunc func(player *model.Player, payloadMsg pb.Message)
|
||||
|
||||
@@ -2,6 +2,7 @@ package game
|
||||
|
||||
import (
|
||||
"math"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"hk4e/common/constant"
|
||||
@@ -136,7 +137,7 @@ func (g *Game) WorldPlayerRTTNotify(world *World) {
|
||||
playerRTTInfo := &proto.PlayerRTTInfo{Uid: worldPlayer.PlayerID, Rtt: worldPlayer.ClientRTT}
|
||||
worldPlayerRTTNotify.PlayerRttList = append(worldPlayerRTTNotify.PlayerRttList, playerRTTInfo)
|
||||
}
|
||||
GAME.SendToWorldA(world, cmd.WorldPlayerRTTNotify, 0, worldPlayerRTTNotify)
|
||||
g.SendToWorldA(world, cmd.WorldPlayerRTTNotify, 0, worldPlayerRTTNotify)
|
||||
}
|
||||
|
||||
// WorldPlayerLocationNotify 多人世界其他玩家的坐标位置广播
|
||||
@@ -163,7 +164,7 @@ func (g *Game) WorldPlayerLocationNotify(world *World) {
|
||||
}
|
||||
worldPlayerLocationNotify.PlayerWorldLocList = append(worldPlayerLocationNotify.PlayerWorldLocList, playerWorldLocationInfo)
|
||||
}
|
||||
GAME.SendToWorldA(world, cmd.WorldPlayerLocationNotify, 0, worldPlayerLocationNotify)
|
||||
g.SendToWorldA(world, cmd.WorldPlayerLocationNotify, 0, worldPlayerLocationNotify)
|
||||
}
|
||||
|
||||
func (g *Game) ScenePlayerLocationNotify(world *World) {
|
||||
@@ -219,7 +220,7 @@ func (g *Game) ScenePlayerLocationNotify(world *World) {
|
||||
}
|
||||
}
|
||||
}
|
||||
GAME.SendToSceneA(scene, cmd.ScenePlayerLocationNotify, 0, scenePlayerLocationNotify)
|
||||
g.SendToSceneA(scene, cmd.ScenePlayerLocationNotify, 0, scenePlayerLocationNotify)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +231,7 @@ func (g *Game) SceneTimeNotify(world *World) {
|
||||
SceneId: player.SceneId,
|
||||
SceneTime: uint64(scene.GetSceneTime()),
|
||||
}
|
||||
GAME.SendMsg(cmd.SceneTimeNotify, player.PlayerID, 0, sceneTimeNotify)
|
||||
g.SendMsg(cmd.SceneTimeNotify, player.PlayerID, 0, sceneTimeNotify)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,6 +243,22 @@ func (g *Game) PlayerTimeNotify(world *World) {
|
||||
PlayerTime: uint64(player.TotalOnlineTime),
|
||||
ServerTime: uint64(time.Now().UnixMilli()),
|
||||
}
|
||||
GAME.SendMsg(cmd.PlayerTimeNotify, player.PlayerID, 0, playerTimeNotify)
|
||||
g.SendMsg(cmd.PlayerTimeNotify, player.PlayerID, 0, playerTimeNotify)
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Game) GmTalkReq(player *model.Player, payloadMsg pb.Message) {
|
||||
req := payloadMsg.(*proto.GmTalkReq)
|
||||
logger.Info("GmTalkReq: %v", req.Msg)
|
||||
commandText := strings.TrimSpace(req.Msg)
|
||||
beginIndex := strings.Index(commandText, "(")
|
||||
endIndex := strings.Index(commandText, ")")
|
||||
if beginIndex == 0 || beginIndex == -1 || endIndex == -1 || beginIndex >= endIndex {
|
||||
g.SendMsg(cmd.GmTalkRsp, player.PlayerID, player.ClientSeq, &proto.GmTalkRsp{Retmsg: "命令解析失败", Msg: req.Msg})
|
||||
return
|
||||
}
|
||||
funcName := commandText[:beginIndex]
|
||||
paramList := strings.Split(commandText[beginIndex:endIndex+1], ",")
|
||||
COMMAND_MANAGER.HandleCommand(&CommandMessage{FuncName: funcName, ParamList: paramList})
|
||||
g.SendMsg(cmd.GmTalkRsp, player.PlayerID, player.ClientSeq, &proto.GmTalkRsp{Retmsg: "执行成功", Msg: req.Msg})
|
||||
}
|
||||
@@ -59,7 +59,7 @@ func (g *Game) GCGStartChallenge(player *model.Player) {
|
||||
game := GCG_MANAGER.CreateGame(30101, []*model.Player{player})
|
||||
|
||||
// GCG游戏简要信息通知
|
||||
GAME.SendMsg(cmd.GCGGameBriefDataNotify, player.PlayerID, player.ClientSeq,
|
||||
g.SendMsg(cmd.GCGGameBriefDataNotify, player.PlayerID, player.ClientSeq,
|
||||
g.PacketGCGGameBriefDataNotify(player, proto.GCGGameBusinessType_GCG_GAME_GUIDE_GROUP, game))
|
||||
|
||||
// 玩家进入GCG界面
|
||||
@@ -266,7 +266,7 @@ func (g *Game) GCGAskDuelReq(player *model.Player, payloadMsg pb.Message) {
|
||||
// })
|
||||
// }
|
||||
|
||||
GAME.SendMsg(cmd.GCGAskDuelRsp, player.PlayerID, player.ClientSeq, gcgAskDuelRsp)
|
||||
g.SendMsg(cmd.GCGAskDuelRsp, player.PlayerID, player.ClientSeq, gcgAskDuelRsp)
|
||||
}
|
||||
|
||||
// GCGInitFinishReq GCG初始化完成请求
|
||||
@@ -287,7 +287,7 @@ func (g *Game) GCGInitFinishReq(player *model.Player, payloadMsg pb.Message) {
|
||||
// 更改操控者加载状态
|
||||
gameController.loadState = ControllerLoadState_InitFinish
|
||||
|
||||
GAME.SendMsg(cmd.GCGInitFinishRsp, player.PlayerID, player.ClientSeq, &proto.GCGInitFinishRsp{})
|
||||
g.SendMsg(cmd.GCGInitFinishRsp, player.PlayerID, player.ClientSeq, &proto.GCGInitFinishRsp{})
|
||||
|
||||
// 检查所有玩家是否已加载完毕
|
||||
game.CheckAllInitFinish()
|
||||
@@ -317,7 +317,7 @@ func (g *Game) GCGOperationReq(player *model.Player, payloadMsg pb.Message) {
|
||||
// 操作者是否拥有该卡牌
|
||||
cardInfo := gameController.GetCharCardByGuid(op.CardGuid)
|
||||
if cardInfo == nil {
|
||||
GAME.SendError(cmd.GCGOperationRsp, player, &proto.GCGOperationRsp{}, proto.Retcode_RET_GCG_SELECT_HAND_CARD_GUID_ERROR)
|
||||
g.SendError(cmd.GCGOperationRsp, player, &proto.GCGOperationRsp{}, proto.Retcode_RET_GCG_SELECT_HAND_CARD_GUID_ERROR)
|
||||
return
|
||||
}
|
||||
// 操控者选择角色牌
|
||||
@@ -364,7 +364,7 @@ func (g *Game) GCGOperationReq(player *model.Player, payloadMsg pb.Message) {
|
||||
gcgOperationRsp := &proto.GCGOperationRsp{
|
||||
OpSeq: req.OpSeq,
|
||||
}
|
||||
GAME.SendMsg(cmd.GCGOperationRsp, player.PlayerID, player.ClientSeq, gcgOperationRsp)
|
||||
g.SendMsg(cmd.GCGOperationRsp, player.PlayerID, player.ClientSeq, gcgOperationRsp)
|
||||
}
|
||||
|
||||
// PacketGCGSkillPreviewNotify GCG游戏技能预览通知
|
||||
@@ -470,7 +470,7 @@ func (g *Game) SendGCGMessagePackNotify(controller *GCGController, serverSeq uin
|
||||
// 根据操控者的类型发送消息包
|
||||
switch controller.controllerType {
|
||||
case ControllerType_Player:
|
||||
GAME.SendMsg(cmd.GCGMessagePackNotify, controller.player.PlayerID, controller.player.ClientSeq, gcgMessagePackNotify)
|
||||
g.SendMsg(cmd.GCGMessagePackNotify, controller.player.PlayerID, controller.player.ClientSeq, gcgMessagePackNotify)
|
||||
case ControllerType_AI:
|
||||
controller.ai.ReceiveGCGMessagePackNotify(gcgMessagePackNotify)
|
||||
default:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package game
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"math"
|
||||
"strconv"
|
||||
"time"
|
||||
@@ -389,6 +390,24 @@ func (g *Game) PostEnterSceneReq(player *model.Player, payloadMsg pb.Message) {
|
||||
EnterSceneToken: req.EnterSceneToken,
|
||||
}
|
||||
g.SendMsg(cmd.PostEnterSceneRsp, player.PlayerID, player.ClientSeq, postEnterSceneRsp)
|
||||
|
||||
// 开启live版本客户端的GM按钮 虽然没什么卵用
|
||||
// local btnGm = CS.UnityEngine.GameObject.Find("/Canvas/Pages/InLevelMainPage/GrpMainPage/GrpMainBtn/GrpMainToggle/GrpTopPanel/BtnGm")
|
||||
// btnGm:SetActive(true)
|
||||
luac, err := base64.StdEncoding.DecodeString("G0x1YVMBGZMNChoKBAQICHhWAAAAAAAAAAAAAAAod0ABCEBnbS5sdWEAAAAAAAAAAAABBAoAAAAkAEAAKUBAACmAQAApwEAAVgABACyAAAFdQEEA2ACAAGxAgAEZAIAABgAAAAQDQ1MEDFVuaXR5RW5naW5lBAtHYW1lT2JqZWN0BAVGaW5kFFUvQ2FudmFzL1BhZ2VzL0luTGV2ZWxNYWluUGFnZS9HcnBNYWluUGFnZS9HcnBNYWluQnRuL0dycE1haW5Ub2dnbGUvR3JwVG9wUGFuZWwvQnRuR20EClNldEFjdGl2ZQEAAAABAAAAAAAKAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAgAAAAEAAAAGYnRuR20GAAAACgAAAAEAAAAFX0VOVg==")
|
||||
if err != nil {
|
||||
logger.Error("decode luac error: %v", err)
|
||||
return
|
||||
}
|
||||
GAME.SendMsg(cmd.WindSeedClientNotify, player.PlayerID, 0, &proto.WindSeedClientNotify{
|
||||
Notify: &proto.WindSeedClientNotify_AreaNotify_{
|
||||
AreaNotify: &proto.WindSeedClientNotify_AreaNotify{
|
||||
AreaCode: luac,
|
||||
AreaId: 1,
|
||||
AreaType: 1,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func (g *Game) SceneEntityDrownReq(player *model.Player, payloadMsg pb.Message) {
|
||||
|
||||
+13
-9
@@ -89,6 +89,7 @@ func main() {
|
||||
defer messageQueue.Close()
|
||||
|
||||
go runForward(messageQueue)
|
||||
go runPacketCaptureApi()
|
||||
} else {
|
||||
go runRobot()
|
||||
}
|
||||
@@ -109,6 +110,18 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
func runPacketCaptureApi() {
|
||||
gin.SetMode(gin.DebugMode)
|
||||
engine := gin.Default()
|
||||
engine.GET("/packet/capture/websocket", packetCaptureWebsocket)
|
||||
engine.GET("/packet/capture/all", packetCaptureAll)
|
||||
err := engine.Run(":9999")
|
||||
if err != nil {
|
||||
logger.Error("gin run error: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
var ForwardSession *net.Session = nil
|
||||
|
||||
func packetCaptureWebsocket(ctx *gin.Context) {
|
||||
@@ -146,15 +159,6 @@ func packetCaptureAll(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
func runForward(messageQueue *mq.MessageQueue) {
|
||||
gin.SetMode(gin.DebugMode)
|
||||
engine := gin.Default()
|
||||
engine.GET("/packet/capture/websocket", packetCaptureWebsocket)
|
||||
engine.GET("/packet/capture/all", packetCaptureAll)
|
||||
err := engine.Run(":9999")
|
||||
if err != nil {
|
||||
logger.Error("gin run error: %v", err)
|
||||
return
|
||||
}
|
||||
for {
|
||||
netMsg := <-messageQueue.GetNetMsg()
|
||||
if netMsg.OriginServerType != api.DISPATCH {
|
||||
|
||||
Reference in new issue
Block a user