mirror of
https://github.com/oneclickvirt/backtrace.git
synced 2026-11-24 23:39:41 +08:00
feat(dns): prepare backtrace v0.0.21
This commit is contained in:
1 parent
e83eb23302
commit
16e551b631
15 files changed
+461
-373
No files matched your search
+5
-1
@@ -2,11 +2,15 @@ package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestCheckPublicAccess(t *testing.T) {
|
||||
if os.Getenv("BACKTRACE_INTEGRATION") != "1" {
|
||||
t.Skip("set BACKTRACE_INTEGRATION=1 to run live public-access checks")
|
||||
}
|
||||
timeout := 3 * time.Second
|
||||
result := CheckPublicAccess(timeout)
|
||||
if result.Connected {
|
||||
@@ -14,4 +18,4 @@ func TestCheckPublicAccess(t *testing.T) {
|
||||
} else {
|
||||
fmt.Println("❌ 本机未检测到公网连接")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user