Comment by escapecharacter
2 years ago
My quick hack would be to establish a websocket connection, and send a random stream of numbers to the client. If the client didn't return the number within a ping threshold, block their access.
2 years ago
My quick hack would be to establish a websocket connection, and send a random stream of numbers to the client. If the client didn't return the number within a ping threshold, block their access.
hm but it would block your crazy next-door neighbor who only uses curl.
To get a good server-client-server roundtrip with only HTTP/1.1, I'd personally try using a temporary redirect, maybe a 307.
Sadly I imagine this would also block people on poor connections such as cellular, satellite or Tor.
I feel that wouldn't be a concern in this case, given that the goal to begin with is to block the majority of the planet on a geographic basis
Sure, but then you have the really interesting challenge of trying not to block your next door neighbour who’s accessing your service via tor/satellite.
2 replies →
Or Wi-Fi, I've had atrocious pings between two systems on the same AP https://www.benkuhn.net/wireless/