Integrate WebTorrent support from libtorrent#1850
Draft
QuixThe2nd wants to merge 1 commit into
Draft
Conversation
|
LFG!!! |
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.
Summary
This wires rtorrent up as the configuration, UI, RPC, and CI consumer of WebTorrent support implemented in rakshasa/libtorrent.
The WebRTC, WebSocket tracker, signaling, SDP/ICE, and DataChannel transport logic remains in libtorrent. rtorrent only detects support, exposes user-facing controls/status, and displays WebTorrent tracker/peer state.
Depends on rakshasa/libtorrent#796.
What Changed
Add build-time WebTorrent integration:
--enable-webtorrent/ default enabled--disable-webtorrentHAVE_LIBUTORRENT_WEBTORRENTonly when the probe succeedslibdatachanneldirectly; it consumes libtorrent through pkg-configAdd RPC/config commands:
system.has_webtorrentprotocol.webtorrentprotocol.webtorrent.setp.is_webtorrentp.transportt.type_strMark safe RPC commands:
system.has_webtorrentprotocol.webtorrentp.is_webtorrentp.transportt.type_strAdd UI integration:
TRcolumnWTfor WebTorrent/WebRTC peers--for TCP peersTransport: WebRTCorTCPwebsocketenableddisablednot builtAdd documentation examples:
#protocol.webtorrent.set = yes#protocol.webtorrent.set = nows://andwss://trackers are handled by libtorrentUpdate CI workflows:
Preserve completed-session seeding behavior:
Runtime Behavior
When built with WebTorrent-capable libtorrent:
protocol.webtorrent.set = nodisables WebTorrent runtime behavior globally.protocol.webtorrent.set = yesre-enables it.ws://andwss://trackers are accepted and handled by libtorrent.When built without WebTorrent-capable libtorrent:
system.has_webtorrentreturns0protocol.webtorrentreturns0protocol.webtorrent.set = yesthrows:WebTorrent support is not available in this build.Compatibility
Existing TCP peer behavior and existing tracker behavior remain unchanged for:
Existing peer rate/choke/snub/ban/disconnect behavior is unchanged.
Testing
Tested locally on macOS against the matching libtorrent branch.
WebTorrent-enabled build:
./configure --enable-webtorrentmake -j4make checkDisabled build against libtorrent built with
--disable-webtorrent:./configure --disable-webtorrentmake -j4make checkEnd-to-end browser test:
wss://tracker.btorrent.xyz:443tracker.torrentAlso verified:
git diff --checkclean