Depends. There are two main approaches.
1) The original one saw the games respond quite happily to http rather than https if instructed to do so. To that end if the urls in the ROM got changed to http versions and you altered your DNS to point at your server (or more accurately the custom DNS would point at your server, which might well be on the same IP as a DNS server is nothing much to add) then yeah.
For the most part this could be done with a find/replace, though if the binary or overlays that contain the URLS are compressed you might have to decompress and recompress or dodge recompression.
https://gbatemp.net/threads/save-ni...e-online-servers-for-ds-and-wii-games.362717/
2) Later it was noted the SSL method the DS used was quite unbelievably flawed. With this it became possible to fake sign things as valid for the purposes of the DS. I am less familiar with this method as it pertains to wifi play though and hacking requirements should be minimal.
https://gbatemp.net/threads/nds-con...flaw-in-the-nintendo-ds-i-ssl-library.522011/
Most people are however content to use the wiimmfi and such setups so I don't really have any "download this and follow this guide" things for that.