Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/revzim/gongrok
golang ngrok wrapper
https://github.com/revzim/gongrok
go golang golang-wrapper ngrok wrapper
Last synced: about 1 month ago
JSON representation
golang ngrok wrapper
- Host: GitHub
- URL: https://github.com/revzim/gongrok
- Owner: revzim
- License: mit
- Created: 2020-07-20T17:03:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-28T18:59:28.000Z (over 3 years ago)
- Last Synced: 2024-06-21T14:12:19.004Z (6 months ago)
- Topics: go, golang, golang-wrapper, ngrok, wrapper
- Language: Go
- Homepage:
- Size: 130 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gongrok
[![Go Report Card](https://goreportcard.com/badge/github.com/revzim/gongrok)](https://goreportcard.com/report/github.com/revzim/gongrok)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/revzim/gongrok)](https://pkg.go.dev/github.com/revzim/gongrok)
[![GoDoc](https://godoc.org/github.com/revzim/gongrok?status.svg)](https://godoc.org/github.com/revzim/gongrok)## golang [ngrok](https://ngrok.com/) wrapper
* `Secure introspectable tunnels to local host`## Install
* [ngrok](https://ngrok.com/download) 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](https://i.imgur.com/XEerXOm.png)
* [WEB APP EXAMPLE](https://github.com/revzim/gongrok/example/webapp)
* place ngrok binary download in ngrok path ```./ngrok_bin/```
* build or run
* ```go run main.go | go build main.go```
* server starts
* [client web app](http://localhost:8080/client) located at http://localhost:8080/client
* 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](https://pkg.go.dev/badge/github.com/revzim/gongrok)](https://pkg.go.dev/github.com/revzim/gongrok)
[![GoDoc](https://godoc.org/github.com/revzim/gongrok?status.svg)](https://godoc.org/github.com/revzim/gongrok)### 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:
* [Node NGROK Wrapper](https://github.com/bubenshchykov/ngrok)
* [gonnel](https://github.com/afdalwahyu/gonnel)