Repository navigation
Conversation
…yIT#59) Keep the first automatic peer id and key for identical info hashes and client profiles, and parse the fixed info-hash field of incoming BitTorrent handshakes. Cover duplicates, independent torrents and explicit custom identities with regression tests.
Use shared identity state for automatically configured rows with the same info hash and client. Rotating the key once keeps their tracker announcements and displayed identity aligned.
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.
Closes #59.
When the same info hash is added with two trackers and the same client profile, the automatic identities now share a peer ID, tracker key and port. Timed key rotations are shared too, so the two rows don't drift apart during long runs. Explicit custom identities are left alone.
The TCP listener also validates the handshake at the expected byte offsets rather than searching for the info hash anywhere in the packet. Duplicate registrations have a stable first-match response.
Added tests for two trackers, independent torrents and clients, custom identities, key rotation, and malformed or duplicate handshakes.
I haven't run the .NET 10 test suite locally (SDK unavailable). CI is needed before merging.