melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
3.19k stars 527 forks source link

WFC DNS override [feature request] #590

Open James-E-A opened 4 years ago

James-E-A commented 4 years ago

Nintendo WFC is dead—but it appears that, due to a flaw in most DS games' SSL verification policy, switching to an alternate WFC server doesn't necessarily require patches (for affected games).

Provided the WFC server operator has implemented nds-constraint, (which it seems that the major provider has done,) to switch requires nothing more than spoofing a DNS entry (or switching the DS to a server that spoofs it for you—an apparently popular solution.)

To use a third-party DNS spoofing server, however (Wiimmfi doesn't run their own; the given+common one is just a courtesy/synergy service by RiiConnect24), adds an additional layer of fragility and extra servers that must be maintained to the pipeline.

Would it be in-scope at all for the networking layer of a DS emulator to intercept+override DNS requests for known Nintendo WFC domains?

James-E-A commented 4 years ago

Now, the catch is: identifying the complete domain list…

While drafting this reply, I think I found a seemingly-comprehensive list. It contains a few extra entries, but looks like it probably contains all Nintendo's entries.

ghost commented 4 years ago

You can already override the DNS in MelonDS when you change the DNS used in the WFC setup options.

James-E-A commented 4 years ago

You can already override the DNS in MelonDS when you change the DNS used in the WFC setup options.

I believe there's a misunderstanding:

To use a third-party DNS spoofing server, however…adds an additional layer of fragility and extra servers that must be maintained to the pipeline.

You correctly mention that the DS contains perfectly adequate tools to override the DNS server

However, this adds extra failure points when (as is the case currently, AFAICT,) the spoofing DNS server is run by a different entity than the WFC server it directs requests to.

If my exact desire is to override the DNS records for the Nintendo WFC domains to my preferred WFC server's IP, is it necessary to drag in a 3rd-party service to do this when the game is already operating inside a "faked" network environment made of user-operated software?

RSDuck commented 4 years ago

realising this for indirect mode would not be too hard, as far as I am concerned, though I'm not really an expert in wifi emulation.

ghost commented 4 years ago

BTW if its about error 20110 or 20100 I think it happens on real consoles too.

nathanielcwm commented 4 years ago

https://github.com/RiiConnect24/DNS-Server

riiconnect has a self hosted version btw

maybe the code could help?