Fork of PretendoNetwork/super-mario-maker for setups that do not run the Pretendo account server. Licensed AGPL-3.0, same as upstream. Changes:
- Login tokens are validated locally (
PN_NEX_TOKEN_AES_KEY) and NEX passwords derived fromPN_NEX_PASSWORD_SECRET, so no account gRPC service is needed. - The legacy
SecureConnection::Registermethod is enabled (the retail client sends it). - New:
GetCustomRanking(star rankings of makers and courses, windowed period IDs, with a fallback to the latest period that has data),LatestCourseSearchObject(newest courses),ScoreRangeCascadedSearchObjectandBestScoreRateCourseSearchObject(100 Mario / Course World lists; theirextraDatafilters are logged but not fully decoded yet, random or star-ranked courses are returned). RecommendedCourseSearchObjectmay return up to 100 courses (100 Mario needs 32+ after filtering).- The Dothub HTTP API (
wup-ama.app.nintendo.net: pickup, cleared_courses, playlist) is not implemented, soDOTHUB_ENABLEDis 0.
Tested on Cemu with the v272 EUR update only.
Includes both the authentication and secure servers. Works on both WiiU and 3DS
This server requires an S3 compatible server to store user generated content. The WiiU and 3DS only support TLS versions 1.0 and 1.1 with RSA SSL ciphers, so an S3 server supporting these is required. The server must also support presigned POST URLs. This does not leave many options, as nearly all S3 cloud providers no longer support one of these 2 things. Even AWS, the creators of S3 and the provider Nintendo uses, is dropping support for TLS versions below 1.2 in December 2023
For this reason, the recommended setup is using MinIO to self host your S3 server and using Cloudflare Tunnels to act as your reverse proxy. Tunnels support TLS versions 1.0 and 1.1 with the required ciphers, essentially using it as a TLS proxy. This does come at some cost, and you now must manage data storage and security yourself through MinIO, but there are no other options at this time outside of self hosting
Install Go and git, then clone and enter the repository
$ git clone https://github.com/PretendoNetwork/super-mario-maker
$ cd super-mario-makerTo compile using Go, go get the required modules and then go build to your desired location. You may also want to tidy the go modules, though this is optional
$ go get -u
$ go mod tidy
$ go build -o build/super-mario-makerThe server is now built to build/super-mario-maker
When compiling with only Go, the authentication servers build string is not automatically set. This should not cause any issues with gameplay, but it means that the server build will not be visible in any packet dumps or logs a title may produce
To compile the servers with the authentication server build string, add -ldflags "-X 'main.serverBuildString=BUILD_STRING_HERE'" to the build command, or use make to compile the server
Compiling using make will read the local .git directory to create a dynamic authentication server build string, based on your repositories remote origin and current commit
Install make either through your systems package manager or the official download. We provide a default rule which compiles using go
To build using go
$ makeThe server is now built to build/super-mario-maker
All configuration options are handled via environment variables
.env files are supported
| Name | Description | Required |
|---|---|---|
PN_SMM_POSTGRES_URI |
Fully qualified URI to your Postgres server | Yes |
PN_SMM_AUTHENTICATION_SERVER_PORT |
Port for the authentication server | Yes |
PN_SMM_SECURE_SERVER_HOST |
Host name for the secure server | Yes |
PN_SMM_SECURE_SERVER_PORT |
Port for the secure server | Yes |
PN_SMM_CONFIG_S3_ENDPOINT |
S3 server endpoint | Yes |
PN_SMM_CONFIG_S3_ACCESS_KEY |
S3 access key ID | Yes |
PN_SMM_CONFIG_S3_ACCESS_SECRET |
S3 secret | Yes |
PN_SMM_CONFIG_S3_BUCKET |
S3 bucket | Yes |
PN_SMM_CONFIG_S3_KEY_BASE |
S3 Key prefix | Yes |
PN_SMM_GRPC_SERVER_PORT |
Port for the GRPC server (leave empty to disable it) | No |
PN_NEX_TOKEN_AES_KEY |
AES-256 key (64 hex chars) used to open login tokens | Yes |
PN_NEX_PASSWORD_SECRET |
HMAC secret (hex, 32+ bytes) used to derive per-PID NEX passwords | Yes |
PN_SMM_GRPC_API_KEY |
API key for your GRPC server | No (Assumed to be an open gRPC API) |