Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Then they aren’t your neighbor if their route goes half way around the world, are they?


Depends on the satellite; the ISS orbits at 211 miles, which means that it would be close enough to send a 500-mile email if it's flying directly overhead. :P


Or Wi-Fi, I've had atrocious pings between two systems on the same AP https://www.benkuhn.net/wireless/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: