Giter Site home page Giter Site logo

gongrok's Introduction

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:

gongrok's People

Contributors

revzim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gongrok's Issues

Nil pointer exception gongrok.go:162

If e.g. the path to the ngrok executable is wrong (which I tested intentionally) there is a nil pointer panic.
It points on line 162 in gongrok.go, where it doesn't check if logging is configured before logging.
As I didn't initialize logging, the Logger is nil at that spot.

I would have made a pull request but then thought that might me too less of a change ;)

Ngrok service in program

Hello, i am designing an emulator in golang and i need ngrok services in it. I want to start service of go-lang as soon as I call a function with argument port number in it, later i wana use that port for ngrok tunnel, I don't wanna use that localhost:8080/client to provide port host and protocol to program, I hope you get my point, Is it possible ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.