mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 01:55:27 +00:00
28 lines
772 B
C#
28 lines
772 B
C#
|
using System.Text.RegularExpressions;
|
|||
|
|
|||
|
namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres.Proxy
|
|||
|
{
|
|||
|
static class DnsBlacklist
|
|||
|
{
|
|||
|
private static readonly Regex[] BlockedHosts = new Regex[]
|
|||
|
{
|
|||
|
new Regex(@"^g(.*)\-lp1\.s\.n\.srv\.nintendo\.net$"),
|
|||
|
new Regex(@"^(.*)\-sb\-api\.accounts\.nintendo\.com$"),
|
|||
|
new Regex(@"^(.*)\-sb\.accounts\.nintendo\.com$"),
|
|||
|
new Regex(@"^accounts\.nintendo\.com$")
|
|||
|
};
|
|||
|
|
|||
|
public static bool IsHostBlocked(string host)
|
|||
|
{
|
|||
|
foreach (Regex regex in BlockedHosts)
|
|||
|
{
|
|||
|
if (regex.IsMatch(host))
|
|||
|
{
|
|||
|
return true;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
return false;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|