Skip to content

NEX Overview (Game Servers)

Yannik Marchand edited this page May 21, 2022 · 26 revisions

NEX is Nintendo's networking library for game servers. Almost all 3DS, Wii U and Switch games with online features use NEX.

Nintendo hasn't written it from scratch. It is based on Quazal Rendez-Vous, so some things like the PRUDP Protocol may be seen in other games that use Quazal.

In 2021, Nintendo released NPLN, a modern replacement for NEX.

Finding the game servers

Every platform has its own way to find a game server. A list of game server ids can be found here.

3DS The game server location is requested from the NASC server (LOGIN)
Wii U The game server location is requested from the account server (/provider/nex_token/@me)
Switch The game server is found by DNS lookup: g<game server id>-lp1.s.n.srv.nintendo.net

This is the location of the authentication server.

The protocols used by NEX

At the highest level, NEX provides a bunch of services. Each service provides one or more methods. To achieve this, NEX uses a simple RMC protocol (remote method call). Whenever a game wants to call a method on a service, NEX builds an RMC request and sends it through the underlying connection.

The underlying protocol varies per game and platform. Originally, the purpose of PRUDP was to reliably send UDP packets. Starting with Nintendo Switch, NEX also supports TCP and WebSocket as underlying protocol however.

3DS Packets are encoded using PRUDP V0 or PRUDP V1
Wii U Packets are normally encoded using PRUDP V1. Only one server still uses PRUDP V0: the friends server.
Switch Switch games use PRUDP Lite on top of WebSockets.

Authentication

Every game server actually consists of two servers: an authentication server and a secure server. After retrieving login information elsewhere, NEX connects to the authentication server. This server only provides a single service: the ticket granting service.

For more details on authentication and the steps that are required to connect to the secure server, read the page about kerberos authentication.

Clone this wiki locally