ngrok
ngrok copied to clipboard
return 503 instead of 404 when a tunnel isn't available
ngrok currently returns a 404, which breaks things, it should return a 503
Is this a good first issue? I'll like to work on this.
I reckon so, should be super easy https://github.com/inconshreveable/ngrok/blob/master/src/ngrok/server/http.go#L94
Thanks. Should I go ahead and create a PR?
why not :)
Having some trouble setting up the environment. Following the steps from the DEVELOPMENT.MD page(https://github.com/inconshreveable/ngrok/blob/master/docs/DEVELOPMENT.md), This is the output returned after make:
go fmt ngrok/...
GOOS="" GOARCH="" go get github.com/jteeuwen/go-bindata/go-bindata
bin/go-bindata -nomemcopy -pkg=assets -tags=debug \
-debug=true \
-o=src/ngrok/client/assets/assets_debug.go \
assets/client/...
bin/go-bindata -nomemcopy -pkg=assets -tags=debug \
-debug=true \
-o=src/ngrok/server/assets/assets_debug.go \
assets/server/...
go get -tags 'debug' -d -v ngrok/...
github.com/inconshreveable/mousetrap (download)
github.com/rcrowley/go-metrics (download)
get "gopkg.in/yaml.v1": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v1", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v1"} at //gopkg.in/yaml.v1?go-get=1
gopkg.in/yaml.v1 (download)
github.com/inconshreveable/go-vhost (download)
github.com/alecthomas/log4go (download)
github.com/nsf/termbox-go (download)
github.com/mattn/go-runewidth (download)
github.com/gorilla/websocket (download)
go install -tags 'debug' ngrok/main/ngrok
go install -tags 'debug' ngrok/main/ngrokd
After this I tried running bin/ngrok
I also tried make client and make server to confirm once that the client and server are set up.
After that, as explained I set the following
127.0.0.1 ngrok.me
127.0.0.1 test.ngrok.me
in /etc/hosts and then ran ./bin/ngrokd -domain ngrok.me(both as a normal and superuser) It doesn't have permissions to bind to port 80. Here's the output :
17:00:14 IST 2020/06/08] [INFO] (ngrok/log.(*PrefixLogger).Info:83) [registry] [tun] No affinity cache specified
[17:00:14 IST 2020/06/08] [INFO] (ngrok/log.(*PrefixLogger).Info:83) [metrics] Reporting every 30 seconds
panic: listen tcp :80: bind: permission denied
goroutine 1 [running]:
ngrok/server.startHttpListener(0x816621, 0x3, 0x0, 0x0)
/home/pranav/Desktop/Pranav/Projects/ngrok/src/ngrok/server/http.go:40 +0x24d
ngrok/server.Main()
/home/pranav/Desktop/Pranav/Projects/ngrok/src/ngrok/server/main.go:131 +0x390
main.main()
/home/pranav/Desktop/Pranav/Projects/ngrok/src/ngrok/main/ngrokd/ngrokd.go:8 +0x20
Am I doint something wrong? Should this be run in a container?
is apache or some other process already running/bound to port 80?
Nothing running on port 80. Stopped apache and nginx to be sure. lsof -i :80 return nothing.
Thank you for opening this issue! As of April 2016, the ngrok service has permanently moved to https://ngrok.com/. To join the community and file bug reports or feature enhancements for the ngrok agent, please go to https://github.com/ngrok/ngrok.
This repository is no longer actively maintained and will be archived soon to reduce confusion with the latest ngrok versions. We thank you for the continued support of ngrok and look forward to seeing you over at ngrok.com and the ngrok Community Repo.