Live data from Hacker News

Pgrok – Poor Man’s Ngrok

github.com

21–30 of 83 posts

Re: Pgrok – Poor Man’s Ngrok

#21
post #19

Earlier quoted context omitted.

Cargo culting. If you never used SQLite, anytime you need a database you use whatever you've used before without shopping around or considering if what you're about to use is right.

Hang on a second- this project looks to be assuming that the db will be remote and over the internet. Even the SQLite official document recommends people to use PostresSQL in that scenario [0]: >Generally, if your data is separated from the application by a network, you want to use a client/server database. This is due to the fact that the database engine acts as a bandwidth-reducing filter on the database traffic ..…

No, the project has two parts. One server and one client. The client obviously runs on a different host than the server, but nothing in the architecture says that the server and the db has to run on different hosts.

You can also see that the pgrokd.yml config example is connecting to the database via localhost, so running on the same machine as "pgrokd" (the server part of pgrok).

Re: Pgrok – Poor Man’s Ngrok

#22
post #17

Earlier quoted context omitted.

Cargo culting. If you never used SQLite, anytime you need a database you use whatever you've used before without shopping around or considering if what you're about to use is right.

I guess... That's too bad, this project looks great but having to install/connect Postgres is putting me off installing it.

If you want a similar project which 'just works' then consider using zrok. Its fully opensource which you can self-host or use the free hosted version - https://zrok.io/

Re: Pgrok – Poor Man’s Ngrok

#24
post #19

Earlier quoted context omitted.

Hang on a second- this project looks to be assuming that the db will be remote and over the internet. Even the SQLite official document recommends people to use PostresSQL in that scenario [0]: >Generally, if your data is separated from the application by a network, you want to use a client/server database. This is due to the fact that the database engine acts as a bandwidth-reducing filter on the database traffic ..…

No, the project has two parts. One server and one client. The client obviously runs on a different host than the server, but nothing in the architecture says that the server and the db has to run on different hosts. You can also see that the pgrokd.yml config example is connecting to the database via localhost, so running on the same machine as "pgrokd" (the server part of pgrok).

My mistake it looks as though the desiderata was single client/server db backend in the first place, and remote db was just an added bonus of that - https://github.com/pgrok/pgrok/pull/11

Re: Pgrok – Poor Man’s Ngrok

#25
post #11

Has anyone tried this for a free ngrok alternative that works with HTTPS, doesn't require setting up a server and has no rate limit within reason? https://developers.cloudflare.com/pages/how-to/preview-with-... Based on the page it looks like you can install Cloudflare's CLI and then run `cloudflared tunnel --url http://localhost:3000 `, and you'll get back a URL to visit such as https://seasonal-deck-organisms-sf.tr…

I guess the biggest (and only?) drawback is that it (presumably) requires a Cloudflare account to use. So if you're living in Iran, Syria, Lebanon (and some more) you're out of luck as you cannot have an account with Cloudflare then. Otherwise it looks like a nice offering for sure.

It doesn't appear to require an account. I just gave it a try, installed the deb, typed that one line command and it just worked. No idea if it would work in those countries though, I only tried it in a US location.

Re: Pgrok – Poor Man’s Ngrok

#26
post #10

Why do projects that are meant to be lightweight use Postgres instead of SQLite? The latter is much easier to deploy (you, well, just don't need to), and does 99% of what anyone needs, and definitely 100% of what small projects need.

Like everything in life, "it depends."

If what you need can suffice with SQLite, then Postgres will work too.

If you're running an app on a VM, running Postgres on it too is easy and isn't "big". It's easy to install and set up, and you're set up for all the features you may want later. Plus you avoid having to refactor for a different database later on.

If you're running your app in a serverless context, or on a PaaS/SaaS, etc, then SQLite might be easier. But maybe you want horizontal scalability with a shared dataset and then you're back at Postgres.

Just picking one thing "because everybody does" or "because it's lightweight" or "it works in most cases" etc aren't good reasons to pick technology. Look at your actual application, make a list of pros and cons, and choose based on your situation, not the cargo cult answer from the HN hive mind.

Re: Pgrok – Poor Man’s Ngrok

#27
post #10

Why do projects that are meant to be lightweight use Postgres instead of SQLite? The latter is much easier to deploy (you, well, just don't need to), and does 99% of what anyone needs, and definitely 100% of what small projects need.

Like everything in life, "it depends." If what you need can suffice with SQLite, then Postgres will work too. If you're running an app on a VM, running Postgres on it too is easy and isn't "big". It's easy to install and set up, and you're set up for all the features you may want later. Plus you avoid having to refactor for a different database later on. If you're running your app in a serverless context, or on a Paa…

Except I have to install Postgres and create a user for it, which I don't have to do with SQLite.

Re: Pgrok – Poor Man’s Ngrok

#28

Earlier quoted context omitted.

Not exactly sure how streamlined your security process is, but for some orgs it is a red tape roller coaster to even get one TCP port open. Anyways, you could also block all traffic to ngrok servers just to ensure your Dev teams aren't skirting around your firewall.

Yeah I get it, but everyone needs to be responsible for security as well. Look what happened with Lastpass. I can totally see someone doing something silly like exposing a device with default creds like a MySQL db on a production box, then forgetting about it and getting a new job a year later. I do block proxies like this, but it’s hard to block every little thing.

I remember when I believed in bastions and DMZ. Many companies have given up on this due to the fact that it can only be enforced by policy and not by tech

Re: Pgrok – Poor Man’s Ngrok

#29
post #11

Has anyone tried this for a free ngrok alternative that works with HTTPS, doesn't require setting up a server and has no rate limit within reason? https://developers.cloudflare.com/pages/how-to/preview-with-... Based on the page it looks like you can install Cloudflare's CLI and then run `cloudflared tunnel --url http://localhost:3000 `, and you'll get back a URL to visit such as https://seasonal-deck-organisms-sf.tr…

Yes, I use this a lot and it’s fantastic. Works pretty flawlessly, is fast and super simple to set up.

Re: Pgrok – Poor Man’s Ngrok

#30
post #11

Has anyone tried this for a free ngrok alternative that works with HTTPS, doesn't require setting up a server and has no rate limit within reason? https://developers.cloudflare.com/pages/how-to/preview-with-... Based on the page it looks like you can install Cloudflare's CLI and then run `cloudflared tunnel --url http://localhost:3000 `, and you'll get back a URL to visit such as https://seasonal-deck-organisms-sf.tr…

Last time I checked, if you want to use a custom domain, your domain needed to be managed by Cloudflare.
Post reply on HN