Session Traversal Utilities for NAT (STUN).
The STUN-server (Session Traversal Utilities for NAT) uses by default the UDP protocol for data transfering, and listens on port: 3478. It is written in C++, and implements basic, core functionality of a STUN-server following the RFC 5389 document.
See: https://tools.ietf.org/html/rfc5389
The STUN-server was initially written for a volountary project in the course 'IDATT2104 Nettverksprogrammering' at NTNU Trondheim.
List of functionality to be implemented.
Implement support for TCP data transfer.
Implement support for TLS data transfer.
Use multi-threading when establishing a connection over UDP/TCP & TLS.
Add username and password for Short-Term Credential Mechanism.
See: https://tools.ietf.org/html/rfc5389#page-22
Create an ERROR-CODE attribute, and handle the processing of an error response.
See: https://tools.ietf.org/html/rfc5389#page-20
Optional mechanism for STUN that aids in distinguishing STUN messages from packets or other protocols.
See: https://tools.ietf.org/html/rfc5389#page-20
Allow a client to use DNS to determine the IP address and port of the server.
See: https://tools.ietf.org/html/rfc5389#page-21
Refactor code into multiple files, and improve code quality and readability.
Used to run the STUN-server in an isolated container.
See: https://docs.docker.com/compose/
Used for logging the STUN-server.
See: https://github.com/easylogging/
The project requires the following to be installed locally on your computer (Dependencies):
-
Docker
-
Docker Compose
Clone the repository.
Change directory to the root folder of the project:
cd stun
Start the STUN-server:
docker-compose up --build
To test the STUN-server, it is recommended to use a third-party STUN-client, e.g. STUNTMAN.