mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
测试服务器地址
This commit is contained in:
22
example/CheckHosts/main.go
Normal file
22
example/CheckHosts/main.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/injoyai/logs"
|
||||
"github.com/injoyai/tdx"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
for _, v := range tdx.Hosts {
|
||||
|
||||
c, err := tdx.Dial(v)
|
||||
if err != nil {
|
||||
logs.Errf("[%s:7709] %v", v, err)
|
||||
continue
|
||||
}
|
||||
c.Close()
|
||||
logs.Debugf("[%s:7709] 连接成功...\n", v)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user