@VGMoose So I think I'm onto something.
I was doing this: https://www.reddit.com/r/SwitchHacks/comments/1dggbrl/news_applet_as_a_plex_client_on_hos/
And on one of my steps to develop it further, I patched a couple binaries to change the domains from *nintendo.net to a custom domain with a custom port.
Before I did that, I just had a dns rewrite with a catch-all server for *nintendo.com and *nintendo.net, with "valid" ssl certificates (real certs but self-signed, but since the switch on the post is hacked the CA verification is bypassed).
When I had this config, the browser never closed, I was actually able to stream full length movies (2~3 hrs).
After I patched the domains on the binaries, I pointed back all *nintendo.com & net to 127.0.0.1, and I was able to listen to the requests on my custom domain:port, and everything worked fine, EXCEPT this time the browser closed after a certain period of time (but I think it was less than the 20 mins mentioned here, but could be due to the news applet using a different browser)
TLDR; I think what makes the browser close, is actually based on requests to a *nintendo.net, and since I think browserdns blocks some (or all) of those, it always fail to connect to the server it is trying to, and eventually closes the browser.
I will run more tests since I do want to have the custom domains working.
PD: I think the browser on the news applet is different from the web auth, but since it had the same self-closing behaviour I thought it was worth mentioning it.
PD2: The videos are played by using hls streams (m3u8), forcing video to h264 and audio to aac, and bitrate to max 3000. It only works with that config for me, everything else results on an error. Again, don't know if the web auth browser has the same capabilities, but worth trying it.