OpenXbox / xcloud-python

21 stars 2 forks source link

SRTP Stream #3

Open tuxuser opened 3 years ago

tuxuser commented 3 years ago

Research low level streaming protocol aka Nanov3.

Is it using this?

GET /v4/sessions/home/12D89B40-ACB6-4E1B-8E96-F744E8D05D73/configuration HTTP/1.1

{
    "keepAlivePulseInSeconds": 300,
    "serverDetails": {
        "ipAddress": "10.0.0.174",
        "port": 9002,
        "ipV4Address": "10.0.0.174",
        "ipV4Port": 9002,
        "ipV6Address": null,
        "ipV6Port": 0,
        "iceExchangePath": "v4/sessions/home/12D89B40-ACB6-4E1B-8E96-F744E8D05D73/ice",
        "stunServerAddress": null,
        "srtp": {
            "key": "iq+1DPPH/H+4k/n4wERjqXr4OXYXrwqcDiitbHkz"
        }
    }
}

Or does it use the srtp.key above and negotiated connection/port of ICE (see Issue #2 - ICE: Negotiation) ?

UPDATE (2020/03/03)

MS-SRTP follows the basic patterns of RFC3711 with minor differences: (https://docs.microsoft.com/en-us/openspecs/office_protocols/ms-srtp/ac253f1b-e9a7-46d2-8508-e6b3c3641a68)

Plan of action

References

MS-SRTP: Secure Real-time Transport Protocol (SRTP) Profile

RFC3711

akahmet commented 3 years ago

Connecting with reconnect srtp key, This={}. Creating nano stream with args videoConfig.WidthInPixels={}, videoConfig.HeightInPixels={}, videoConfig.MaxStreamCaptureSizeInBytes={}, audioConfig.SampleRateInHz={}, audioConfig.BufferSizeInFrames={}, audioConfig.EnableMicrophone={} Connecting to session at {}:{}, with SRTP key ={}, This={}. MicroManager::DisconnectAsync; Reason={}, This={}. xCloud.Client.SDK.MicroManager.DisconnectAsync

Probably stream use srtp.key above.

tuxuser commented 3 years ago

There is pysrtp but it looks unmaintained and just provides the very basic data-level implementation.

Something like aiortc would be better...

Desired features: