Skip to content

A pet project which is an alternative to proxy program which works like ngrock. The project is made solely for educational purposes to understand web development on go

Notifications You must be signed in to change notification settings

danilshap/proxy-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0427d5f · May 18, 2024

History

5 Commits
May 18, 2024
May 18, 2024
May 18, 2024
May 10, 2024
May 8, 2024
May 18, 2024
May 10, 2024
May 10, 2024

Repository files navigation

Go Tunnel Manager

Overview

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.

Features

  • 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.

How to Run the Project

  1. Clone the Repository:
    git clone <repository-url>
  2. Navigate to the project directory:
    cd proxy-go
  3. Build the project (if necessary):
    go build
  4. Run the application:
    go run main.go

.env File

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.

How to Use

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.

Commands

  • 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.

System Requirements

  • Go version 1.15 or higher

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A pet project which is an alternative to proxy program which works like ngrock. The project is made solely for educational purposes to understand web development on go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages