Open tuxuser opened 4 years ago
Is Teredo involved for gathering that info? Nope, Probably you are using a tunel for IPV6.
Nope, Probably you are using a tunel for IPV6.
True, but even non-tunneled connection have a few Teredo packets ;)
For parsing of STUN packets, we can use aioice's code: https://github.com/jlaine/aioice/blob/39d7b642af0b9e95c092a72c0702a92cd5d98ca0/src/aioice/stun.py#L310
Problem
ICE (Interactive Connectivity Establishment) / STUN is used to negotiate communication-channel between NAT'd hosts. Its currently only used for xhomestreaming. The initial ICE-message comes from the client (mobile device - iOS/Android) to the cloud.
Questions:
Current version of assembling the ICE request
https://github.com/tuxuser/xcloud/blob/8295d2c86bf8ece56dbbd02c1f749a4426955bcb/ice.py#L26-L37
You can test what the used library produces when gathering local candidates with following snippet:
Local IPs:
10.0.0.102
(Wireless),10.0.0.246
(Wired) Public IP:126.242.118.111
Output:
Real / sample data
NOTE: The actual JSON post data is in a very fucked format, so I converted it for better visibility.
Original sample request, 1:1 as sent:
iOS
Request
POST https://uks.gssv-play-prodxhome.xboxlive.com/v4/sessions/home/<SESSION_GUID>/ice
Response
GET https://uks.gssv-play-prodxhome.xboxlive.com/v4/sessions/home/<SESSION_GUID>/ice
Android
Request
POST https://uks.gssv-play-prodxhome.xboxlive.com/v4/sessions/home/<SESSION_GUID>/ice
Response
GET https://uks.gssv-play-prodxhome.xboxlive.com/v4/sessions/home/<SESSION_GUID>/ice
Libraries
aiortc aioice (used by aiortc)
Specs
RFC 4380 Teredo: Tunneling IPv6 over UDP through Network Address Translations (NATs) RFC 5245 Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols RFC 5839 Session Traversal Utilities for NAT (STUN) RFC 5991 Teredo Security Updates RFC 6081 Teredo Extensions RFC 8445 Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal