doc: 添加拦截器配置说明
parent
88687e8709
commit
04decbed48
|
@ -35,8 +35,71 @@
|
|||
| 响应篡改拦截器 | responseReplace | 203 |
|
||||
| 脚本拦截器 | script | 211 |
|
||||
|
||||
# 5. 域名白名单:
|
||||
3. 配置示例:
|
||||
```json
|
||||
"*.example.com": {
|
||||
".*":{ //后续url匹配规则
|
||||
// 请求篡改配置
|
||||
"requestReplace": {
|
||||
"headers": {
|
||||
"User-Agent": "Mozilla/5.0", // 替换User-Agent
|
||||
"Referer": "[remove]" // 删除Referer头
|
||||
},
|
||||
"doDownload": true // 启用下载请求处理.要转换为下载请求,需要 responseReplace 拦截器的配合使用
|
||||
},
|
||||
|
||||
// 代理配置
|
||||
"proxy": "proxy.example.com", // 代理目标地址
|
||||
"backup": [ // 备用代理服务器列表
|
||||
"backup1.example.com",
|
||||
"backup2.example.com"
|
||||
],
|
||||
|
||||
//"proxy": "https://$1.proxy.com",
|
||||
//"replace": "https://(.*?)\\.example\\.com"
|
||||
//使用${path}数组捕获和替换
|
||||
|
||||
"sni": "example.com", // SNI服务器名称指示
|
||||
"unVerifySsl": true, // 跳过SSL证书验证
|
||||
|
||||
// 基本拦截配置
|
||||
"abort": false, // 是否拦截请求(返回403)
|
||||
"success": true, // 是否快速返回成功(返回200)
|
||||
|
||||
"cacheDays": 365, // 缓存天数
|
||||
//cache系列包含如下关键词:cacheSecods,cacheMinutes,cacheHours,cacheDays,cacheWeeks,cacheMonths,cacheYears
|
||||
|
||||
// OPTIONS请求配置
|
||||
"options": {
|
||||
"headers": {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Access-Control-Allow-Methods": "GET", //不设置默认返回GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH
|
||||
"Access-Control-Allow-Headers": "Content-Type, X-Requested-With, X-Custom-Header", //不设置默认返回*
|
||||
"Access-Control-Max-Age": "86400" //不设置默认一个月
|
||||
}
|
||||
}
|
||||
|
||||
// 响应篡改配置
|
||||
"responseReplace": {
|
||||
"headers": {
|
||||
"Cache-Control": "no-cache", // 禁用缓存
|
||||
"X-Powered-By": "[remove]", // 删除服务器信息头
|
||||
"Access-Control-Allow-Origin": "*" // 添加CORS头
|
||||
},
|
||||
"doDownload": true // 强制响应为文件下载
|
||||
},
|
||||
"cacheExcludeStatusCodeList":[200], // 缓存排除状态码列表
|
||||
"cacheMinStatusCode": 200, // 缓存最小状态码,默认200
|
||||
"cacheMaxStatusCode": 303, // 缓存最大状态码,默认303
|
||||
"cacheControlType": "public", // 缓存控制类型,默认public,可选private
|
||||
"cacheImmutable": true,
|
||||
|
||||
"tampermonkeyScript": "UrlOrPathToTampermonkeyScript.js", // 注入Tampermonkey
|
||||
"script" : "UrlOrPathToYourScript.js" //支持数组,填入多个地址
|
||||
}
|
||||
}
|
||||
```
|
||||
# 5. 域名白名单:
|
||||
# 6. DNS服务管理:
|
||||
|
||||
## 6.1. 配置 `DNS-over-HTTPS` 的DNS服务:
|
||||
|
|
Loading…
Reference in New Issue