“WebRTC leak” means: a web page has obtained a public IP through WebRTC, and that IP is different from your proxy's exit IP. Most of the time, the IP it gets is your real home broadband IP — which is exactly the problem a webrtc leak fix solves.
First, three terms that will come up throughout:
- Exit IP: the “you” that websites see — the address you appear as after going through your proxy.
- UDP: a network transport method used by video calls, games, and WebRTC. Many proxies only forward TCP for web traffic and ignore UDP.
- TUN mode: a switch in the client. When it's on, all traffic on your computer (including UDP) goes through the client first.
There are two paths to a webrtc leak fix; start with the simple one.
- Path one (try this first): turn on TUN mode in the client, confirm the node supports UDP, then test again. Three steps, all switches — no config files. Most people are done here.
- Path two (only if path one fails): limit WebRTC at the browser level, e.g. Firefox's
about:config. This is an advanced approach, and the trade-off is that web video calls may stop working.
This check has nothing to do with whether your exit IP is good or bad. Changing settings can fix it.
First, confirm which client you're using
All the steps below are written for “Clash Verge Rev”, because it's the most common one on computers. If you're using something else, check first:
| What you see | What you're using | What to do |
|---|---|---|
| Vertical menu on the left with “Settings / Subscriptions / Connections / Logs” | Clash Verge Rev | Follow the steps in this article directly |
| Dark interface with “Proxy / Rules / Global” at the top | Clash for Windows (no longer maintained) | The switch is in “Settings → TUN mode” |
| Very simple interface with only a node list and a switch | v2rayN | No TUN switch; see “Other clients” at the end |
| A rocket icon on your phone | Shadowrocket | See the “How to do it on phones” section |
Can't tell? No problem: open the client and look for a switch labeled “TUN”, “virtual network card”, or “enhanced mode”. If it's there, follow path one; if not, skip to the fallback at the end.
What is this check looking for? (skip if you don't care about the theory)
WebRTC is a browser technology for audio and video calls (spec: W3C WebRTC). It uses UDP to connect to a STUN server, and the STUN server tells the browser “the public address it sees for you”, which the web page can then read. The STUN protocol is defined in RFC 5389.
The test page makes the browser send these kinds of requests and checks whether the address it gets is the same as your proxy exit. Go to WebRTC leak test to see which addresses your browser exposes.
Why it leaks: many proxy setups only handle TCP. For example, an HTTP proxy set in the browser or a system proxy doesn't handle UDP. So the web page goes out through the proxy, but WebRTC's UDP goes straight out from your local network, and STUN sees your real IP. For a comparison of what system proxy and TUN mode each handle, see The difference between system proxy and TUN mode.
Path one: the three simplest steps for a webrtc leak fix
Step 1: Turn on TUN mode in the client
TUN mode creates a virtual network card. All traffic on the system (including UDP) goes through the client first, and then the rules decide whether it goes through the proxy or direct. This fixes the root cause: it doesn't break normal WebRTC use on web pages (video meetings, etc.), and it doesn't leak.
Where's the switch: in Clash Verge Rev, click “Settings” in the left menu, scroll down to “Virtual network card mode” (some versions call it TUN mode), and turn it on.
Two places where people get stuck:
- Windows: the first time you turn on TUN, the client asks you to install a background service (called “Service Mode” in the client). You need to agree and give administrator permission. If the service isn't installed, the TUN switch flips back off by itself — it looks on, but it isn't.
- macOS: when you turn it on, the system shows an authorization dialog asking to “allow adding network configuration”. Click allow. If you accidentally clicked deny, go to “System Settings → Privacy & Security”, authorize again, and come back and turn it on again.
How to confirm it's really on: turn off “System proxy” in the client. If the browser can still open web pages, traffic is being picked up by the virtual network card.
Step 2: Confirm the node supports UDP
TUN can be on and it can still leak, because the other end of the tunnel may not be willing to forward UDP. Check two things:
- The node protocol supports UDP forwarding. Common protocols like Shadowsocks, Trojan, VMess, VLESS, and Hysteria generally do; a pure HTTP proxy does not support UDP, and no client will change that.
- UDP isn't turned off in the subscription or config. Some configs set
udp: falsefor a node. TUN can't save you then — change it totrueor delete that line.
If you use a chain proxy (relay + exit, two layers), both hops need UDP. Turning it on for only one still leaks. For exactly which three places to check, see clash chain proxy config.
Step 3: Test again
Go back to WebRTC leak test and test again. Check whether the “WebRTC exit” column and the proxy exit are the same IP. Then go back to the scenario check page, click “Fixed, test again” under the conclusion, and see whether this item has turned to passed.
You can stop here. What follows is for people who still want to tinker — read on only if path one didn't pass.
Path two: limit WebRTC at the browser level (advanced, optional)
If you can't turn on TUN mode for now (for example, a work computer won't let you install a system service, or you only have browser permissions), you can limit WebRTC to the proxy at the browser level. This is a fallback — prefer path one. If this section doesn't make sense, skip it; path one is enough.
Firefox (the most reliable option on this path)
- Type
about:configin the address bar and click “Accept the Risk and Continue”. - In the search box, type
media.peerconnection.ice.proxy_only. - Double-click to change it from
falsetotrue, so WebRTC only goes through the proxy. - If you don't need web video calls at all (Tencent Meeting web version, Google Meet, etc. all count), you can also search for
media.peerconnection.enabled, double-click it tofalse, and turn WebRTC off entirely.
Chrome / Edge
Chrome doesn't have this switch built in. The old common workaround was to install Google's official extension “WebRTC Network Limiter” and choose “Use my proxy server” in its options. But a warning: this extension hasn't been updated in a long time, and on some versions it may not work or may not install, and Google hasn't clearly said it will keep maintaining it. So don't treat it as a reliable solution:
- If you can still install it from the extension store, you can try it. After installing, you must actually test it — only count it as working if the WebRTC exit matches the proxy exit.
- If you can't find it, can't install it, or it still leaks after installing, go straight back to path one. There is no official built-in alternative at the browser level.
- If your work computer won't let you install extensions, skip this one and use global TUN instead.
Safari
Safari has no separate switch. Go back to path one and make UDP go through the proxy at the system level.
How to do it on phones
Phone clients usually run in VPN mode, which already takes over all traffic, so WebRTC leaks are less common than on computers. But “less common” doesn't mean never. If you still detect a leak, check the following.
iPhone (Shadowrocket)
- Confirm it's really taking over globally: on the home screen, set “Global Routing” to “Config” or “Proxy”, and turn on enhanced mode. Choosing “Direct” means the proxy isn't on at all. For what the four options mean, see Shadowrocket global routing: config or proxy.
- Turn on UDP forwarding for the node: in the node settings, find the UDP-related switch (names vary slightly by version) and confirm it's on. If the node protocol itself doesn't support UDP, turning this on won't help.
- Turn off IPv6: if the mobile network has IPv6 and the proxy only handles IPv4, IPv6 traffic goes out directly. If you're not sure, turn off IPv6 in settings.
- Browser: Safari on iOS has no WebRTC switch, so ignore this one. If you installed Chrome on iPhone, it handles it the same way as the desktop version — only through extensions, which is unreliable — so test with Safari directly.
Android
On Android, Clash-family clients (Clash Meta for Android / FlClash, etc.) and apps like v2rayNG work the same way as on computers:
- Turn on VPN / TUN mode: in Clash-family clients, open “VPN” or “TUN” in “Settings”. The first time, it asks for permission to establish a VPN connection — click allow. In v2rayNG, tap the connect button in the bottom right; it's in VPN mode by itself.
- Confirm the node supports UDP: in Clash-family clients, check
udp: truein the node config; in v2rayNG, confirm in settings that UDP forwarding isn't turned off. - Turn off IPv6: same as iPhone — IPv6 is a common leak point.
- Browser: Chrome on Android also has no built-in switch, so it relies on TUN. You can also use Firefox for Android; the
about:configmethod is the same as on desktop.
How to confirm after changing?
Don't skip this step. A lot of configs look right but still leak. If you don't test once, it's the same as not changing anything.
- Fully quit and reopen the browser (on macOS, use Command + Q to quit, not just close the window; on Windows, make sure there's no leftover process in the taskbar), and restart the proxy client once too.
- Go to WebRTC test and test again. Look at the “WebRTC exit” column:
- Same IP as the proxy exit: fixed.
- Shows your real local IP: still leaking. Go back and check whether TUN is really up and whether the node supports UDP.
- Shows “not available”: WebRTC is limited or turned off. If it can't get an address, it can't leak — that's a normal state, not a failure.
- Go back to the scenario check page, click “Fixed, test again” under the conclusion, and see whether this item has turned to passed.
No command line, no logs — that column on the test page is the final answer.
Still leaking after all three steps?
Do these three things in order; don't keep changing the same thing over and over:
- Try a different client. With the same node, try Clash Verge Rev or v2rayN and turn on TUN again. This rules out “this client didn't install its service properly on your system”.
- Try a different node. Some node servers simply don't have UDP forwarding enabled, and no client setting will help.
- If it still doesn't work, register your need on the test page. Leave an email under the scenario check result and write down the exit IP, the client you're using, and which step you're stuck on. We'll help you see which link is broken.
If the test shows “not available” rather than your real IP, that's not a leak anymore — no need to keep tinkering.
FAQ
Do I need to restart the browser after changing?
Yes. After changing the config, the browser may still be using the old connection state. Fully quit the browser (not just close the tab) and restart the proxy client too, then test again — only then is the result accurate.
Where is the TUN switch?
In Clash Verge Rev, it's in “Settings” on the left; look for “Virtual network card mode” (some versions say TUN). On Windows, the first time you turn it on you need to install Service Mode and give administrator permission; on macOS, you need to allow adding network configuration. If you don't complete these steps, the switch flips back by itself.
Is there a reliable way to turn off WebRTC on Chrome?
There's no official built-in switch. Either turn on TUN so UDP goes through the proxy, or switch to Firefox and change about:config. Don't install extensions from unknown sources for this.
Do I need separate settings on phones?
iPhone's Shadowrocket and Android's Clash-family clients usually run in VPN mode, which already takes over all traffic, so leaks are less common than on computers. If it still leaks, check three things: whether global routing is “Config” or “Proxy”, whether the node's UDP forwarding is on, and whether IPv6 is off.
Is a WebRTC leak related to exit IP quality?
No. It's caused by local UDP not going through the proxy, and changing settings fixes it. Whether the exit IP itself is affected by things like datacenter ranges, blacklists, or proxy flags is a different matter — changing settings won't help there; you need a different IP.



