5 ms·
Seriously, does PHP suitable for this? It can be handled using a single go binary using pgrok which comes less the source code size and not to mention without
by Marc_Bryan 6y ago
Seriously, does PHP suitable for this?
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.
But just my views.
- mpociot 6y agoMy 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.
- jaden 6y agoIs there a separate Go pgrok, or was that a typo? The reason for asking is I'd like to find a self-hosted ngrok solution for development.
- Phenix88be 6y agoWell it's working and a lot of people already have a PHP server they can use to host it. I don't even know how to run a Go server.
- dirtnugget 6y agoYou don't need to, comes as a compiled binary. That's one of the beauties of Go
- Donckele 6y agoWhat comes as a compiled binary?
- regularjack 6y agoPHP is also a compiled binary.
- stickfigure 6y agoLooks like that is a reference to this: https://github.com/jerson/pgrok https://github.com/jerson/pgrok ...which does look useful indeed.
- jaden 6y agoThanks! It even has a docker container for easy deployment.
- deleted 6y ago[deleted]
- sudders 6y agoYou'd be surprised how PHP has evolved in the last couple of years. With frameworks like ReactPHP you can really code anything you want in PHP.
- sradman 6y agoAfter 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. [1] https://pociot.dev/28-introducing-expose-an-easy-to-use-tunneling-service-implemented-in-pure-php https://pociot.dev/28-introducing-expose-an-easy-to-use-tunn... [2] https://news.ycombinator.com/item?id=23554459 https://news.ycombinator.com/item?id=23554459
- Thaxll 6y agoExcept 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.