Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa60092c20 | ||
|
|
54fc265d24 | ||
|
|
a5ac900784 | ||
|
|
4053f1da32 | ||
|
|
0374ccd8a8 | ||
|
|
1d46c446cf | ||
|
|
54b66805f9 | ||
|
|
f7afcbde92 |
@@ -1,7 +1,7 @@
|
||||
package teaconst
|
||||
|
||||
const (
|
||||
Version = "0.5.3"
|
||||
Version = "0.5.4"
|
||||
|
||||
ProductName = "Edge Node"
|
||||
ProcessName = "edge-node"
|
||||
|
||||
@@ -218,7 +218,7 @@ func (this *HTTPRequest) checkWAFRequest(firewallPolicy *firewallconfigs.HTTPFir
|
||||
}
|
||||
|
||||
goNext, hasRequestBody, ruleGroup, ruleSet, err := w.MatchRequest(this, this.writer)
|
||||
if forceLog && logRequestBody && hasRequestBody {
|
||||
if forceLog && logRequestBody && hasRequestBody && ruleSet != nil && ruleSet.HasAttackActions() {
|
||||
this.wafHasRequestBody = true
|
||||
}
|
||||
if err != nil {
|
||||
@@ -294,7 +294,7 @@ func (this *HTTPRequest) checkWAFResponse(firewallPolicy *firewallconfigs.HTTPFi
|
||||
}
|
||||
|
||||
goNext, hasRequestBody, ruleGroup, ruleSet, err := w.MatchResponse(this, resp, this.writer)
|
||||
if forceLog && logRequestBody && hasRequestBody {
|
||||
if forceLog && logRequestBody && hasRequestBody && ruleSet != nil && ruleSet.HasAttackActions() {
|
||||
this.wafHasRequestBody = true
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
@@ -759,6 +759,7 @@ func (this *Node) listenSock() error {
|
||||
|
||||
// 退出主进程
|
||||
events.Notify(events.EventQuit)
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
utils.Exit()
|
||||
case "quit":
|
||||
_ = cmd.ReplyOk()
|
||||
|
||||
@@ -20,6 +20,9 @@ func NewDB(rawDB *sql.DB) *DB {
|
||||
rawDB: rawDB,
|
||||
}
|
||||
|
||||
events.OnKey(events.EventQuit, fmt.Sprintf("db_%p", db), func() {
|
||||
_ = rawDB.Close()
|
||||
})
|
||||
events.OnKey(events.EventTerminated, fmt.Sprintf("db_%p", db), func() {
|
||||
_ = rawDB.Close()
|
||||
})
|
||||
|
||||
@@ -114,7 +114,8 @@ func (this *ServiceManager) installSystemdService(systemd, exePath string, args
|
||||
var shortName = teaconst.SystemdServiceName
|
||||
var longName = "GoEdge Node" // TODO 将来可以修改
|
||||
|
||||
var desc = `# Provides: ` + shortName + `
|
||||
var desc = `### BEGIN INIT INFO
|
||||
# Provides: ` + shortName + `
|
||||
# Required-Start: $all
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
|
||||
Reference in New Issue
Block a user