Compare commits

...

2 Commits

Author SHA1 Message Date
刘祥超
53c74553bc 修复ipset无法提前删除IP的Bug 2021-11-24 10:20:06 +08:00
刘祥超
3eb9cade0e 修改版本为0.3.5.2 2021-11-24 10:19:36 +08:00
2 changed files with 7 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
package teaconst package teaconst
const ( const (
Version = "0.3.5" Version = "0.3.5.2"
ProductName = "Edge Node" ProductName = "Edge Node"
ProcessName = "edge-node" ProcessName = "edge-node"

View File

@@ -297,10 +297,12 @@ func (this *IPSetAction) runActionSingleIP(action string, listType IPListType, i
case "deleteItem": case "deleteItem":
args = append(args, "del") args = append(args, "del")
} }
args = append(args, listName, item.IpFrom) if action == "addItem" {
timestamp := time.Now().Unix() args = append(args, listName, item.IpFrom)
if item.ExpiredAt > timestamp { timestamp := time.Now().Unix()
args = append(args, "timeout", strconv.FormatInt(item.ExpiredAt-timestamp, 10)) if item.ExpiredAt > timestamp {
args = append(args, "timeout", strconv.FormatInt(item.ExpiredAt-timestamp, 10))
}
} }
if runtime.GOOS == "darwin" { if runtime.GOOS == "darwin" {