Rules 概览
此页面由
docs/rules/README.md自动同步生成。
Bifrost 规则协议手册
Section titled “Bifrost 规则协议手册”本目录用于按“协议”拆分说明规则的具体能力(如路由、请求/响应修改、脚本、WebSocket 等)。
在阅读本目录前,建议先了解整体语法与基础概念:
- 规则整体语法:rule.md
- URL 匹配(pattern):pattern.md
- 操作指令(operation/value/模板变量/Values 引用):operation.md
- 匹配模式详解:patterns.md
- 规则优先级与执行顺序:rule-priority.md
- 路由与转发规则:routing.md
- 请求修改规则:request-modification.md
- 响应修改规则:response-modification.md
- URL 操作规则:url-manipulation.md
- Body 操作规则:body-manipulation.md
- 状态码与重定向:status-redirect.md
- 延迟与限速规则:timing-throttle.md
- 过滤器规则:filters.md
- 脚本规则:scripts.md
- WebSocket 规则:websocket.md
快速索引(按能力分类)
Section titled “快速索引(按能力分类)”1) 路由与转发
Section titled “1) 路由与转发”host/xhosthttp/httpsws/wsshttp3/h3proxy/pacredirectfile/tpl/rawfile
详见:routing.md、status-redirect.md
2) 请求修改
Section titled “2) 请求修改”- 头部/Cookie:
reqHeaders、reqCookies - 方法与常用字段:
method、ua、referer - CORS:
reqCors - Body:
reqBody、reqReplace、params(兼容别名reqMerge)
详见:request-modification.md、body-manipulation.md
3) 响应修改
Section titled “3) 响应修改”- 头部/Cookie/CORS:
resHeaders、resCookies、resCors - Body:
resBody、resReplace、resMerge - 状态码:
statusCode/replaceStatus
详见:response-modification.md、body-manipulation.md、status-redirect.md
4) URL 操作
Section titled “4) URL 操作”urlParamspathReplace
5) 脚本与 decode
Section titled “5) 脚本与 decode”reqScript/resScriptdecode
详见:scripts.md(脚本规则)与 ../scripts.md(管理端 Scripts 使用与开发指南)
6) WebSocket
Section titled “6) WebSocket”ws/wss
详见:websocket.md