Skip to content

Latest commit

 

History

History
59 lines (47 loc) · 1.28 KB

README.md

File metadata and controls

59 lines (47 loc) · 1.28 KB

Tunnel

An attempt to build a clone of Ngrok. While it may be a bit buggy, it works and demonstrates the basic functionality of tunneling HTTP requests.


Features

  • gRPC Bi-Directional Streams: Enables seamless communication between the client and server.
  • Subdomain Mapping: Access your HTTP server on a custom subdomain like subdomain.localhost:8080.
  • Work in Progress: The code is a mess.

Prerequisites

Ensure you have the following installed:

Building

  1. Generate gRPC structures:
    make proto
  2. Install dependencies
    go mod tidy
  3. Build the binaries:
    make build

Running

  1. Start the server:

    ./bin/server
  2. Start the client with the desired port and subdomain:

    ./bin/client <port> <subdomain>

    Example:

    ./bin/client 3000 mysubdomain
  3. Access your HTTP server on:

    mysubdomain.localhost:8080
    

How It Works

  • The client and server communicate using gRPC Bi-Directional streams, facilitating real-time tunneling of requests.