Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Help]: How to fake WebRTC address

See original GitHub issue

var RTCPeerConnection = window.RTCPeerConnection
                    || window.mozRTCPeerConnection
                    || window.webkitRTCPeerConnection;
                var useWebKit = !!window.webkitRTCPeerConnection;

                //bypass naive webrtc blocking using an iframe
                    //NOTE: you need to have an iframe in the page right above the script tag
                    //<iframe id="iframe" sandbox="allow-same-origin" style="display: none"></iframe>
                    //<script>...getIPs called in here...
                    var win = iframe.contentWindow;
                    RTCPeerConnection = win.RTCPeerConnection
                        || win.mozRTCPeerConnection
                        || win.webkitRTCPeerConnection;
                    useWebKit = !!win.webkitRTCPeerConnection;

                //minimal requirements for data connection
                var mediaConstraints = {
                    optional: [{RtpDataChannels: true}]

                var servers = {iceServers: [{urls: ""}]};

                //construct a new RTCPeerConnection
                var pc = new RTCPeerConnection(servers, mediaConstraints);

                function handleCandidate(candidate){
                    //match just the IP address
                    var ip_regex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/
                    var ip_addr = ip_regex.exec(candidate)[1];

                    //remove duplicates
                    if(ip_dups[ip_addr] === undefined)

                    ip_dups[ip_addr] = true;


Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

cyrus-andcommented, Mar 23, 2022

I have no idea what you’re talking about, nor I’m willing to waste my time in trying to understand such a poorly written issue.

cyrus-andcommented, May 12, 2022

AFAIK WebTransport != WebRTC.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to stop WebRTC leaks on Chrome or any browser ...
How to prevent WebRTC leaks when using a VPN on all major browsers on Windows, MacOS, iOS, and Android. VPN could leak your...
Read more >
How to Fix WebRTC Leaks (All Browsers) - RestorePrivacy
A WebRTC leak is when your external (public) IP address is exposed via your browser's WebRTC functionality. This leak can de-anonymize you via...
Read more >
How to set up WebRTC spoofing in Kameleo?
First, you can set the WebRTC to Off. In this case, your real IP can leak on the websites. · You can also...
Read more >
How to disable WebRTC and prevent leaks - NordVPN
Firefox and Chrome have a vulnerability that may leak your IP address unless you use NordVPN. Here's how to disable WebRTC.
Read more >
Any way to spoof original webrtc ip address? - Stack Overflow
For example: I using some proxy and would like to spoof my WebRTC ip address same like proxy ip address. I don't need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found