aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2021-03-24 18:43:23 +0100
committerGitHub <noreply@github.com>2021-03-24 18:43:23 +0100
commite5741fae2d4c7baa63d71f7fb56ea7d0eac8fe36 (patch)
treede0e9fefb17912c05551a8892141b54288c34f01 /Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/Proxy
parent69f8722e795b0d76b84efa4de52e199e9441fca7 (diff)
sfdnsres: Cleanup service and implements some calls (#2130)
* sfdnsres: Cleanup service and implements some calls This PR is a big cleanup to our current implementation of `sfdnsres` service. Additionnaly to that, some calls and fix have been done by @Thog (PRd with approval, thanks to her). - Implementation of `GetAddrInfoRequest` (Fixes #637). - Partial implementation of `GetHostByNameRequestWithOptions`, `GetHostByAddrRequestWithOptions` and `GetAddrInfoRequestWithOptions` (Fixes #642, Fixes #1233). A DNS Blacklist have been done by @riperiperi (which is currently used in LDN build, then that reduces code differences between the LDN build and master. Now a lot of games are playable or are blocked to the menu because it needs online service: Co-Authored-By: Mary <1760003+Thog@users.noreply.github.com> Co-Authored-By: riperiperi <6294155+riperiperi@users.noreply.github.com> * Addressed gdkchan's comments * IPAddress[] to IEnumerable * Nits Co-authored-by: Mary <1760003+Thog@users.noreply.github.com> Co-authored-by: riperiperi <6294155+riperiperi@users.noreply.github.com>
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