mpolden / echoip

IP address lookup service
https://ifconfig.co
BSD 3-Clause "New" or "Revised" License
4.01k stars 526 forks source link

request for number previews requests from my ip #151

Closed warichnict closed 2 years ago

warichnict commented 2 years ago

After reading the page entirely, without being able to switch out my pedantic brain, i found out that i am not allowed to do more then one automatic request per minute. If that is the case and i would, which i am not going to, writing this just for the sake of thinking about it, plan to write an little desktop or mobile app that informs/notifies the user of maybe a public wifi (or whatever is in use) if the public ip address of the connection changes, the programmer would have to have a possibility to check for the number of previews requests... sth like ifconfig.co/preq which just gives back the number answered requests within the last 3h or so... The programmer could then divide this number by 3*60 and would then guess the the number of clients in use to implement a throttle in updates (infact he would start with one request all 5 minutes or so, but if the value hits 4 he would have to increase that number to lets say 10 minutes and go exponentially up till once a hour and afterwards just showing an error message...

Just thinking of a way to implement such a thing without running into 429 (assuming that requests will be first replied with that status code and only afterwards completely drooped) and only then shutting down..

Sorry for writing this message, i guess i have to much time on my hand, just ignore it, i am not trying to fish for more information of your DOS-protection, if i would really be going to write such an piece of software i would host my own service and only use urs if mine is not reachable...

maximbaz commented 2 years ago

Requests to /preq would count towards your limit, which would be only to harm your case, not improve it. Why don't you simply count requests on client side, choose a reasonable request rate to start with, and keep reducing the rate until you stop getting 429, and if the rate gets unbearably slow for you, selfhost echoip yourself? 🙂

warichnict commented 2 years ago

cause i hoped to explain, if i am in a public wifi or so, i dont know how many other software is requesting information froum ur service...

its highly theoretical and my english isnt able to explain it, rather a joke i had after reading your faq cause a lawyer wouldnt be able to understand what you mean by that and thereby not use your wanderfull service.

guess i close this issue and dont take any more of your time