Skip to content

[Cheats] Middleware proxy server for GameHacking.org cheat lookup #3072

Description

@github-actions

Summary

GameHacking.org is a rich source of cheat codes covering many retro gaming systems, but has no public API. The current implementation (GameHackingOrgLookup.swift) uses an HTML scraper that works but is fragile — it will break if GameHacking.org changes its page structure.

A thin middleware/proxy server would provide:

  • Stability: Scraping logic lives server-side; no app update needed when site changes
  • Caching: Server-side cache reduces load on GameHacking.org
  • Normalization: Consistent JSON response regardless of source site changes
  • Future extensibility: Add more cheat sources (NoCash, other sites) without app updates
  • Rate limiting: Centralized rate limiting prevents the app from being blocked

Proposed Architecture

The app calls a thin proxy: GET /cheats?title=<title>&system=<slug>

The proxy scrapes GameHacking.org (with 24h server-side cache) and returns a JSON array of cheat entries.

Implementation Notes

  • Language: Node.js/Bun, Go, Python, or Cloudflare Workers (recommended)
  • Hosting: Cloudflare Workers (free tier ~100k req/day), Fly.io, or JoeMatt's VPS
  • Endpoint: GET /cheats?title=<title>&system=<slug> returns JSON cheat array
  • Cache: KV store with 24h TTL per (title, system) pair
  • App integration: Replace GameHackingOrgLookup with a simple JSON REST call

In-App Fallback

The current in-app HTML scraper (GameHackingOrgLookup.swift, added in #3069) serves as a working fallback until this middleware is deployed. When the middleware is available, the app can prefer it via a PVSettings toggle or remote config flag.

References

Part of #2505

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cheatsCheat code systemenhancementimprovements, enhancements, new features, additions

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions