mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-03-02 04:35:37 +08:00
用户端可以添加WAF 黑白名单
This commit is contained in:
@@ -2,6 +2,7 @@ package iplibrary
|
||||
|
||||
import "github.com/TeaOSLab/EdgeNode/internal/utils"
|
||||
|
||||
// IP条目
|
||||
type IPItem struct {
|
||||
Id int64
|
||||
IPFrom uint32
|
||||
@@ -9,6 +10,7 @@ type IPItem struct {
|
||||
ExpiredAt int64
|
||||
}
|
||||
|
||||
// 检查是否包含某个IP
|
||||
func (this *IPItem) Contains(ip uint32) bool {
|
||||
if this.IPTo == 0 {
|
||||
if this.IPFrom != ip {
|
||||
|
||||
Reference in New Issue
Block a user