Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new protocol extension to match client connections together #1945

Merged
merged 1 commit into from
Dec 30, 2023

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Dec 29, 2023

Description

This PR introduces support for the X-SS-Connect-Data and X-SS-Ping-Payload extension that allows Moonlight to provide identifiers with its ENet connect message and A/V ping packets respectively. This allows Sunshine to correctly correlate those connections with an active session even if they are coming from different IP addresses (which can often happen due to Carrier-Grade NAT).

These extensions require new Moonlight clients that contain the latest moonlight-common-c code, otherwise it will fall back to the older codepaths.

Associated Moonlight commits:
moonlight-stream/moonlight-common-c@dc18608
moonlight-stream/moonlight-common-c@6e9ed87

Screenshot

Issues Fixed or Closed

Fixes #1804
Fixes #1862
Fixes #1852

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@cgutman cgutman added the protocol update This PR includes an update to the streaming protocol label Dec 29, 2023
@cgutman cgutman force-pushed the cgn_fix branch 2 times, most recently from 10e7661 to ed68ee5 Compare December 30, 2023 02:55
@cgutman
Copy link
Collaborator Author

cgutman commented Dec 30, 2023

Okay, I think this is finally ready to go. It took a lot more refactoring than I had expected, due to all the assumptions everywhere that an IP address was a unique session identifier.

I've tested it through T-Mobile's Carrier Grade NAT and it seems to be working correctly.

@cgutman cgutman merged commit a9f2679 into LizardByte:nightly Dec 30, 2023
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol update This PR includes an update to the streaming protocol
Projects
None yet
1 participant