Skip to content

Commit 942e72f

Browse files
authored
Merge pull request #11 from dongdigua/main
Create 2026-06-10-ap-isolation.md
2 parents ecc96a3 + 70c634f commit 942e72f

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

docs/2026-06-10-ap-isolation.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# AP 隔离下的内网互连
2+
3+
> :fontawesome-regular-face-grin: dongdigua
4+
>
5+
> :material-clock-edit-outline: 2026年6月10日 14:00:00
6+
7+
众所周知,咱学校同一 AP 下的设备不能互连,而不同 AP,或者 Wi-Fi 与网线设备之间能。
8+
当手机和电脑在同一间寝室/教室时(显然这很常见)无法通过 LocalSend 互传文件。(用微信/QQ传文件真的很不优雅好吧)
9+
10+
但我发现 `magic-wormhole.rs` 却能做到直链连接,抓包发现是 STUN 打洞连到了学校的出口 IP 然后 NAT 回环再绕回来。
11+
基于 WebRTC 的方案比如 pairdrop 也是通过 NAT 回环直连。
12+
13+
![](assets/webrtc.png "vibe 的一个 WebRTC overlay 用户脚本")
14+
15+
(这也是为什么之前在内网部署 Screego 自带的 STUN 完全没用,因为内网的 STUN 只能返回 peer 的内网 IP)
16+
17+
结论:STUN 必须放到公网。

docs/assets/webrtc.png

35.6 KB
Loading

0 commit comments

Comments
 (0)