Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/willnilges/shitty-ngrok
I stole this from https://github.com/progrium/qmux/tree/main/demos/groktunnel#readme
https://github.com/willnilges/shitty-ngrok
Last synced: 20 days ago
JSON representation
I stole this from https://github.com/progrium/qmux/tree/main/demos/groktunnel#readme
- Host: GitHub
- URL: https://github.com/willnilges/shitty-ngrok
- Owner: WillNilges
- Created: 2023-08-11T22:44:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-11T22:48:57.000Z (over 1 year ago)
- Last Synced: 2024-11-05T13:11:39.373Z (2 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# groktunnel
Expose localhost HTTP servers with a public URL
## Build
```
$ go build
```## Try it out
First we run the groktunnel server. Normally this would be run on a server, but by default uses `vcap.me`
for a hostname which resolves all of its subdomains to localhost.
```
$ ./groktunnel
2021/04/29 16:10:35 groktunnel server [vcap.me] ready!
```Now run a local web server. Here is how to run a server listing a file directory with Python:
```
$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
```Then we run groktunnel as a client by giving it the local port to expose.
```
$ ./groktunnel 8000
port 8000 http available at:
http://y8eyshnpol.vcap.me:9999
```That address should serve the same content as the local web server on 8000. For added effect,
run both client and server with `-p 80`, which will require root to run the server.## About
This uses qmux between the client and server to tunnel subdomain requests down to the client.
This is done over a hijacked http connection after a tunnel is established and a new subdomain
vhost is setup.Not counting dependencies, this whole system is done in under 150 lines. This is the 5th or 6th
implementation of this system since the original [localtunnel](https://github.com/progrium/localtunnel)
in 2010, which was then cloned many times. It was then commercialized by [Ngrok](https://ngrok.com/).