更好地支持IPv6/优化IP名单内存用量

This commit is contained in:
GoEdgeLab
2024-04-06 10:07:39 +08:00
parent 6fc0067fed
commit 5d9b5baf59
13 changed files with 254 additions and 241 deletions

View File

@@ -6,15 +6,6 @@ import (
"testing"
)
func TestIP2Long(t *testing.T) {
t.Log(utils.IP2LongHash("0.0.0.0"))
t.Log(utils.IP2LongHash("1.0.0.0"))
t.Log(utils.IP2LongHash("0.0.0.0.0"))
t.Log(utils.IP2LongHash("2001:db8:0:1::101"))
t.Log(utils.IP2LongHash("2001:db8:0:1::102"))
t.Log(utils.IP2LongHash("::1"))
}
func TestIsLocalIP(t *testing.T) {
var a = assert.NewAssertion(t)
a.IsFalse(utils.IsLocalIP("a"))