Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very cool.

ngrok doesn't have a programmatic API, but I'd love to add one soon. I've built out a library for this in https://github.com/inconshreveable/go-tunnel that will be the foundation for ngrok's next version providing a library in addition to the CLI tool.

Unfortunately, one of Go's weaknesses is that it doesn't embed into other languages like C, so I'd need a ground-up rewrite (in C, probably) with bindings to other languages.

If ngrok the command-line tool had a well defined programmatic interface (like RESTful JSON) would that useful, or is the burden of a separate binary/process to manage still too painful?



To me the ease of having the library be installable with the "canonical" package manager of my platform is too convenient; just "feels" more natural and simpler. I actually thought about writing a node.js ngrok client but then gave up on the idea since localtunnel was working well enough and I personally didn't need the other features from ngrok which I didn't have in localtunnel.

I wouldn't worry about the whole rewrite in c thing. If your server protocol is simple enough, writing clients in the native languages will be better than writing bindings. Installing bindings trips up a lot of users that are not used to compiled software.


Make sense and I agree. Thanks for the feedback! Unfortunately, ngrok's new protocol is optimized very heavily for speed which comes with a cost in complexity of both the protocol and the clients that implement it.


Well thank you for ngrok!

My daily routine is

ngrok start ssh && go home

Stupid firewalls.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: