Skip to content

revzim/gongrok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gongrok

Go Report Card PkgGoDev GoDoc

golang ngrok wrapper

  • Secure introspectable tunnels to local host

Install

  • ngrok binary is required for use

    • download the binary
    • place binary within your working directory
    • default: ./ngrok_bin/
  • go get github.com/revzim/gongrok

Example

Web App Image

  • WEB APP EXAMPLE
    • place ngrok binary download in ngrok path ./ngrok_bin/
    • build or run
    • The example provided is a simple webapp that allows for the user to input:
      • tunnel name - the name identifier of the tunnel you would like to open
      • host - local server addr that you would like to expose with ngrok
      • port - port of the local server
      • protocol - 0 - HTTP | 1 - TCP | 2 - TLS

About

  • An iOS app I was working on allows for the user to host a web server from their iOS device that acts as a simple web/chat server.
  • I wanted to figure out a way to allow others that are outside of the local network to connect and chat if the device's network is protected by a strict firewall.
  • I've used ngrok for a few other projects and figured it would be a decent place to start to test out the capabilities of whether or not web servers hosted on iOS devices on a local network could be exposed to the World Wide Web, which ended up being easy to test and implement correctly.

PkgGoDev & GoDoc

PkgGoDev GoDoc

Workflow

  * INIT CLIENT
  
  * INIT TUNNEL(S)

  * RUN NGROK BINARY W/ OPTIONS

  * ADD TUNNEL(S) TO CLIENT

  * CONNECT ALL CLIENT SERVER TUNNELS

  * TUNNELS STAY OPEN UNTIL CLOSE

Author

  • revzim

Credits

inspired by: