1
This commit is contained in:
parent
577345080d
commit
958f94a244
@ -128,6 +128,7 @@ func (this *RiskMgr) GetGameConf(gameId int32, channel int32) *GameConf {
|
|||||||
func (this *RiskMgr) _analyseIsOpen(c *f5.Context) {
|
func (this *RiskMgr) _analyseIsOpen(c *f5.Context) {
|
||||||
var gameConf *GameConf
|
var gameConf *GameConf
|
||||||
responseStr := ""
|
responseStr := ""
|
||||||
|
launchInfo := ""
|
||||||
isPass := func () bool {
|
isPass := func () bool {
|
||||||
if c.Method() != "POST" {
|
if c.Method() != "POST" {
|
||||||
atomic.AddInt64(&this.totalHttpMethodBlockTimes, 1)
|
atomic.AddInt64(&this.totalHttpMethodBlockTimes, 1)
|
||||||
@ -155,7 +156,7 @@ func (this *RiskMgr) _analyseIsOpen(c *f5.Context) {
|
|||||||
remoteAddr = c.Request("ip").GetString()
|
remoteAddr = c.Request("ip").GetString()
|
||||||
}
|
}
|
||||||
|
|
||||||
launchInfo := c.GetBody().GetString()
|
launchInfo = c.GetBody().GetString()
|
||||||
if gameConf.IsPass(remoteAddr, launchInfo, &responseStr) {
|
if gameConf.IsPass(remoteAddr, launchInfo, &responseStr) {
|
||||||
atomic.AddInt64(&gameConf.passTimes, 1)
|
atomic.AddInt64(&gameConf.passTimes, 1)
|
||||||
atomic.AddInt64(&gameConf.totalPassTimes, 1)
|
atomic.AddInt64(&gameConf.totalPassTimes, 1)
|
||||||
@ -181,7 +182,10 @@ func (this *RiskMgr) _analyseIsOpen(c *f5.Context) {
|
|||||||
} else {
|
} else {
|
||||||
c.ResponseInt32Ok("is_open", 1)
|
c.ResponseInt32Ok("is_open", 1)
|
||||||
}
|
}
|
||||||
f5.SysLog().Info("time:%d analyse pass:%s", q5.GetTickCount() - beginTick, responseStr)
|
f5.SysLog().Info("time:%d analyse pass:%s launch:%s",
|
||||||
|
q5.GetTickCount() - beginTick,
|
||||||
|
responseStr,
|
||||||
|
launchInfo)
|
||||||
} else {
|
} else {
|
||||||
atomic.AddInt64(&this.totalBlockTimes, 1)
|
atomic.AddInt64(&this.totalBlockTimes, 1)
|
||||||
atomic.AddInt64(&this.blockTimes, 1)
|
atomic.AddInt64(&this.blockTimes, 1)
|
||||||
@ -196,7 +200,10 @@ func (this *RiskMgr) _analyseIsOpen(c *f5.Context) {
|
|||||||
} else {
|
} else {
|
||||||
c.ResponseInt32Ok("is_open", 0)
|
c.ResponseInt32Ok("is_open", 0)
|
||||||
}
|
}
|
||||||
f5.SysLog().Warning("time:%d analyse block:%s", q5.GetTickCount() - beginTick, responseStr)
|
f5.SysLog().Warning("time:%d analyse block:%s launch:%s",
|
||||||
|
q5.GetTickCount() - beginTick,
|
||||||
|
responseStr,
|
||||||
|
launchInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user