kefu/tools/ip_test.go

19 lines
329 B
Go
Raw Normal View History

2024-12-10 02:50:12 +00:00
package tools
import (
"log"
"testing"
)
func TestGetOutboundIP(t *testing.T) {
ip, err := GetOutboundIP()
log.Println(ip, err)
}
func TestParseIpNew(t *testing.T) {
p, _ := NewIpdb("../config/qqzeng-ip-utf8.dat")
ipstr := p.Get("211.23.27.192")
log.Println(ipstr)
ipstr = p.Get("119.178.52.245")
log.Println(ipstr)
}