[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
if(!RTCPeerConnection){
//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: "stun:stun.services.mozilla.com"}]};
//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)
callback(ip_addr);
ip_dups[ip_addr] = true;
}
Link: https://github.com/diafygi/webrtc-ips/blob/master/index.html
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
AFAIK WebTransport != WebRTC.