No description
| shared | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
Meet Server
The high-performance signaling and media relay server for the Meet application. Built with Rust, Axum, and Tokio.
Features
- Signaling: WebSocket-based room management and peer discovery.
- Media Relay: Custom UDP protocol for low-latency video and screen sharing.
- Architecture: Asynchronous, localized state management using
DashMap.
Prerequisites
- Rust: Latest stable version. Install via rustup.rs.
- Build Tools:
build-essential(Ubuntu) orDevelopment Toolsgroup (Fedora/RHEL).
Installation
-
Clone the Repository:
git clone <your-server-repo-url> cd server -
Verify Shared Crate: Ensure the
shareddirectory exists in the root. This contains protocol definitions used by both client (logic port) and server.ls -F shared/ -
Build:
cargo build --releaseThe binary will be located at
target/release/server.
Running the Server
Ports
- TCP/WebSocket: 6000 (Bind:
0.0.0.0:6000) - UDP (Media): 4000 (Bind:
0.0.0.0:4000)
Local Development
cargo run
Runs on 0.0.0.0:6000 (HTTP/WS) and 0.0.0.0:4000 (UDP).
Production Deployment
- Run the Binary:
./target/release/server - Firewall:
Ensure TCP 6000 and UDP 4000 are open.
# Fedora/CentOS sudo firewall-cmd --add-port=6000/tcp --permanent sudo firewall-cmd --add-port=4000/udp --permanent sudo firewall-cmd --reload # Ubuntu/Debian (UFW) sudo ufw allow 6000/tcp sudo ufw allow 4000/udp - Systemd (Optional):
Create a service file
/etc/systemd/system/meet-server.serviceto keep it running.
Project Structure
src/main.rs: Entry point. Sets up Axum router and spawns the UDP listener.src/handlers.rs: WebSocket handlers for joining rooms, signaling, and chat.src/udp.rs: The core UDP packet handling loop. Manages media relaying.src/state.rs: Shared application state (Rooms, Peers).shared/: Local crate containing shared data structures (Packetheaders,MediaTypeenums).