aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy')
-rw-r--r--Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy/DnsBlacklist.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy/DnsBlacklist.cs b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy/DnsBlacklist.cs
new file mode 100644
index 00000000..db499e24
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy/DnsBlacklist.cs
@@ -0,0 +1,28 @@
+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;
+ }
+ }
+} \ No newline at end of file