AltayChat is a cross-platform, peer-to-peer (P2P) voice chat application. It allows two people to talk securely over the internet without a central audio server. It uses modern technologies like WebRTC for networking and Opus for high-quality audio.
- P2P Architecture: Audio data goes directly from one user to another. No server listens to or stores your voice.
- High-Quality Audio: Powered by the Opus codec (48kHz Mono) for crystal clear sound even on slow connections.
- Security: Uses DTLS-SRTP for end-to-end encryption.
- Privacy: Supports Cloudflare TURN relay to hide your IP address and bypass strict firewalls.
- Firewall & DPI Bypass: Uses Cloudflare TURN fallback ports (53 DNS, 80 HTTP, 443 HTTPS/TLS) to traverse strict corporate networks and Symmetric NATs seamlessly.
- Low Latency: Uses lock-free buffers and event-driven threads for real-time performance.
- Automated Signaling: No need to copy-paste long SDP strings; a lightweight signaling server handles the handshake.
| Component | Technology |
|---|---|
| Networking | libdatachannel (WebRTC) |
| Audio Codec | libopus |
| Audio I/O | PortAudio |
| Signaling | Cloudflare Workers & Durable Objects |
| Build System | CMake |
| Dependencies | vcpkg (C++ Package Manager) |
To build the project locally, you need a C++17 compiler and CMake.
# Install system dependencies
sudo pacman -S libdatachannel opus portaudio nlohmann-json cmake ninja
# Build the project
cmake -B build
cmake --build build -j$(nproc)
# Run the app
./build/altaychat
Note (Local Build): You do not need
vcpkgto build the app on Linux or macOS. As long as you install the dependencies using your system package manager (e.g.,pacman,apt,brew), theCMakeLists.txtwill automatically usepkg-configas a fallback to locate them.
brew install libdatachannel opus portaudio nlohmann-json
cmake -B build && cmake --build build
./build/altaychat# Install dependencies via vcpkg
vcpkg install libdatachannel:x64-windows opus:x64-windows portaudio:x64-windows nlohmann-json:x64-windows
# Configure and Build
cmake -B build -DCMAKE_TOOLCHAIN_FILE="C:/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake"
cmake --build build --config Release
# Run the app
./build/Release/altaychat.exe
- Launch the App: Open the terminal and run
altaychat. - Join a Room: Enter a unique room name (e.g.,
my-private-room-123). - Connect: Tell your friend to join the exact same room name.
- Talk: Once connected, the audio stream starts automatically.
- Exit: Press
Ctrl+Cto close the connection and exit.
--debug: Show detailed connection and audio logs.--version: Show current version and build info.--smoke-test: Verify if all libraries and audio drivers are loaded correctly.
By default, AltayChat tries to connect directly. For better connectivity and privacy, you can use TURN servers.
- Create or open the
altaychat.conffile in the same folder as the app. - Add your credentials:
ALTAYCHAT_TURN_USERNAME=your_username
ALTAYCHAT_TURN_PASSWORD=your_password
Alternatively, you can set ALTAYCHAT_TURN_USERNAME and ALTAYCHAT_TURN_PASSWORD environment variables.
The app requires a signaling server URL to connect peers. You can set this URL in one of three ways:
- Configuration File (Recommended): Create a file named
altaychat.confin the same directory as the executable and add your URL:SIGNALING_URL=wss://your-signaling-server.com - Environment Variable: Export the
ALTAYCHAT_SIGNALING_URLenvironment variable:export ALTAYCHAT_SIGNALING_URL=wss://your-signaling-server.com - Default Fallback: If neither is provided, the app will use default signaling server.
🔒 Security Note: The default public signaling server only routes connection data (SDP and ICE candidates). It cannot access or eavesdrop on your audio. All media is strictly Peer-to-Peer and End-to-End Encrypted (E2EE) using DTLS-SRTP.
src/audio/: Handles raw audio capture and playback using PortAudio.src/config/: Centralized configuration manager for parsing files and environment variables.src/signaling/: Communicates with the Cloudflare Worker to find peers.src/webrtc/: Manages P2P connection, ICE gathering, and RTP packets.server/: Source code for the Cloudflare Worker signaling server.
The signaling server runs on Cloudflare Workers with Durable Objects. Source is in the server/ folder. Deploy with:
cd server
npx wrangler deployThis project is licensed under the MIT License. See the LICENSE file for details.
Developed with ❤️ by fr0stb1rd