Repository navigation
how to prevent WebRTC leak using mihomo #3057
Replies: 2 comments 3 replies
|
Disable WebRTC in yr browser( |
|
You don't need to detect STUN at all: a WebRTC check can only show your real IP if the STUN packets leave via DIRECT. Make every UDP flow go through a UDP-capable node and the check will show the node's IP, whatever STUN server or port the page uses. That is also why keyword/port rules don't help: many STUN servers are plain IPs on random ports. In practice the UDP leaks to DIRECT for one of three reasons. 1. The node has no With 2. System proxy mode. A browser only sends HTTP(S) to the system/HTTP proxy. WebRTC UDP never reaches mihomo and goes straight out. You need TUN (on Android/iOS, the VPN mode of the app). 3. IPv6 bypasses TUN. If you set A config that covers all three: ipv6: true
tun:
enable: true
stack: mixed
auto-route: true
auto-detect-interface: true
proxies:
- name: node
type: vless
# ...
udp: true
rules:
# ... your rules
- MATCH,PROXY
# Only reached when a UDP flow skipped every rule above because its proxy has no UDP.
# Without it, that flow goes DIRECT.
- NETWORK,UDP,REJECTThe last line is a safety net. A rule after To check: set The only thing left visible is your LAN address, and modern browsers hide it behind an mDNS |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
what rules or solutions we have to prevent WebRTC leak?
I have tested
but when checking WebRTC check, the real IP is exposed
note
All reactions