RetroAchievements / RAWeb

The RetroAchievements.org platform. Includes core functionality for managing achievements, game data, and community features.
https://retroachievements.org
GNU General Public License v3.0
272 stars 98 forks source link

add user agent information to emulator filament console #2862

Closed Jamiras closed 6 days ago

Jamiras commented 1 week ago

Allows a Release Manager to specify the User-Agent prefix for each known emulator, and starts to stub in the functionality to limit access of unknown emulators.

SQL for prod DB:

INSERT INTO emulators (id, name, original_name) VALUES (19, 'PizzaBoy GBC', 'PizzaBoy GBC'),(20, 'PizzaBoy GBA', 'PizzaBoy GBA'),(21, 'HorizonXI', 'HorizonXI'),(22, 'Non-Emulator', 'Non-Emulator'),(23, 'MelonDS', 'MelonDS'),(24, 'AetherSX2', 'AetherSX2'),(25, 'NetherSX2', 'NetherSX2'),(26, 'Firelight', 'Firelight');

INSERT INTO system_emulators (emulator_id, system_id) VALUES (19,4),(19,6),(20,5),(21,102),(23,18),(23,78),(24,21),(25,21),(26,7),(26,4),(26,6),(26,5),(26,1),(26,2),(26,3),(26,41),(26,18),(26,78);

INSERT INTO emulator_user_agents (emulator_id, client, minimum_allowed_version, minimum_hardcore_version) VALUES (1,'RAP64',NULL,'1.0'),(2,'RASnes9X',NULL,'1.1'),(3,'RAVisualBoyAdvance',NULL,'1.0.1'),(5,'RANes',NULL,'1.1'),(7,'RALibRetro',NULL,'1.4.0'),(8,'RAMeka',NULL,'1.0'),(9,'RAQUASI88',NULL,'1.1.3'),(10,'RAppleWin',NULL,'1.1.1'),(11,'RAGens_REWiND','999999',NULL),(12,'libretro',NULL,'999999'),(12,'RetroArch',NULL,'1.13.0'),(13,'PCSX2',NULL,NULL),(14,'BizHawk',NULL,NULL),(14,'EmuHawk',NULL,NULL),(15,'DuckStation',NULL,NULL),(16,'WinArcadia',NULL,NULL),(17,'PPSSPP',NULL,NULL),(18,'Dolphin','2407-68',NULL),(19,'PizzaBoyGBCBasic',NULL,NULL),(19,'PizzaBoyGBCPro',NULL,NULL),(20,'PizzaBoyGBABasic',NULL,NULL),(20,'PizzaBoyGBAPro',NULL,NULL),(21,'HorizonXI',NULL,NULL),(22,'curl','999999',NULL),(22,'python-requests','999999',NULL),(23,'melonDS-android',NULL,NULL),(24,'AetherSX2',NULL,NULL),(25,'NetherSX2',NULL,NULL),(26,'FirelightEmulator',NULL,NULL);

This PR will block emulators that are below an explicit minimum allowed version. For emulators below a minimum hardcore version, or that aren't know, messages will be written to the log. image

In the future, unknown and outdated emulators will be restricted to softcore unlocks. This allows us to see how many people are on versions that would be affected by this change before actually making it.