Skip to content

PasteFerry (隔空贴): clipboard and file sync across macOS, Windows and Linux. Direct-first, end-to-end encrypted. Optional official access: no server to host. Independent self-hosting remains available.

test(core): isolate local pairing checks from public STUN

baiyuzea4629e0aa833
diff --git a/client-core/internal/peers/manager_test.go b/client-core/internal/peers/manager_test.go
index 3ad9981..d657a0e 100644
--- a/client-core/internal/peers/manager_test.go
+++ b/client-core/internal/peers/manager_test.go
@@ -234,6 +234,9 @@ func TestServerOnlyPairingStillWorks(t *testing.T) {
cfg := config.Default()
cfg.SignalingURL = "ws" + strings.TrimPrefix(srv.URL, "http") + "/signal"
cfg.LANDisabled = true
+ // This fixture has a local signaling server and no external STUN service.
+ // Public probe reachability must not decide whether local pairing passes.
+ cfg.OnlyOwnSTUN = true
a, b := newDevice(t, "a", nil, cfg), newDevice(t, "b", nil, cfg)
waitFor(t, "连上服务器", func() bool { return a.m.Connected() && b.m.Connected() })