For those like me that didn't know what ngrok is, "ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels"[1]. So it allows you to easily expose internal services publicly, letting you (for example) show someone outside your network a website in your local development environment, without having to deploy it externally into some sort of live environment.
Also, not sure why so many people seem to take "... written in PHP" as a gauntlet slap to their own face, instead of some additional technical information.
If you have nothing to add to the conversation other than witty snark about PHP, maybe your time would be better spent writing a competing open source product in a language of your choice, giving it away for free, and then letting users compare their pros and cons?
OP has been putting out a series of useful tools lately [1] and been very transparent about his process on Twitter [2].
Seeing this thread derail into a discussion about PHP is pretty annoying. It seems to happen to anything PHP-related here. Do that all day long please, if someone comes here saying PHP is the best language... but he created something useful and open sourced it - that deserves more than toxic bike shedding about your favorite toys.
It can be handled using a single go binary using pgrok which comes less the source code size and not to mention without any dependencies on almost all platforms!
This requires unnecessary things to bundle and too complex for some simple stuff. Mileage may vary though.
My personal take on this was that it's for a lot of people a lot simpler to extend Expose, as it's written in PHP.
It also uses ReactPHP as a foundation - which is battle-tested for many years.
After reading the architecture post [1] referenced in the comment by mpociot [2], I’d say PHP is more “suitable” for the server-side if you choose to self-host the Open Source code rather than use the service.
These tunneling services use a client-server architecture with the server-side running on a public IP address. A static binary written in Go, like pgrok, is ideal for the client-side. On the server-side, you want an app server that is both common and can dynamically load a module. A dedicated Go server makes sense if you are building a service but not if you want to add functionality to an existing app server with a public domain name.
Except the PHP version only works with HTTP, Ngrok works with any TCP protocol which is much more powerful, hence why you don't want the weird PHP model with it modules and HTTP server.
Also, not sure why so many people seem to take "... written in PHP" as a gauntlet slap to their own face, instead of some additional technical information.
If you have nothing to add to the conversation other than witty snark about PHP, maybe your time would be better spent writing a competing open source product in a language of your choice, giving it away for free, and then letting users compare their pros and cons?
1. https://ngrok.com/product