OGame API Proxy Server

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • OGame API Proxy Server

      Hi there,

      as it's not simple or "fast" to get access to OGames Report and Statistics API, I implemented a Proxy Server, as some may wan't to play with the API.
      Features:
      - Caching of reports retrieved by their api-id (kept for 1 week inside the cache)
      - Caching of statistics retrieved by date+delta (kept for 5 minutes, as the info will change often)
      - Ratelimiting, currently 5 requests per 60 seconds per IP-Address, but can be changed by the operator of the apiserver
      - IPv6 compatible (the current API and all OGame Servers don't have this feature)
      - Sending through the requesters real-ip using the "X-Forwarded-For" Header (-> which would enable GameForge blocking abusive use of the apiserver instead of invalidating the APIKEY)
      - OpenSource, so everyone can host their own instance of it for caching and proxiing (-> gitlab.faw-kes.de/ogame/apiserver will be pushed to github aswell)
      - One entrypoint for _all_ report types (Spy-, Combat-, Missile- and Recycle-Report)
      - Every errormessage from OGames backend will get transmitted through, defective API-IDs of reports won't get cached as they could be available a few minutes later


      This project was inspired by @NoMoreAngel s apireader.

      Wan't to test? -> ogapi.rest/


      Last but not least, the roadmap for the future:
      - OGame Style REST-API points, so you'd just need to change your format string
      - own APIKEY system for higher ratelimits for registered users (+ new Header with Userinformation -> which would enable GameForge blocking abusive use of the apiserver instead of invalidating the APIKEY)
      - Testing if we can find more performance. Cached Access is at around 50ms, Access with Backendcall to OGame takes around 100ms (maybe php is to slow, maybe redis sucks, we will see)


      For this project I'd like to have a global functional APIKEY to be able to offer this service to other programmers out there.
      IP Adress for the productive system will be sent over by PM, just need to know who to bother ;)

      Kalinka

      The post was edited 1 time, last by Kalinka ().