speedtest icon indicating copy to clipboard operation
speedtest copied to clipboard

Get user IP behind a proxy

Open songsammy opened this issue 3 years ago • 2 comments

The original method of using $_SERVER['REMOTE_ADDR']; may not work if it is behind a proxy. However if you are using a proxy the it doesn't make sense to do telemetry.

songsammy avatar Oct 01 '21 00:10 songsammy

This is technically correct, but the user IP obtained properly from getIP.php is already in the ispinfo field.

adolfintel avatar Oct 01 '21 06:10 adolfintel

No it is not. The original line $ip = $_SERVER['REMOTE_ADDR']; assume that you are directly connected to the speed test server (well, you should be), but there's probably a proxy,a CDN, or whatever.

songsammy avatar Oct 09 '21 15:10 songsammy

As far as I see, this is already fixed

sstidl avatar Nov 04 '23 15:11 sstidl