fix: 添加POP点检测

This commit is contained in:
spiritlhl committed 2025-08-01 13:30:46 +00:00
1 parent a9d1782d53
commit 50b2c706f1
2 files changed
+254

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
package bgptools
import (
"fmt"
"testing"
)
func TestGetPoPInfo(t *testing.T) {
result, err := GetPoPInfo("66.70.153.71")
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Printf("目标 ASN: %s\n", result.TargetASN)
fmt.Println("上游信息:")
for _, u := range result.Upstreams {
abbr := getISPAbbr(u.ASN, u.Name)
fmt.Printf("AS%s - %s [%s]\n", u.ASN, abbr, u.Type)
}
}