展示 HN:将线协议转换为 LLM 可以理解的结构化语句
3 分•作者: andriosr•15 天前
各位 HN 用户,我们为 Envoy 代理构建了一个扩展,可以在运行时解析请求内容并将其发送给 LLM。
我们通过添加一个确定性的 SQL 解析器、gRPC 有效载荷检查以及在调用上游之前对有效载荷进行 LLM 分析来实现这一点。
用户通过它代理无头代理流量,以便安全团队可以在提示阻止有害操作之前,通过网络流量在代理离开代理之前进行拦截。
当您指示分析流量的 LLM 阻止写入操作时,它可以通过解析二进制协议构建的结构化有效载荷,在不同协议中识别出此类操作。
它作为一个 UDS 上游运行,我们正在探索将其捆绑到 Envoy 内部以消除 UDS 跳跃。
Envoy 非常强大,但对 HTTP 以外的任何协议支持有限。基本的数据库查询解析、对请求内容的策略执行有限,大部分功能都发生在 HTTP 和 gRPC 头部或元数据上。
非常欢迎任何反馈:https://github.com/hoophq/hoop/tree/main/sidecar
查看原文
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'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://github.com/hoophq/hoop/tree/main/sidecar" rel="nofollow">https://github.com/hoophq/hoop/tree/main/sidecar</a>