38 lines
1.7 KiB
JSON
38 lines
1.7 KiB
JSON
{
|
||
// 新增的子配置文件appsettings.*.json,重启应用程序才生效
|
||
"FastGithub": {
|
||
"HttpProxyPort": 38457, // http代理端口,linux/osx平台使用
|
||
"FallbackDns": [ // 以下dns必须要支持tcp
|
||
"8.8.8.8:53",
|
||
"119.29.29.29:53",
|
||
"114.114.114.114:53"
|
||
],
|
||
"DomainConfigs": {
|
||
"*.fastgithub.com": { // 域名的*表示除.之外0到多个任意字符
|
||
"TlsSni": false, // 指示tls握手时是否发送SNI
|
||
"TlsSniPattern": null, // SNI表达式,@domain变量表示取域名值 @ipaddress变量表示取ip @random变量表示取随机值,其它字符保留不替换
|
||
"TlsIgnoreNameMismatch": false, // 是否忽略服务器证书域名不匹配,当不发送SNI时服务器可能发回域名不匹配的证书,默认为false
|
||
"Timeout": null, // 请求超时时长,格式为"00:02:00",默认为null
|
||
"IPAddress": null, // 请求的ip,默认为null
|
||
"Destination": null, // 请求目的地,格式为绝对或相对Uri,默认null
|
||
"Response": { // 阻断请求直接响应,设置了Response其它配置都不起作用了
|
||
"StatusCode": 404, // 响应的状态码
|
||
"ContentType": "text/plain;charset=utf-8", // 如果有ContentValue,就要指示ContentType
|
||
"ContentValue": "这是一个用于示范配置的域名" // 自定义返回的内容,这是可选的
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"Serilog": {
|
||
"MinimumLevel": {
|
||
"Default": "Information",
|
||
"Override": {
|
||
"Yarp": "Warning",
|
||
"System": "Warning",
|
||
"Microsoft": "Warning",
|
||
"Microsoft.AspNetCore.Server.Kestrel": "Error"
|
||
}
|
||
}
|
||
}
|
||
}
|