KO
|
EN
gitlite โ search
Search
#typescript
#python
#react
#llm
#mcp-server
#nextjs
#open-source
#linux
#llms
#mcp
#flutter
#flutter-apps
tunnel-chat
โ 59
Open GitHub โ
No description available.
Download README (.md)
Explore Similar Repositories
metacog
:
mcp tools for llm metacogntition
Loan_Prediction
:
A smart Loan Approval Prediction application using Machine Learning and Streamlit, designed with login/signup, dataset upload, graphical analytics, and real-time loan approval prediction.
ori-ui
:
No description available.
vmtrace
:
๐ฌ Guest execution and tracing using the Windows Hypervisor Platform
docker-swarm-guide
:
The Complete Docker Swarm Production Guide for 2026 - Battle-tested configurations, VPS planning, monitoring, and deployment workflows
// repository documentation
Was this content helpful?
โ 0
(0 ratings)
Select Rating:
โ
โ
โ
โ
โ
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
tunnel-chat
?
Download (.md)
# ๐ Tunnel Chat **Ephemeral peer-to-peer tunnel chat from the terminal** Create secure, temporary chat rooms that connect peers directly through WebRTC tunnels. Perfect for quick collaboration, file sharing, or secure communication without leaving your terminal. ## โจ Features - ๐ **End-to-end encrypted** peer-to-peer communication - ๐ **Zero configuration** - works out of the box - ๐ฑ **Cross-platform** - works on macOS, Linux, and Windows - ๐ **NAT traversal** - connects through firewalls and routers - ๐ฌ **Real-time chat** with typing indicators - ๐ **File sharing** capabilities - ๐ฏ **Ephemeral rooms** - automatically cleaned up - ๐ **Pro features** with TURN servers for reliable connections ## ๐ Quick Start ### Basic Usage (Free) ```bash # Start a chat room npx tunnel-chat@latest # Join an existing room npx tunnel-chat@latest join <room-name> ``` ### Pro Usage (Paid) Get your API key and unlock premium features: ```bash # Get your Pro API key npx tunnel-chat@latest auth your-email@example.com # Set your API key export TUNNEL_API_KEY="sk_..." # Now enjoy Pro features with reliable TURN servers npx tunnel-chat@latest ``` ## ๐ฆ Installation ### Global Installation ```bash npm install -g tunnel-chat # or pnpm add -g tunnel-chat ``` ### One-time Usage ```bash npx tunnel-chat@latest ``` ## ๐ฎ Commands | Command | Description | |---------|-------------| | `tunnel-chat` | Create or join a chat room | | `tunnel-chat join <name>` | Join a specific room | | `tunnel-chat auth <email>` | Get your Pro API key | | `tunnel-chat upgrade` | Upgrade to Pro plan | ### In-Chat Commands | Command | Description | |---------|-------------| | `/help` | Show available commands | | `/quit` or `/exit` | Leave the chat | | `/upload <file>` | Share a file (Pro only) | | `/fpkey` | Show DTLS fingerprints for verification | ## ๐ง Configuration ### Environment Variables | Variable | Description | Required | |----------|-------------|----------| | `TUNNEL_API_KEY` | Your Pro API key for premium features | No | | `TUNNEL_SIGNAL` | Custom signaling server URL | No | | `BILLING_SERVER` | Custom billing server URL | No | ### Example Configuration ```bash # Set your Pro API key export TUNNEL_API_KEY="sk_ditch_abc123..." # Optional: Use custom signaling server export TUNNEL_SIGNAL="wss://your-server.com" ``` ## ๐ Pro Features Upgrade to Pro for enhanced reliability and features: - ๐ **TURN servers** for guaranteed connectivity through corporate firewalls - ๐ **File uploads** to cloud storage - ๐ **Multi-peer rooms** (coming soon) - ๐ก๏ธ **Priority support** [**Upgrade to Pro โ**](https://ditch.chat) ## ๐๏ธ Self-Hosting Want to run your own instance? Here's how: ### Server Requirements - Node.js 20+ - Stripe account (for billing) - Resend account (for emails) - Optional: TURN server for NAT traversal ### Environment Variables ```bash # Required for billing STRIPE_SECRET_KEY=sk_live_... STRIPE_PRICE_ID=price_... STRIPE_WEBHOOK_SECRET=whsec_... # Required for email auth RESEND_API_KEY=re_... RESEND_FROM=no-reply@yourdomain.com PUBLIC_BASE_URL=https://yourdomain.com # Optional TURN server TURN_SECRET=your-coturn-secret TURN_REALM=yourdomain.com # Server config PORT=8787 KEYS_PATH=./server/keys.json ``` ### Deploy with Docker ```bash # Build the image docker build -t tunnel-chat . # Run with environment variables docker run -p 8787:8787 \ -e STRIPE_SECRET_KEY=sk_live_... \ -e RESEND_API_KEY=re_... \ tunnel-chat ``` ### Deploy to Fly.io ```bash # Install Fly CLI curl -L https://fly.io/install.sh | sh # Deploy fly deploy ``` ## ๐ Security - **End-to-end encryption**: All messages are encrypted using WebRTC's built-in DTLS - **Ephemeral**: Rooms are automatically deleted after inactivity - **No data retention**: Messages are never stored on servers - **Peer verification**: Use `/fpkey` to verify connection fingerprints - **Open source**: Full transparency - audit the code yourself ## ๐ ๏ธ Development ### Setup ```bash # Clone the repository git clone https://github.com/razchiriac/tunnel-chat.git cd tunnel-chat # Install dependencies pnpm install # Build the project pnpm run build ``` ### Scripts ```bash pnpm run dev # Development CLI pnpm run server # Run signaling server only pnpm run combined # Run combined billing + signaling server pnpm run build # Build TypeScript to JavaScript ``` ### Architecture ``` โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ Client A โ โ Signaling โ โ Client B โ โ โโโโโบโ Server โโโโโบโ โ โ โ โ โ โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ โ Direct P2P Connection โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` - **Signaling Server**: Facilitates WebRTC handshake - **TURN Servers**: Help with NAT traversal (Pro only) - **Billing Server**: Handles Stripe subscriptions and API keys - **P2P Connection**: Direct encrypted communication between peers ## ๐ค Contributing Contributions are welcome! Please feel free to submit a Pull Request. ### Guidelines 1. Fork the repository 2. Create a feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'Add amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ## ๐ License MIT License - see [LICENSE](LICENSE) file for details. ## ๐ Support - ๐ Issues: [GitHub Issues](https://github.com/razchiriac/tunnel-chat/issues) ## ๐ Acknowledgments - Built with [WebRTC](https://webrtc.org/) for peer-to-peer communication - [Stripe](https://stripe.com/) for payment processing - [Resend](https://resend.com/) for transactional emails - [Cloudflare](https://cloudflare.com/) for CDN and DNS services - [Fly.io](https://fly.io/) for hosting --- **Made with โค๏ธ by the Tunnel Chat team** [Website](https://ditch.chat) โข [GitHub](https://github.com/razchiriac/tunnel-chat)