合并配置,因为子配置变化无法侦测,bug?
This commit is contained in:
parent
e19c8e9f36
commit
fc30a8074b
@ -1,9 +1,6 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace FastGithub
|
||||
{
|
||||
@ -33,13 +30,6 @@ namespace FastGithub
|
||||
{
|
||||
c.ValidateOnBuild = false;
|
||||
})
|
||||
.ConfigureAppConfiguration(c =>
|
||||
{
|
||||
foreach (var jsonFile in Directory.GetFiles(".", "appsettings.*.json"))
|
||||
{
|
||||
c.AddJsonFile(jsonFile, optional: true, reloadOnChange: true);
|
||||
}
|
||||
})
|
||||
.ConfigureServices((ctx, services) =>
|
||||
{
|
||||
services.AddAppUpgrade();
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
{
|
||||
"FastGithub": {
|
||||
"DomainConfigs": { // 域名的*表示0到多个任意字符
|
||||
"github.com": {
|
||||
"TlsSni": false, // 指示tls握手时是否发送SNI
|
||||
"Timeout": null, // 请求超时时长,格式为"00:02:00",默认为null
|
||||
"Destination": null // 请求目的地,格式为绝对或相对Uri,默认null
|
||||
},
|
||||
"githubstatus.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*.github.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*.github.io": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*.githubapp.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*.githubassets.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*.githubusercontent.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*github*.s3.amazonaws.com": {
|
||||
"TlsSni": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,65 @@
|
||||
"FastDns": { // 用于解析不在DomainConfigs的域名
|
||||
"IPAddress": "114.114.114.114",
|
||||
"Port": 53
|
||||
},
|
||||
"DomainConfigs": { // 域名的*表示0到多个任意字符
|
||||
"github.com": {
|
||||
"TlsSni": false, // 指示tls握手时是否发送SNI
|
||||
"Timeout": null, // 请求超时时长,格式为"00:02:00",默认为null
|
||||
"Destination": null // 请求目的地,格式为绝对或相对Uri,默认null
|
||||
},
|
||||
"githubstatus.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*.github.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*.github.io": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*.githubapp.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*.githubassets.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*.githubusercontent.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"*github*.s3.amazonaws.com": {
|
||||
"TlsSni": false
|
||||
},
|
||||
"ajax.googleapis.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://gapis.geekzu.org/ajax/"
|
||||
},
|
||||
"fonts.googleapis.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://fonts.geekzu.org/"
|
||||
},
|
||||
"themes.googleusercontent.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://gapis.geekzu.org/g-themes/"
|
||||
},
|
||||
"fonts.gstatic.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://gapis.geekzu.org/g-fonts/"
|
||||
},
|
||||
"secure.gravatar.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://sdn.geekzu.org/"
|
||||
},
|
||||
"*.gravatar.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://fdn.geekzu.org/"
|
||||
},
|
||||
"i.stack.imgur.com": {
|
||||
"Response": { // 直接响应
|
||||
"StatusCode": 404,
|
||||
"ContentType": "text/plain;charset=utf-8",
|
||||
"ContentValue": "阻断的请求"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Logging": {
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
{
|
||||
"FastGithub": {
|
||||
"DomainConfigs": { // 域名的*表示0到多个任意字符
|
||||
"ajax.googleapis.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://gapis.geekzu.org/ajax/"
|
||||
},
|
||||
"fonts.googleapis.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://fonts.geekzu.org/"
|
||||
},
|
||||
"themes.googleusercontent.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://gapis.geekzu.org/g-themes/"
|
||||
},
|
||||
"fonts.gstatic.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://gapis.geekzu.org/g-fonts/"
|
||||
},
|
||||
"secure.gravatar.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://sdn.geekzu.org/"
|
||||
},
|
||||
"*.gravatar.com": {
|
||||
"TlsSni": true,
|
||||
"Destination": "https://fdn.geekzu.org/"
|
||||
},
|
||||
"i.stack.imgur.com": {
|
||||
"Response": { // 直接响应
|
||||
"StatusCode": 404,
|
||||
"ContentType": "text/plain;charset=utf-8",
|
||||
"ContentValue": "阻断的请求"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user