TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: PGT-Proxy – A PostgreSQL Proxy in 277 Lines of Rust

10 点作者 galeaspablo8 个月前
It&#x27;s time we talked about something many developers, data analysts, and even web application servers are guilty of: downgrading PostgreSQL connection security. Too often, we see connections dropped from full TLS verification to &quot;any TLS&quot; (i.e., sslmode=require) or, even worse, plain text connections. Why? Because most cloud providers, like AWS or Google Cloud SQL, use non-public Certificate Authorities for PostgreSQL. The result? Unverified TLS connections because no one has time to set up all devices across an organization to trust custom certificate authorities.<p>And here&#x27;s the most egregious part: some vendors that need to connect to your database outright recommend downgrading TLS, disabling TLS, or placing private databases in public subnets. I was so fed up of seeing this.<p>So I wrote and open sourced PGT-Proxy!<p>== What is PGT-Proxy? ==<p>PGT-Proxy is an intermediary server that securely bridges TLS-enabled PostgreSQL clients and servers. It acts as a reverse proxy with support for PostgreSQL&#x27;s unique TLS protocol, which requires bidirectional transmission of special bytes before initiating the TLS handshake. The protocol is why you can&#x27;t just stick a load balancer in front of a PostgreSQL database and expect it to work.<p>== Key Features ==<p>TLS Termination and Initiation: PGT-Proxy handles TLS connections on both the client and server sides, ensuring end-to-end encryption.<p>Certificate Management: Supports custom certificate authorities, enabling full TLS verification even with non-public CAs.<p>Binary or Dockerized Deployment: Deploy with a binary or available as a Docker image on Docker Hub, making it easy to integrate into your existing infrastructure.<p>Small Footprint: PGT-Proxy is built on Rust, with a very lightweight Docker image that is limited to a trimmed OS and a binary file for PGT-Proxy.<p>== Why I Built PGT-Proxy ==<p>Our customers needed secure connections from our network to their private PostgreSQL databases, without the hassle of managing custom CAs or setting up complex network configurations. We realized that the lack of straightforward tools enforcing proper TLS connections led many to adopt insecure practices. By creating PGT-Proxy, I aim to make secure, fully verified TLS connections simple and accessible.<p>== Try It ==<p>You can see the source code on GitHub, use the public docker image, and let me know what you think. I&#x27;m around to answer questions, take feedback, or even show you how to use it (the docs are pretty good, but my email is on my profile if you need me).<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ambarltd&#x2F;pgt-proxy">https:&#x2F;&#x2F;github.com&#x2F;ambarltd&#x2F;pgt-proxy</a> <a href="https:&#x2F;&#x2F;hub.docker.com&#x2F;r&#x2F;ambarltd&#x2F;pgt-proxy" rel="nofollow">https:&#x2F;&#x2F;hub.docker.com&#x2F;r&#x2F;ambarltd&#x2F;pgt-proxy</a>

暂无评论

暂无评论