IP名单新增IPv6和所有IP两种类型

This commit is contained in:
GoEdgeLab
2021-02-02 15:26:00 +08:00
parent 992d0560b6
commit 9a679c6bc1
12 changed files with 176 additions and 101 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/TeaOSLab/EdgeNode/internal/events"
"github.com/TeaOSLab/EdgeNode/internal/remotelogs"
"github.com/TeaOSLab/EdgeNode/internal/rpc"
"github.com/TeaOSLab/EdgeNode/internal/utils"
"github.com/iwind/TeaGo/Tea"
"sync"
"time"
@@ -123,8 +124,9 @@ func (this *IPListManager) fetch() (hasNext bool, err error) {
}
list.Add(&IPItem{
Id: item.Id,
IPFrom: IP2Long(item.IpFrom),
IPTo: IP2Long(item.IpTo),
Type: item.Type,
IPFrom: utils.IP2Long(item.IpFrom),
IPTo: utils.IP2Long(item.IpTo),
ExpiredAt: item.ExpiredAt,
})
}