0

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.

Dan
  • 2,304
  • 6
  • 42
  • 69

1 Answers1

-1

ipinfo.io

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:

  • 1,000 requests per day

Reference