{"id":19454574,"url":"https://github.com/jibby-games/game-server-list","last_synced_at":"2026-05-16T06:03:39.900Z","repository":{"id":82265447,"uuid":"571793620","full_name":"Jibby-Games/Game-Server-List","owner":"Jibby-Games","description":"A generic game server browser API for the game Flappy Race","archived":false,"fork":false,"pushed_at":"2024-03-11T21:02:50.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T00:56:07.352Z","etag":null,"topics":["axum","docker","game-server","game-services","list","rust","server","server-browser","server-list"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jibby-Games.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-11-28T22:31:50.000Z","updated_at":"2024-01-14T23:20:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"65e4fd98-042c-4f14-89c7-43f09e07b129","html_url":"https://github.com/Jibby-Games/Game-Server-List","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jibby-Games%2FGame-Server-List","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jibby-Games%2FGame-Server-List/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jibby-Games%2FGame-Server-List/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jibby-Games%2FGame-Server-List/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jibby-Games","download_url":"https://codeload.github.com/Jibby-Games/Game-Server-List/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240646339,"owners_count":19834576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axum","docker","game-server","game-services","list","rust","server","server-browser","server-list"],"created_at":"2024-11-10T17:10:16.571Z","updated_at":"2026-05-16T06:03:39.895Z","avatar_url":"https://github.com/Jibby-Games.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Game Server List - Generic Server Browser API\n\nThis repo contains a generic game server list written in Rust with the Axum framework which can be\nused as an API for in-game server browsers. Uses WebSockets to connect new game servers and update\ntheir state in real time. This should work with any game engine as long as it's able to send HTTP\nrequests and start WebSocket connections.\n\nOriginally written for the open source game\n[Flappy Race](https://github.com/Jibby-Games/Flappy-Race).\nUsed as part of the [Flappy Backend repo](https://github.com/Jibby-Games/Flappy-Backend) which\ncontains other microservices for the game.\n\n## Features\n- Automatically detects IP addresses of new game servers to stop them spoofing their IP.\n- Automatically flags game servers originating from the same IP as the Game Server List as\n\"official\" ones (can be useful on the game client).\n- Unit tested\n- Can store the following info for each game server:\n  - Name: String\n  - IP: IpAddr\n  - TLS: bool\n  - Port: u16\n  - Official: bool\n  - Players: u32 (updated in real time using messages from the game server)\n  - Game ID: Option\u003cString\u003e (codes which can be used to connect to game servers, e.g. http://example.com/join/ABCD-1234)\n\n## API Overview\n- `GET /api/list/servers`: return a JSON list of active servers.\n- `WebSocket /api/list/ws`: used to connect new game servers and update their state.\n  - Must use text mode for messages\n  - Must send some initial info to create an entry for the server\n  - Can send more payloads to update game stats\n  - See below for more details.\n\n## Client Usage in Godot\nThis is how to use the API with Godot, but should work similarly for other game engines. Expects\nmessages to be sent in JSON format.\nA fully working component that implements this (including automatic reconnection) can be found in\nthe [Flappy Race repo here](https://github.com/Jibby-Games/Flappy-Race/blob/main/server/server_list_handler.gd).\n\n### 1. Starting the WebSocket Connection\n```py\n    # Create WebSocket client and connect from the game server\n    var client = WebSocketClient.new()\n    var url = \u003cURL to your server list\u003e\n    var result = client.connect_to_url(url, [\"json\"], false)\n    assert(result == OK)\n    # IMPORTANT: Must use text mode for the WebSocket!\n    client.get_peer(1).set_write_mode(WebSocketPeer.WRITE_MODE_TEXT)\n\n    # Send initial info to the server list so it can create an entry\n    var game_info := {\"name\": game_name, \"tls\": use_tls, \"port\": game_port}\n\tresult := client.get_peer(1).put_packet(to_json(game_info).to_utf8())\n\tassert(result == OK)\n```\n\n### 2. Updating Game Stats\n```py\n    # This will update the player count in the server list for the current game\n    var game_stats = {\"players\": value}\n    var result := client.get_peer(1).put_packet(to_json(game_stats).to_utf8())\n    assert(result == OK)\n```\n## Running the Server List\nCan either be compiled and run standalone or through the Docker images provided on Dockerhub at\n[`jibby/game-server-list`](https://hub.docker.com/repository/docker/jibby/game-server-list/general).\n### Docker\nDocker images are automatically built from the `main` branch for every commit.\nEnsure you have Docker installed and then run:\n```\ndocker pull jibby/game-server-list:latest\ndocker run jibby/game-server-list\n```\nSee [this page](https://hub.docker.com/repository/docker/jibby/game-server-list/general) for more\ndetails on available versions.\n### Standalone\nFirst ensure you have Rust and cargo installed on your system and then use:\n```bash\ncargo run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjibby-games%2Fgame-server-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjibby-games%2Fgame-server-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjibby-games%2Fgame-server-list/lists"}