diff --git a/USBHelperLauncher/Net/Proxy.cs b/USBHelperLauncher/Net/Proxy.cs index 6aec444..58b358f 100644 --- a/USBHelperLauncher/Net/Proxy.cs +++ b/USBHelperLauncher/Net/Proxy.cs @@ -27,7 +27,8 @@ class Proxy : IDisposable new ContentEndpoint(), new ApplicationEndpoint(), new RegistrationEndpoint(), - new SiteEndpoint() + new SiteEndpoint(), + new WiiUShopEndpoint() }; private ushort port; @@ -59,7 +60,7 @@ private void FiddlerApplication_BeforeRequest(Session oS) { if (oS.HTTPMethodIs("CONNECT")) { - if(oS.hostname.EndsWith("wiiuusbhelper.com")) + if (oS.hostname.EndsWith("wiiuusbhelper.com")) { oS.oFlags["X-ReplyWithTunnel"] = "Fake for HTTPS Tunnel"; } diff --git a/USBHelperLauncher/Net/WiiUShopEndpoint.cs b/USBHelperLauncher/Net/WiiUShopEndpoint.cs new file mode 100644 index 0000000..986d234 --- /dev/null +++ b/USBHelperLauncher/Net/WiiUShopEndpoint.cs @@ -0,0 +1,26 @@ +using Fiddler; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace USBHelperLauncher.Net +{ + class WiiUShopEndpoint : Endpoint + { + public WiiUShopEndpoint() : base("ccs.cdn.wup.shop.nintendo.net") { } + + protected WiiUShopEndpoint(string hostName) : base(hostName) { } + + [Request("/*")] + public void Get(Session oS) + { + oS.utilCreateResponseAndBypassServer(); + oS.oResponse.headers.SetStatus(307, "Redirect"); + oS.oResponse["Location"] = "http://ccs.cdn.c.shop.nintendowifi.net" + oS.PathAndQuery; + Proxy.LogRequest(oS, this, "Redirecting to http://ccs.cdn.c.shop.nintendowifi.net" + oS.PathAndQuery); + } + } +} diff --git a/USBHelperLauncher/USBHelperLauncher.csproj b/USBHelperLauncher/USBHelperLauncher.csproj index e755cac..cc37995 100644 --- a/USBHelperLauncher/USBHelperLauncher.csproj +++ b/USBHelperLauncher/USBHelperLauncher.csproj @@ -103,6 +103,7 @@ + Form