The Go Tunnel Manager is a simple tunneling application written in Go. It allows users to create secure tunnels to local servers, making them accessible via a generated encrypted URL. This functionality mimics services like ngrok but is a simplified version for educational purposes.
- Tunnel Creation: Users can encrypt a URL to create a new tunnel.
- Tunnel Listing: Displays all active tunnels with their original and encrypted URLs.
- Dynamic Tunnel Management: Supports up to 5 active tunnels at any given time.
- Simple HTTP Proxy: Includes a basic HTTP proxy server to handle requests through encrypted URLs.
- Clone the Repository:
git clone <repository-url>
- Navigate to the project directory:
cd proxy-go
- Build the project (if necessary):
go build
- Run the application:
go run main.go
The application requires a .env
file to specify the domain. Here is an example of the .env
file content:
DOMAIN="localhost:{port}"
Place this file in the root directory of the project.
After starting the application, use the command line interface to manage tunnels:
- Create a tunnel: Enter
tunnel [url]
to create a new tunnel. - List active tunnels: Enter
list
to view all active tunnels. - Exit the application: Enter
exit
to stop the application and clear all tunnels.
tunnel [url]
: Encrypts the provided URL and creates a tunnel.list
: Lists all active tunnels with their original and encrypted URLs.exit
: Exits the application and clears all active tunnels.help
: Displays information about available commands.
- Go version 1.15 or higher
This project is licensed under the MIT License - see the LICENSE file for details.