展示HN:将线协议转换为大型语言模型可以理解的结构化语句

3作者: andriosr12 天前原帖
嗨,HN,我们开发了一个扩展,用于 Envoy 代理,它在运行时解析请求内容并将其发送给大型语言模型(LLM)。<p>我们通过添加一个确定性的 SQL 解析器、gGRPC 负载检查和对负载的 LLM 分析来实现这一点,然后再进行上游调用。<p>用户使用它来代理无头代理的流量,以便安全团队可以通过网络流量阻止有害操作的提示,确保这些操作在离开代理之前被拦截。<p>当你告诉分析流量的 LLM 阻止写入时,它会通过查看我们从解析二进制协议构建的结构化负载,识别出不同协议中的写入操作。<p>它作为一个 UDS 上游运行,我们正在探索将其打包到 Envoy 中,以消除 UDS 跳转。<p>Envoy 非常出色,但对 HTTP 以外的内容支持有限。基本的数据库查询解析、对请求内容的政策执行较少,大部分操作发生在 HTTP 和 gRPC 的头部或元数据上。<p>期待听到任何反馈:<a href="https://github.com/hoophq/hoop/tree/main/sidecar" rel="nofollow">https://github.com/hoophq/hoop/tree/main/sidecar</a>
查看原文
Hi HN, we built an extension to Envoy proxy that parses and sends contents of requests to an LLM at runtime.<p>We do that by adding a deterministic SQL parser, gGRPC payload inspection and LLM analysis of the payload before upstream call.<p>Users are proxying headless agents traffic with it so that sec teams can have their prompts blocking harmful actions via network traffic before it leaves the agent.<p>When you tell the LLM analyzing the traffic to block writes, it will spot it across the different protocols by looking at the structured payload we build from parsing the binary protocol.<p>It runs as a UDS upstream, and we&#x27;re exploring bundling it inside envoy to remove the UDS hop.<p>Envoy is incredible, but it has limited support for anything outside http. Basic database query parsing, little policy enforcement on request contents, most of the stuff happens on HTTP and gRPC headers or metadata.<p>Would love to hear any feedback: <a href="https:&#x2F;&#x2F;github.com&#x2F;hoophq&#x2F;hoop&#x2F;tree&#x2F;main&#x2F;sidecar" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hoophq&#x2F;hoop&#x2F;tree&#x2F;main&#x2F;sidecar</a>