aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE
diff options
context:
space:
mode:
authormageven <62494521+mageven@users.noreply.github.com>2021-03-30 04:25:53 +0530
committerGitHub <noreply@github.com>2021-03-30 00:55:53 +0200
commit4443e1890958cc01b523207736f74c58767f4017 (patch)
treefadf4423bc8fbfc6937a15021f54211bcaeafe40 /Ryujinx.HLE
parent0ee314fb3b9d476d0d207a3595bde24af9c4b69b (diff)
Patch up DNS Blacklist (#2153)
Make the regex patterns case insensitive for robustness
Diffstat (limited to 'Ryujinx.HLE')
-rw-r--r--Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy/DnsBlacklist.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy/DnsBlacklist.cs b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy/DnsBlacklist.cs
index db499e24..b2045506 100644
--- a/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy/DnsBlacklist.cs
+++ b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy/DnsBlacklist.cs
@@ -4,12 +4,14 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres.Proxy
{
static class DnsBlacklist
{
+ const RegexOptions RegexOpts = RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.Compiled;
+
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$")
+ new Regex(@"^g(.*)\-lp1\.s\.n\.srv\.nintendo\.net$", RegexOpts),
+ new Regex(@"^(.*)\-sb\-api\.accounts\.nintendo\.com$", RegexOpts),
+ new Regex(@"^(.*)\-sb\.accounts\.nintendo\.com$", RegexOpts),
+ new Regex(@"^accounts\.nintendo\.com$", RegexOpts)
};
public static bool IsHostBlocked(string host)