Closed auvik-bheesham closed 6 months ago
Example:
; go run ./cmd/ndt7-client/main.go -service-url 'wss://speedtest.example.com/ndt/v7/upload'
upload in progress with speedtest.example.com
Avg. speed : 114.6 Mbit/s
upload: complete
Test results
Server: speedtest.example.com
Client: 100.96.17.113
Upload
Throughput: 114.6 Mbit/s
Latency: 0.6 ms
The Client: 100.96.17.113
is incorrect -- we're running the server in Kubernetes behind various proxies, so it's not quite returning the expected value.
Retracted for now since I noticed a couple of other places where RemoteAddr
was being used.
In the process of being reviewed internally: https://github.com/auvik-bheesham/ndt-server/commit/81df5128c7079493ed36885f2305748e64aa0210
Updated MR here: https://github.com/m-lab/ndt-server/pull/404
When running behind a proxy the RemoteAddr in various places won't return the real client's IP. This commit uses various hints to get it, falling back to using the default.
cc @pthankappan
This change is