Homebrew WIP [Official] switch-lan-play

Wierd_w

Well-Known Member
Member
Joined
May 12, 2018
Messages
406
Trophies
0
Age
41
XP
651
Country
United States
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.)
 

shabbypenguin

Well-Known Member
Newcomer
Joined
Apr 29, 2015
Messages
84
Trophies
0
Age
36
XP
403
Country
United States
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.
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,262
Country
United States
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.
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,262
Country
United States
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,

Wierd_w

Well-Known Member
Member
Joined
May 12, 2018
Messages
406
Trophies
0
Age
41
XP
651
Country
United States
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.)
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,262
Country
United States
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.)
 

MarioShadow

Active Member
Newcomer
Joined
Nov 8, 2009
Messages
35
Trophies
0
XP
399
Country
Brazil
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,

Vieela

GBATemp's official thinker™
Member
Joined
Jan 18, 2017
Messages
562
Trophies
0
XP
935
Country
Brazil
This is really great. A gigantic kudos for whoever brought this to Switch, this will be very useful for a lot of people!
 

Chapoca

New Member
Newbie
Joined
Oct 17, 2018
Messages
3
Trophies
0
Age
35
XP
59
Country
Brazil
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
 

Cubuss

Well-Known Member
OP
Member
Joined
Aug 4, 2017
Messages
536
Trophies
1
Age
31
Location
High Quality Shitposter
XP
3,409
Country
Netherlands
Last edited by Cubuss,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Sorry for accidentally bending over