mas-bandwidth / netcode

Secure client/server connections over UDP
BSD 3-Clause "New" or "Revised" License
2.43k stars 191 forks source link

[Question] Is it possible to handle direct IP connections without a matchmaker service? #109

Closed Kazade closed 2 years ago

Kazade commented 2 years ago

:wave:

This is probably a case of me using netcode for the wrong situation but we'll see...

I'm developing a game that ideally would have a matchmaker service, but for redundancy (or.. if I run out of time) I'd quite like players to be able to host a game, and enter an IP address to direct connect to that server. This was working fine for testing on localhost.. but not across a network...

The problem I've hit is that the server needs to know its own external IP address when validating the connect token.. is there a way to avoid that? Would it be dangerous to disable that check in the direct connection case? (Ignoring the fact that I've probably blown any security out of the water anyway by shipping the private key in the client side but I'd use a separate key for direct connecting...)

gafferongames commented 2 years ago

Unfortunately, no we don't support that. Sorry!