agent-route README

The project's README from github.com/ryuu-restart/agent-route. As one markdown file: README.md.

AgentRoute

想用 Claude?把代理规则和浏览器防护交给 Agent。

沿用你的客户端和节点。复制一段提示词,让 Agent 备份配置、替换旧规则、配好浏览器,再交付检测结果。

自动构建 规则库发布时间

快速开始 · 接入前后对比 · 规则直链 · 浏览器验收

三步接入:Agent 读取说明与索引,备份并替换旧业务规则;五类规则按序匹配,另接入 WebRTC 防护,未匹配走代理;检查所有浏览器并完成 IP、DNS、WebRTC 验收。

先备份,再覆盖,最后实测。 沿用节点与订阅,Agent 按客户端版本完成接入;规则每日校验发布,恢复方法随结果一起交付。

快速开始

准备好可用的代理客户端和节点,复制下面的提示词,交给能操作本机文件和浏览器的 Codex 等 Agent。遇到系统或浏览器要求本人确认时,按 Agent 提示完成确认即可。

请读取 https://raw.githubusercontent.com/ryuu-restart/agent-route/master/AGENTS.md 及其中的规则索引,按规范接入现用客户端。
我授权先备份,再替换旧业务分流和默认兜底,保留节点订阅与必要技术规则;安装 webrtc-guard,执行客户端重载和一次现有节点订阅刷新。
我授权关闭现用代理软件的 IPv6,并在重载后确认设置已生效。
检查本机已安装的所有浏览器,在实际使用的配置档自动安装并配置 WebRTC 防护;我接受可能影响通话、会议和 P2P。
我授权将本机系统时区修改为台湾(台北),并关闭系统定位服务。
核对环境后直接执行,完成实际分流与 IP、DNS、WebRTC 检测,交付结果、备份与恢复方法;未核实项注明未验证。

[!CAUTION] 禁止使用 Claude(包括 Claude Code 及其他基于 Claude 模型的 Agent) 执行本项目的接入、复查或维护任务。

接入前后对照:同一 Chrome 配置档、同一节点

同一个 Chrome 配置档,同一个节点。 这次 FlClash + Chrome 试跑中,WebRTC 从 9 项中 3 项返回直连 IP,变为 9 项均未报告泄露。

2026-11-12 接入前后对照,Chrome 本次 WebRTC 探测有改善。下方文字版与完整记录提供对应数据。

2026-11-12 用户试跑,来自截图与 Agent 回报:

  • Chrome WebRTC:接入前 9 项中 3 项返回直连 IP;接入后 9 项均未报告泄露。
  • DNS 截图可见结果:接入前为国内电信及香港解析器;接入后为香港 Google / Cloudflare,未出现前图的国内电信。
  • 规则入口:从 2,822 条、0 个外部资源,变为 27 条入口及 5 个远程规则集。
  • 节点与策略组:前后均为 15 个节点、26 个策略组。

查看完整测试记录与未验证项

规则直链

五类业务规则按 01 → 05 匹配,首条命中即采用对应动作。未匹配的流量默认走代理;PROXY 由 Agent 映射到你的可用代理策略组。

顺序 业务规则 动作 Mihomo Surge / 小火箭 sing-box
01 内网直连 private DIRECT YAML LIST JSON
02 广告拦截 reject REJECT YAML LIST JSON
03 海外代理 proxy PROXY YAML LIST JSON
04 国内直连 direct DIRECT YAML LIST JSON
05 中国 IP 兜底 cn-ip DIRECT YAML LIST JSON

独立 WebRTC 防护:放在必要技术规则之后、普通公网 DNS 地址例外和上述业务规则之前。

防护 动作 Mihomo Surge / 小火箭 sing-box
WebRTC 探测拦截 REJECT YAML¹ LIST JSON

¹ Mihomo 使用 classical 格式。小火箭与 Surge 共用同一个 LIST 地址,小火箭的远程加载和实际拦截仍待真机验证。防护拒绝已被客户端接管的常见探测,可能影响通话、会议及 P2P。接入顺序与覆盖范围

规则经校验后发布到 release,由客户端按设置刷新,建议间隔 24 小时。

按客户端取用:格式入口、完整索引与可选模板

Agent 格式入口: Clash / Mihomo · Surge · Shadowrocket · sing-box · 完整索引

手动接入参考 · 可选模板与历史验证

想知道两版名单增删了什么,或一个域名会先命中哪条规则,可以查看本地查询示例。

在完整索引的 format_variants 中可以查找当版提供的 MRS、SRS 和 Surge 纯域名列表。可选格式与使用方法

浏览器防护与验收

  1. Agent 自动配置,再回读确认。 检查本机所有浏览器,在实际使用的配置档操作。Chrome / Edge 补装并启用 WebRTC Network Limiter,设为 Use my proxy server (if present)(disable_non_proxied_udp);已有扩展也核对设置。
  2. Agent 在同一配置档完成三项检测。 交付网页出口、DNS 解析器与 WebRTC 结果,核对适用的音视频功能。你也可以从下面三个入口复测。

IP 检测 · DNS 检测 · WebRTC 检测

其他浏览器、受限情况与完整验收标准

其他浏览器由 Agent 按实际版本继续配置:Firefox 核对原生入口;Safari 优先核对网络层的 UDP 与 IPv6 路径。系统或浏览器要求本人确认时,Agent 准备好步骤再提示你;没有可核实方案的标为待配置。

结果还应包含旧规则替换情况、Claude 请求的实际出站、订阅刷新后的复查、备份与恢复方法;未核实项注明未验证。

浏览器配置与官方依据 · 完整验收标准

问题反馈

提交 GitHub Issue

反馈时附上系统与客户端版本;请隐去订阅链接、节点地址、凭据和真实 IP。脱敏说明

进阶文档、规则来源与许可

Agent 接入说明 · 可选模板与历史验证 · DNS / WebRTC 验收 · 同步与回退 · 维护说明

规则来源与处理方式见 NOTICE、sources.json;本仓库许可与上游许可分别适用。

agent-route (ryuu-restart/agent-route)

gfwlist
Searching Database…

What is this?AgentRoute maintains a daily-refreshed set of proxy routing rules: domestic sites go direct, overseas sites go through your own proxy node, listed ads get blocked, and your LAN stays untouched. It ships in Mihomo/Clash Meta, Surge/Shadowrocket, and sing-box formats.
Is this proxy software, or just rule files?Just rule files. It provides no nodes or subscriptions and is not a proxy app itself — you load its rules into a client you already have (Mihomo/Clash Meta, Surge/Shadowrocket, or sing-box).
How do I set it up?Copy the full prompt from the README and give it to an AI agent such as Claude Code or Codex; the agent walks through loading the rules and tells you exactly what to do whenever manual steps are needed.
What do I need before starting?A proxy client (Mihomo, FlClash, Clash Verge Rev, Surge, Shadowrocket, or sing-box), your own node or subscription, and an AI agent that can actually touch your device, like Claude Code or Codex — a web chat window can only give advice, not configure anything.
What if I lose internet after applying the rules?Turn off the system proxy and TUN (or enhanced mode / VPN toggle) in your client first — connectivity usually comes back — then have the agent restore the config from backup.
Can my coding agent set this up on my phone too?Usually not directly — agents typically can't reach a phone, so it generates the config and walks you through manual import instead. Shadowrocket support has only been text-structure checked and not verified live on an iPhone.
What happens if a daily rule update fails validation?The pipeline keeps the last known-good rule set instead of pushing a broken update, so your routing never breaks from a bad sync.
How do I keep the rules current over time?Rule lists usually auto-refresh inside your client, but template and doc changes need manual tracking via commit history; you can have the agent auto-sync a branch, deploy to a VPS to pull periodically, or update by hand.
What maintenance tools does it provide?It includes sync, verify, status, and rollback tools so you (or your agent) can keep rules fresh and revert bad updates quickly.
Does it do anything beyond routing rules?Yes — it also documents DNS and WebRTC leak protection, including fixes and verification commands to confirm they're working.
Size
9 MB
Stars
736
Updated
CommitNov 18
Age
1mo
Commits · 90 Days