Archived
1
0
Fork 0
forked from Mirror/Ryujinx
This repository has been archived on 2024-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
jinx/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy/DnsBlacklist.cs

28 lines
772 B
C#
Raw Normal View History

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;
}
}
}