Skip to content

PretendoNetwork/nncs

NAT Check Server

Used to detect NAT properties to perform NAT traversal

Consoles require a primary and secondary server (nncs1.app.nintendowifi.net and nncs2.app.nintendowifi.net respectively), each with a primary and secondary port (10025 and 10125 respectively) and each server MUST be differing public IP addresses.

Meaning the nncs1.app.nintendowifi.net:10025, nncs1.app.nintendowifi.net:10125, nncs2.app.nintendowifi.net:10025, and nncs2.app.nintendowifi.net:10125 must all exist and nncs1 and nncs2 can NOT point to the same IP address

Implemented message types

See function comments for message type details

  • Message type 1
  • Message type 2
  • Message type 3
  • Message type 4
  • Message type 5
  • Message type 101
  • Message type 102
  • Message type 103

Additional messages

Clients can also be seen sending messages to port 33334 and 33335 of NNCS1, however these messages never get replies. Because of the lack of responses, these messages are not handled here. Messages to port 33334 seem to always be 16 null bytes, whereas messages to port 33335 seem to always be 56 bytes of mostly static data.

Configuration

Configurations are loaded through environment variables. .env files are supported. IP addresses are assumed to be pointing at the same server, though they must be different IP addresses, so both are required.

Environment variable Description Required
PN_NNCS1_IP_ADDRESS IP address for the NNCS1 server Yes
PN_NNCS2_IP_ADDRESS IP address for the NNCS2 server Yes
PN_NNCS_LOCAL_IP_ADDRESS Local IPv4 address of the server. If not set or is not a valid IPv4 address, the server will use the first private IPv4 address it can find. If a private IPv4 cannot be found and one is not set, the system will default to 127.0.0.1 No

About

NAT Check Server

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published