Repository navigation
Add measured USB4 and network path selection - #159
Merged
Merged
Conversation
This was referenced Aug 7, 2026
Betafer
marked this pull request as ready for review
August 7, 2026 22:10
Owner
|
Thank you for this focused contribution. The measured connection-path selection has been merged and released in TargetBridge 3.5.0 after local, live Thunderbolt and Apple Silicon/Intel CI verification. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context — a short story
I discovered TargetBridge while looking for a practical way to reuse a 21.5-inch 2017 Retina 4K iMac as the display for a Mac mini M4. Apple's Target Display Mode is unavailable on this iMac, while ordinary screen sharing was too slow for comfortable daily use.
I really liked TargetBridge's design: it creates a virtual display on the Sender and carries a low-latency encoded stream to the Receiver, instead of pretending that the iMac is a physical DisplayPort monitor. While testing it with Thunderbolt, USB4/USB-C, direct Ethernet and Wi-Fi, I found that the hardest part for a non-technical user was not the stream itself, but making sure it used the best cable instead of silently falling back to Wi-Fi.
This PR isolates that one improvement from the larger integrated prototype in #157, so it can be reviewed and accepted independently.
What this PR adds
en0oren1.auto,wired,thunderbolt,usb,ethernet, andwifi.targetbridge connect --path ...and the existing URL/launch-argument automation.--pathis omitted.USB4 clarification
This does not turn the iMac into a native USB-C/DisplayPort sink and does not claim a raw 40 Gbit/s video path.
When macOS creates a direct USB-C/USB4 network interface between the two Macs, it normally appears as USB-NCM with a self-assigned
169.254.x.xaddress. TargetBridge continues to use its encoded network protocol over that interface. The selector measures the throughput TargetBridge can actually obtain, rather than trusting the cable's advertised link rate.The same mechanism deliberately supports direct Ethernet and Thunderbolt Bridge, because the fastest real path depends on both Macs, adapters, macOS routing and the cable.
Receiver behavior
The Receiver advertises its Thunderbolt, USB/link-local, Ethernet and Wi-Fi IPv4 addresses as separate Bonjour TXT fields. Probe packets use the existing
TEST_DATApacket type, which the Receiver discards without marking a video session active, so path selection does not start capture or flash the fullscreen session UI.Examples
Intentionally not included
To keep this review focused, this PR does not include:
Those parts remain described in #157 and can be proposed as separate PRs by utility.
Validation
Tested on a Mac mini M4 and a 21.5-inch 2017 Retina 4K iMac with direct USB4/USB-C, Thunderbolt Bridge, Ethernet and Wi-Fi paths.
git diff --check: cleanNo credentials, privileged helper, kernel extension or third-party dependency is added.