IP address check as per Geo-Location | Example with Omegle

Опубликовано: 24 Февраль 2026
на канале: Nepal Tech Hub
644
16

This is the tutorial about Networking and IP addresses.

Required code for example
---------------------------------------------------------------------------------------------------------------------
window.oRTCPeerConnection = window.oRTCPeerConnection || window.RTCPeerConnection

window.RTCPeerConnection = function(...args) {
const pc = new window.oRTCPeerConnection(...args)

pc.oaddIceCandidate = pc.addIceCandidate

pc.addIceCandidate = function(iceCandidate, ...rest) {
const fields = iceCandidate.candidate.split(' ')

if (fields[7] === 'srflx') {
console.log('IP Address:', fields[4])
}
return pc.oaddIceCandidate(iceCandidate, ...rest)

}

return pc
}

-----------------------------------------------------------------------------------------------------------------------
URL for IP lookup - https://whatismyipaddress.com/ip-lookup

URL for more learning -- https://www.cisco.com/c/en/us/support...


Please comment below your queries I will try my best to answer them.