docs/docs/rules/@.md
@ 符号用法当您希望将规则存放在远程服务器或本地项目文件中,并让 Whistle 自动同步更新时,可以利用规则中的 @ 符号实现。
@path)动态加载外部规则文件内容,Whistle 会定时从规则文件更新内容。
使用格式: @文件路径或URL
支持类型:
@https://example.com/rules.txt@~/projects/rules.txt(支持所有操作系统路径)@whistle.nohost/api/rules(需插件实现接口)Windows 路径兼容性:支持混用
/和\作为路径分隔符:txt@C:/whistle/rules.txt @D:\config\proxy.rules
@https://raw.githubusercontent.com/your-org/configs/master/whistle-rules.txt
@/Users/username/projects/my-app/whistle-config.txt
@~/dev/configs/rules.txt # 使用用户目录
@whistle.nohost/api/rules
# 引入团队共享的基础规则
@https://team.example.com/configs/base-rules.txt
# 引入个人项目特定规则
@~/projects/my-app/whistle-overrides.txt
引入的外部文件应包含标准的 Whistle 规则语法:
# 远程规则文件示例
www.example.com proxy://127.0.0.1:8080
api.example.com resCors://*
static.example.com cache://3600