Skip to content
/ tunnel Public

HTTP tunnel using gRPC bi-directional streams.

Notifications You must be signed in to change notification settings

0jk6/tunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

HTTP tunnel using gRPC bi-directional streams.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published