fix: 更新修复backtrace线路检测的IPV6路由检测启用的判断条件

This commit is contained in:
spiritlhl
2025-07-27 02:32:33 +00:00
parent 39be183fda
commit 94e0441801
6 changed files with 23 additions and 6 deletions

View File

@@ -6,7 +6,17 @@ import (
"time"
)
func TestCheckPublicAccess(t *testing.T) {
// func TestCheckPublicAccess(t *testing.T) {
// timeout := 3 * time.Second
// result := CheckPublicAccess(timeout)
// if result.Connected {
// fmt.Printf("✅ 本机有公网连接,类型: %s\n", result.StackType)
// } else {
// fmt.Println("❌ 本机未检测到公网连接")
// }
// }
func TestBasicsAndSecurityCheck(t *testing.T) {
timeout := 3 * time.Second
result := CheckPublicAccess(timeout)
if result.Connected {
@@ -14,4 +24,8 @@ func TestCheckPublicAccess(t *testing.T) {
} else {
fmt.Println("❌ 本机未检测到公网连接")
}
basicInfo, securityInfo, nt3CheckType := BasicsAndSecurityCheck("zh", "ipv4", false)
fmt.Println(basicInfo)
fmt.Println(securityInfo)
fmt.Println(nt3CheckType)
}