mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-20 05:06:33 +00:00
Patch up DNS Blacklist (#2153)
Make the regex patterns case insensitive for robustness
This commit is contained in:
parent
0ee314fb3b
commit
4443e18909
1 changed files with 6 additions and 4 deletions
|
@ -4,12 +4,14 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres.Proxy
|
||||||
{
|
{
|
||||||
static class DnsBlacklist
|
static class DnsBlacklist
|
||||||
{
|
{
|
||||||
|
const RegexOptions RegexOpts = RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.Compiled;
|
||||||
|
|
||||||
private static readonly Regex[] BlockedHosts = new Regex[]
|
private static readonly Regex[] BlockedHosts = new Regex[]
|
||||||
{
|
{
|
||||||
new Regex(@"^g(.*)\-lp1\.s\.n\.srv\.nintendo\.net$"),
|
new Regex(@"^g(.*)\-lp1\.s\.n\.srv\.nintendo\.net$", RegexOpts),
|
||||||
new Regex(@"^(.*)\-sb\-api\.accounts\.nintendo\.com$"),
|
new Regex(@"^(.*)\-sb\-api\.accounts\.nintendo\.com$", RegexOpts),
|
||||||
new Regex(@"^(.*)\-sb\.accounts\.nintendo\.com$"),
|
new Regex(@"^(.*)\-sb\.accounts\.nintendo\.com$", RegexOpts),
|
||||||
new Regex(@"^accounts\.nintendo\.com$")
|
new Regex(@"^accounts\.nintendo\.com$", RegexOpts)
|
||||||
};
|
};
|
||||||
|
|
||||||
public static bool IsHostBlocked(string host)
|
public static bool IsHostBlocked(string host)
|
||||||
|
|
Loading…
Reference in a new issue