Skip to content

Commit

Permalink
fix +rd.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
mili-tan committed Mar 16, 2023
1 parent 7fe44cf commit d5f689f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ArashiDNS.C.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
<PackageReference Include="System.Runtime.Caching" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
<RdXmlFile Include="./rd.xml" />
</ItemGroup>
</Project>
6 changes: 1 addition & 5 deletions DnsCache.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Caching;
using ARSoft.Tools.Net;
using System.Runtime.Caching;
using ARSoft.Tools.Net.Dns;

namespace ArashiDNS
Expand Down
3 changes: 2 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static class Program
{
public static IServiceProvider ServiceProvider = new ServiceCollection().AddHttpClient().BuildServiceProvider();
public static IHttpClientFactory? ClientFactory = ServiceProvider.GetService<IHttpClientFactory>();
public static string DohUrl = "https://arashi.eu.org/dns-query";
public static string DohUrl = "https://hk.pro.xns.one/@milkey233/dns-query";
public static TimeSpan Timeout = TimeSpan.FromMilliseconds(3000);
public static Version MyHttpVersion = new(3,0);
public static bool UseCache = true;
Expand Down Expand Up @@ -76,6 +76,7 @@ private static async Task ServerOnQueryReceived(object sender, QueryReceivedEven
if (UseCache && DnsCache.Contains(query.Questions))
{
response.AnswerRecords.AddRange(DnsCache.Get(query.Questions));
e.Response = response;
return;
}

Expand Down
8 changes: 8 additions & 0 deletions rd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<Assembly Name="System.Configuration.ConfigurationManager">
<Type Name="System.Configuration.ClientConfigurationHost" Dynamic="Required All" />
<Type Name="System.Configuration.AppSettingsSection" Dynamic="Required All" />
</Assembly>
</Application>
</Directives>

0 comments on commit d5f689f

Please sign in to comment.