Connect to postgres from Workers through tunnel. Is it still possible?
https://blog.cloudflare.com/introducing-socket-workers
https://github.com/cloudflare/worker-template-postgres
Based on this blog post and the template on github, it looks like they used a custom driver to accomplish that. However, the blog and repository were last updated three years ago, and I think things have changed a lot now.
I tried running this sample, but the dependencies were old (wrangler v1) and I didn't know how to migrate them.
Is it currently possible to achieve the same? The purpose is to securely connect to on-premises postgres from workers. hyperdrive requires a publicly accessible postgres, so it doesn't seem fit for this purpose.
https://github.com/cloudflare/worker-template-postgres
Based on this blog post and the template on github, it looks like they used a custom driver to accomplish that. However, the blog and repository were last updated three years ago, and I think things have changed a lot now.
I tried running this sample, but the dependencies were old (wrangler v1) and I didn't know how to migrate them.
Is it currently possible to achieve the same? The purpose is to securely connect to on-premises postgres from workers. hyperdrive requires a publicly accessible postgres, so it doesn't seem fit for this purpose.
The Cloudflare Blog
The ability to make TCP and QUIC client connections from within Workers and Durable Objects, as well as the ability to connect to Workers over TCP and QUIC without using HTTP, will be coming to Cloudflare Workers. However, there is much to consider and a lot to do to make it happen. Here’s a peek at what we’re working on.
GitHub
Reference demo and modified PostgreSQL driver to connect Cloudflare Workers to a relational database. - cloudflare/worker-template-postgres