Homebrew WIP [Official] switch-lan-play

  • Thread starter Thread starter Cubuss
  • Start date Start date
  • Views Views 300,173
  • Replies Replies 307
Ah, forgive me. I miscounted the 255 in the netmask. So yeah, that's significantly better than what I assumed.



In this sort of network I personally would think some sort of automatic address assignment would be essential. Aside from that, 254 maximum peers per endpoint isn't bad
per se, but I would start grouping specific games onto specific subnets and figure out some way to automatically change depending on the game being played.

Networking is hard. Really hard. Hard to do, even harder to do in a clean and elegant manner. :sleep:

I dont have a second switch to collect wire traffic from ninty's servers from, but the solution people really want is more like pvpgn, and less like a big vpn. (that is to say, emulates match making and pals, by emulating a ninty server)

Don't get me wrong, this is a neat feature, but not what the kids are really looking for. We do have the tools to realtime debug switch titles on the switch, so we can in fact see what the games are looking for in terms of response messages. We can spy on the messages themselves with things like wireshark.

It would be a pain in the ass, but I can see nothing technologically preventing a full nintendo server emulation except effort and difficulty. (needs a special skillset, and concerted interest.) Even the unique ID thing is not really important, as our server could just ignore it and approve immediately (that's what pvpgn does). (however, if nintendo uses it to encrypt traffic, that might be a buzz kill.)

opening up a full private network with untrusted peers like this solution does is not really sensible nor safe. It's one player with a network worm infected computer away from getting everyone in the virtual network infected. (switch consoles would be fine, most likely--- but we are talking the OTHER things in your network.)
 
Ah, forgive me. I miscounted the 255 in the netmask. So yeah, that's significantly better than what I assumed.



In this sort of network I personally would think some sort of automatic address assignment would be essential. Aside from that, 254 maximum peers per endpoint isn't bad
per se, but I would start grouping specific games onto specific subnets and figure out some way to automatically change depending on the game being played.

Networking is hard. Really hard. Hard to do, even harder to do in a clean and elegant manner. :sleep:
This is where i think server admins would be crucial. have a web service that you sign up and provide your switchs mac address, it assigns you an ip and associates your name in an easy to curate list for the admin. cheating? well he knows who to block now. this way ensures that no one picks the same ip address and gives some form of moderation.
 
Wireless. Not LAN. Game Freak will implement wireless trading as always.

Forgive me. I had just woken up and was too tired to differentiate between point-to-point local wireless and infrastructure wireless. You are correct.

It's probably also possible to relay point-to-point connections. As in, passively monitor switch packets, relay over internet, broadcast recieved packets from other people while masquerading as another switch - would probably require custom software, a card supporting promiscuous/monitor mode and packet injection. But yeah, that's out of scope and not how this tool works.
 
I dont have a second switch to collect wire traffic from ninty's servers from, but the solution people really want is more like pvpgn, and less like a big vpn. (that is to say, emulates match making and pals, by emulating a ninty server)

Don't get me wrong, this is a neat feature, but not what the kids are really looking for. We do have the tools to realtime debug switch titles on the switch, so we can in fact see what the games are looking for in terms of response messages. We can spy on the messages themselves with things like wireshark.

It would be a pain in the ass, but I can see nothing technologically preventing a full nintendo server emulation except effort and difficulty. (needs a special skillset, and concerted interest.) Even the unique ID thing is not really important, as our server could just ignore it and approve immediately (that's what pvpgn does). (however, if nintendo uses it to encrypt traffic, that might be a buzz kill.)

opening up a full private network with untrusted peers like this solution does is not really sensible nor safe. It's one player with a network worm infected computer away from getting everyone in the virtual network infected. (switch consoles would be fine, most likely--- but we are talking the OTHER things in your network.)

Yup. It's probably possible to emulate WLAN (though games would need patches in all likelyhood) and this is not really secure for public servers. If this is used to host a private server it'd be perfectly fine, but it's just not acceptable for a open and public threat model.

There's two approaches really - implement a Nintendo Wifi replacement, or go full-on p2p and do some kind of one-tier onion routing with virtual IPs for peers handled locally rather than on a server. Both are disgustingly complex.

Same concept, so kind of yes. A VPN is a tunnel between 2 systems, and this is a tunnel between multiple Switches (convincing the Switch every Switch you connect to is on the same LAN as your system).

VPN stands for "Virtual Private Network" and while publicizing the IP kind of removes the "private" from the title, this is in fact functionally what a VPN does. More accurately, I suppose this is a sort of remote VLAN.
 
Last edited by chaoskagami,
Ad-hoc wifi (if it follows normal standards) is just a step below putting the device in AP mode. Once a connection has passed handshake, it sets up a minimalist network segment that acts the same as any other, just that the adhoc host does limited dhcp, and routing is not normally a thing.

It could be emulated with a combination of a custom kernel module (catches the ad-hoc mode activation trigger, sets up the tunnel instead), and a known remote host to arbitrate with.

Since games that expect this kind of networking will want to have the adhoc host be the game server, and connecting clients dropped right into a lobby, the remote host portion of the connection needs to be told what kind of connection is being emulated. (host or client) Some kind of injected process from the kernel system module would need to walk the user through that. (ask what kind of connection to arbitrate, then ask what remote server to talk to, and if hosting in server mode, what the name of the emulated network is so that others can find it, or if connectng in client mode, present a list of currently running emulated sessions to jump into--- set up the bridge, then return control to the game process.)
 
Ad-hoc wifi (if it follows normal standards) is just a step below putting the device in AP mode. Once a connection has passed handshake, it sets up a minimalist network segment that acts the same as any other, just that the adhoc host does limited dhcp, and routing is not normally a thing.

It could be emulated with a combination of a custom kernel module (catches the ad-hoc mode activation trigger, sets up the tunnel instead), and a known remote host to arbitrate with.

Since games that expect this kind of networking will want to have the adhoc host be the game server, and connecting clients dropped right into a lobby, the remote host portion of the connection needs to be told what kind of connection is being emulated. (host or client) Some kind of injected process from the kernel system module would need to walk the user through that. (ask what kind of connection to arbitrate, then ask what remote server to talk to, and if hosting in server mode, what the name of the emulated network is so that others can find it, or if connectng in client mode, present a list of currently running emulated sessions to jump into--- set up the bridge, then return control to the game process.)

Alternatively, you might be able to pull shenanigans with monitor/promiscous mode e.g. capture and relay switch packets over the internet and recieve and reply/masquerade switch packets over the internet from other devices, and offload this to the PC. It's theoretically possible, but it will almost certainly require specific cards and be impossible on Windows (which would mean you'd probably end up using a RPi and compatible adapter.)
 
Just tested Mario Tennis and its worked !

which gamers are compatible with LAN? i found a list on reddit but its from 3 months ago,need update
 
Last edited by MarioShadow,
This is really great. A gigantic kudos for whoever brought this to Switch, this will be very useful for a lot of people!
 
Could someone explain to me how I create a private server?

Where do I apply this information?


cd switch-lan-play / server
npm install
npm run build
npm run server
 
Last edited by Cubuss,

Site & Scene News

Popular threads in this forum