Is there any way, using pure JavaScript (no APIs, externals), to detect the IP address and port number of the proxy being used by the browser?
I don't need to know the IP address that the proxy is hiding, just the proxy IP.
Is there any way, using pure JavaScript (no APIs, externals), to detect the IP address and port number of the proxy being used by the browser?
I don't need to know the IP address that the proxy is hiding, just the proxy IP.
Try it: https://ipinfo.io/json
$.getJSON('https://ipinfo.io/json', function(data) {
console.log(JSON.stringify(data, null, 2));
});
Returns:
{
"ip": "39.63.18.86",
"city": "Gujranwala",
"region": "Punjab",
"country": "PK",
"loc": "32.1617,74.1883",
"postal": "38850",
"org": "AS45595 Pakistan Telecom Company Limited"
}
Limitations: