gTunnel is a fast, lightweight tunneling solution written in Go that allows you to expose local services to the internet through a secure tunnel. Similar to ngrok or VSCode Port-Forwarding, GTunnel provides a simple way to share your local development server with the world.
- 🚀 Fast & Lightweight - Written in Go for optimal performance
- 🔒 Secure - Token-based authentication and HTTPS/WSS support
- 🌐 Cross-Platform - Works on Windows, macOS, and Linux
- 🐳 Docker Ready - Pre-built Docker images for easy deployment
- 📦 Easy Installation - Multiple installation methods (binaries, packages, Docker)
- ⚡ Zero Configuration - Works out of the box with sensible defaults
- 🔧 Flexible - CLI tools for both client and server management
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Local App │ │ gTunnel Client │ │ gTunnel Server │
│ localhost:3000 │◄──►│ (gtc) │◄──►│ (gts) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
▲
│
┌───────▼───────┐
│ Public URL │
│ tunnel.me:443 │
└───────────────┘
Download from releases:
# Linux/macOS
curl -L https://github.com/B-AJ-Amar/gTunnel/releases/latest/download/gtunnel-client_linux_amd64.tar.gz | tar -xz
sudo mv gtc /usr/local/bin/
# Or use our installation script (supports client, server, or both)
curl -sSL https://raw.githubusercontent.com/B-AJ-Amar/gTunnel/main/scripts/install.sh | bash
# Install server only
curl -sSL https://raw.githubusercontent.com/B-AJ-Amar/gTunnel/main/scripts/install.sh | bash -s server
# Install both client and server
curl -sSL https://raw.githubusercontent.com/B-AJ-Amar/gTunnel/main/scripts/install.sh | bash -s both# Expose your local port 3000
# https://gtunnel-server-1i1b.onrender.com is the default server for the version v0.0.0
gtc connect -u https://gtunnel-server-1i1b.onrender.com -e /my-app 3000
# Your app is now available at: https://gtunnel-server-1i1b.onrender.com/my-app# Install client (recommended for most users)
curl -sSL https://raw.githubusercontent.com/B-AJ-Amar/gTunnel/main/scripts/install.sh | bash
# Install server for self-hosting
curl -sSL https://raw.githubusercontent.com/B-AJ-Amar/gTunnel/main/scripts/install.sh | bash -s server- Download Binaries - Direct downloads for all platforms
- Docker Images - Container deployment
- Package Managers - DEB, RPM, APK packages
📖 For detailed installation instructions, see our Installation Guide
# Connect to public server (replace with your server URL)
gtc connect -u https://gtunnel-server-1i1b.onrender.com -e /my-app 3000
# Your app is now available at: https://gtunnel-server-1i1b.onrender.com/my-app# Start your own server
gts start --bind-address 0.0.0.0:7205📖 For complete usage examples and configuration, see our Documentation
Deploy your own gTunnel server with one click - includes free HTTPS, automatic SSL, and health monitoring.
📖 For self-hosted options and advanced deployment, see our Deployment Guide
Our comprehensive documentation covers everything you need:
- 🚀 Quick Start - Get running in 5 minutes
- 📦 Installation - All installation methods
- ⚙️ Configuration - Detailed configuration options
- 🌐 Deployment - Production deployment guides
- 🛠️ CLI Reference - Complete command reference
- ❓ FAQ - Frequently asked questions
Visit Documentation Site for the complete guide.
# Clone repository
git clone https://github.com/B-AJ-Amar/gTunnel.git
cd gTunnel
# Install dependencies
go mod download
# Run tests
make test
# Build for development
make build-dev
# Build with version info
make VERSION=dev build| Command | Description |
|---|---|
make build |
Build both client and server with version info |
make build-client |
Build only the client |
make build-server |
Build only the server |
make build-dev |
Build without version info |
make install |
Install binaries to GOPATH/bin |
make test |
Run all tests |
make clean |
Clean build directory |
make release |
Create a release with GoReleaser |
make help |
Show all available targets |
gTunnel/
├── cmd/
│ ├── client/ # Client CLI application
│ └── server/ # Server CLI application
├── internal/
│ ├── client/ # Client-side logic
│ ├── server/ # Server-side logic
│ ├── protocol/ # Shared protocol definitions
│ ├── logger/ # Logging utilities
│ └── version/ # Version information
├── scripts/ # Build and deployment scripts
├── docs/ # Documentation
├── Dockerfile.server # Server Docker image
├── render.yaml # Render deployment config
├── .goreleaser.yml # Release configuration
└── Makefile # Build automation
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
make test - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Go style: Follow Go conventions and use
gofmt - Tests: Add tests for new features
- Documentation: Update README and code comments
- Commits: Use clear, descriptive commit messages
- Basic tunneling - HTTP/HTTPS tunneling through WebSocket
- Authentication - Token-based authentication (basic)
- CLI tools - Complete command-line interface
- Docker support - Pre-built Docker images
- Multi-platform - Windows, macOS, and Linux support
- WebSocket support - Native WebSocket tunneling for real-time applications
- Multiple tunnels - Multiple tunnels per client
- Multicasting - Broadcast same message to multiple clients (for webhooks)
- Advanced client management - Profiles, advanced auth, permissions ...
- VS Code extension - Integrated tunneling directly in VS Code
- Documentation site - Comprehensive docs with Docusaurus
- Admin dashboard - Web interface for server management
- Request queuing - Queue requests for offline clients
- .gtunnel config file - Project-specific config file for easier connection management
- Subdomain routing - Custom subdomains for tunnels
This project is licensed under the Apache-2.0 license - see the LICENSE file for details.
- Built with Go, Chi, Gorilla WebSocket, and Cobra
- Thanks to all contributors and users!
Made with ❤️ by @B-AJ-Amar