This is an open source WOL leaderboard emulator for legacy Westwood Studios games; specifically, those hosted by CnCNet. Ideally though, this application should work with any client sending WOLv1 or WOLv2 Game Resolution packets. This application serves several REST API endpoints (documented below) to consume and post leaderboard data.
- Red Alert
- Red Alert: The Aftermath
- Tiberian Sun
- Tiberian Sun: Firestorm
- Red Alert 2
- Yuri's Revenge
- Tiberian Dawn
- Dune 2000
npm install --production
npm start
There's a few params listed below.
:game
can be any of the following^(td|d2k?|ra2?|ts|dta|fs|yr|am)$
:gameId
can only be numeric(\d+)
:player
and:clan
can be alpha-numeric with some special characters(\w\d\[\])
- GET
/ping
to ensure that the server is online
- POST
/ladder/:game
accepts gameres packet (via POST body) for the supplied:game
- GET
/ladder/:game
will return the top 150 leaderboard players for the supplied:game
- GET
/ladder/:game/game/:gameId
will return all data for a given:gameId
- GET
/ladder/:game/player/:player
will return most data for given:player
URL /ladder/:game/clan/:clan
is used for the following methods. Most of these endpoints require authorization similar to Player Authentication.
GET
will return most data for the given:clan
(does not require auth)PUT
create the given:clan
POST
willjoin
,part
ormodify
(supplied toaction
query) the given:clan
DELETE
permanently delete the given:clan
- GET
/auth/:player
HTTP authentication using Account credentials
Successful authentication of this endpoint will return an JSON Web Token which can be used to call subsequent endpoints which require auth. This endpoint uses basic HTTP authentication.
example player auth request
curl -isu Tahj:MyPassword http://localhost:4007/auth/tahj3z
- PUT
/auth/:player
using HTTP authentication
Accounts can be created using this endpoint. After an account has been created, users can then proceed to login using the Player Authentication endpoint above. Future iterations will allow consumers to additionally update Account information using this endpoint.
The below subjects outline how to extend the functionality of this project. Any help is warmly accepted and greatly appreciated! :)
Windows
set DEBUG=wol:leaderboard,-not-this
grunt serve
Mac
DEBUG=wol:leaderboard grunt serve
Leaderboard stats are stored via MongoDB. You'll need this installed for local development. You can start Mongo using the following command.
mongod --dbpath data/db