https://github.com/lucasteles/udplobbychat
UDP hole punch chat with Lobby
https://github.com/lucasteles/udplobbychat
Last synced: 6 months ago
JSON representation
UDP hole punch chat with Lobby
- Host: GitHub
- URL: https://github.com/lucasteles/udplobbychat
- Owner: lucasteles
- Created: 2024-03-14T21:15:19.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-11T23:15:28.000Z (over 1 year ago)
- Last Synced: 2025-02-11T13:59:45.480Z (8 months ago)
- Language: C#
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# UDP Lobby Chat
Basic UDP Chat to test NAT traversal techniques.
### UDP Punching Hole
Use a lobby server which connects and presents peers to each other with their exposed IPs and Ports.
The server runs almost `http`. It keeps a slide cache of the lobbies information. And it also exposes an UDP port to
capture the endpoint of an already logged client.## Getting Started
### Dependencies
* [.NET 8](https://dotnet.microsoft.com/en-us/download)
### Build
At the solution directory on command line
```sh
dotnet build
```## Usage
Running from the solution directory
### Server
```bash
dotnet run --project .\LobbyServer
```- Default **HTTP**: `9999`
- Default **UDP** : `8888`> 💡 Check the swagger `API` docs at http://localhost:9999/swagger
### Clients
The default client configuration is defined on this [JSON file](/LobbyClient/appsettings.json) which looks like:
```json
{
"LobbyRoomName": "udp_chat",
"LocalPort": 9000,
"LobbyServerUrl": "http://localhost:9999",
"LobbyUdpPort": 8888
}
```To start a single client just run:
```sh
dotnet run --project .\LobbyClient
```You can override some of the default configurations via command args which can be helpful to start another client
without a port conflict.```sh
dotnet run --project .\LobbyClient -LocalPort 9001
```Overriding server URL and UDP Port:
```bash
dotnet run --project .\LobbyClient -LobbyServerUrl "https://lobby-server.fly.dev" -LobbyUdpPort 8888
```