TwinFan / LiveTraffic

LiveTraffic is an X-Plane multiplayer plugin, which fills your sky with live air traffic based on public flight tracking data.
https://twinfan.gitbook.io/livetraffic/
Other
100 stars 25 forks source link

User Login and rate limit handling for Opensky #237

Closed fabland closed 2 years ago

fabland commented 2 years ago

Describe the bug

The Opensky API integration doesn't handle the response case 429 (Too Many Requests) correctly. This can occur due to the rate limit depending on how the API is used: https://openskynetwork.github.io/opensky-api/rest.html#limitations

To Reproduce

Steps to reproduce the behavior:

  1. Enable the Opensky integration
  2. With standard settings of 1 request every 20 seconds the limit should be reached after around 30 min

Expected behavior

The Opensky API calls should stop or back-off and not do any additional request to the API until x seconds mentioned in header pass.

Additionally to allow users to use the live Opensky API longer it would be good to allow authenticated requests to the Opensky API. For this the username and password needs to be configurable in the settings and should be passed in the request as auth header. This would allow the API to be user 10x longer for registered Opensky users.

TwinFan commented 2 years ago

…as discussed in this support thread.