| Name | Description |
|---|---|
| RtcServer | Contains the server implementation. |
| RtcServerTests | Contains unit and basic integration tests for checking the functionality of the server. |
1. Create a config.json file in the RtcServer directory
or specify the required environment variables.
Config file example:
{
"QuicPort": 7172,
"HttpPort": 8080,
"AuthorizationUri": "http://localhost:8080/auth/allow-all",
"LogLevel": 0
}Environment variables:
- RTC_SERVER_QUIC_PORT
- RTC_SERVER_HTTP_PORT
- RTC_SERVER_AUTH_URI
- RTC_SERVER_LOG_LEVEL
Note
/auth/allow-all is a builtin endpoint for testing, that accepts all clients.
The log level is specified using a LogLevel value.
2. Run the RtcServer project using the dotnet CLI tool.
dotnet run --project RtcServer
User authentication can be achieved by creating a web server
and an endpoint which accepts POST requests and specify it for the server using AuthorizationUri.
When a client connects to the server it sends a POST request to the URI specified by AuthorizationUri,
that contains an AuthorizationRequest object as JSON.
The server accepts the client if the specified web server responds with a successful status code within 5 seconds. Otherwise, it aborts the connection.
| Method | Path | Description |
|---|---|---|
| POST | /auth/allow-all |
For testing purposes only, can be specified for the AuthorizationUri. |
| GET | /info/app |
Returns an AppInfo object as JSON. |
| GET | /info/config |
Returns a Config object as JSON. |
| GET | /info/store |
Returns an RtcClientInfos object as JSON. |
| GET | /info/clients |
Returns an RtcClientStoreInfo object as JSON. |
| GET | /info |
Returns an AppInfo object as JSON. |
Warning
These endpoints are not meant to be publicly exposed!
Run the RtcServerTests project using the dotnet CLI tool.
dotnet test
The specification of the protocol used by the server can be found here.