feat(log): 添加QQWry IP数据库支持并实现IP地址解析功能

This commit is contained in:
1
2025-11-03 16:19:24 +00:00
parent e86e138d94
commit abaa51af38
7 changed files with 43 additions and 3 deletions

1
common/utils/qqwry Submodule

Submodule common/utils/qqwry added at 1dd385f77d

17
common/utils/tcpping.go Normal file
View File

@@ -0,0 +1,17 @@
package utils
import (
"net"
"time"
)
func TcpPing(address string) (n int64, err error) {
s := time.Now()
tcpConn, err := net.Dial("tcp", address)
n = time.Now().Sub(s).Nanoseconds()
if err != nil {
return
}
tcpConn.Close()
return
}