thiccaxe / CompanionGames

Concept: multiplayer games using iOS/iPadOS remote. Companion Protocol.
GNU Affero General Public License v3.0
0 stars 0 forks source link

[Critical] Only one pairing session can be active at a time #1

Open thiccaxe opened 5 months ago

thiccaxe commented 5 months ago

After checking the encryption documentation, I realised that you can only have one pairing session active.

This is problematic.

thiccaxe commented 5 months ago

Solution is I guess to have a whitelist of identity pairs (hdpid, device ltpk) that will be paired as administrators. I don't like this though.

Another solution could be to advertise 2 companion-link services. One would be for regular players, other for admins. Actually, this could work very well. However, this really only works for the two pairing sessions. My goal of unlimited (though in reality a small, manageable amount) is unfortunately not feasible. This is because each mdns entry needs its own mac address and id. Which means if there are to be an unlimited number of pairing sessions, each needs there own id, and it will quickly spiral out of hand with the number of mdns entries!

However, I think 2 is ok? We will need to be careful with how we name it. ios doesn't wrap the names, but the font size can quickly decrease. Another thing to research is whether the MDNS name will take precedence, or can we override it. IMG_7673

thiccaxe commented 2 weeks ago

I have an idea to test this. I am going to see what happens if I change the name of the apple tv using the ios remote (i.e. - the remote is connected when the name updates. I'm suspecting that: 1) mdns updates, ios picks up on it; or 2) _systemInfo packet is resent; or 3) no update; or 4) some sort of name update packet is sent.

1 and 2 are most likely, but who knows, four would be nice. It wouldn't be very "cohesive" for the name to not update

Then again, the whole remote stack seems very shaky. Who knows what's going on