feat: add I2P BitTorrent engine, DHT, and Firefox torrent extension
- Add pure-MoonBit bittorrent package: bencode codec, metainfo/magnet parsing with path traversal checks, peer wire protocol (BEP 10/9), and I2P Kademlia DHT with KRPC and 54-byte compact nodes - Add SHA-1 primitive in crypto for torrent info hashes - Add router torrent API and engine, enabled with --torrent-api (default 127.0.0.1:4445) and --download-dir - Add Firefox WebExtension torrent manager with native messaging host and packed .xpi - Add scripts to build a standalone Firefox + router AppImage and install the native host - Add just targets (proxy, appimage, extension), README docs, and ignore .cache/ and dist/
This commit is contained in:
1 parent
14eae00f5c
commit
fbe6818c4e
37 files changed
+8543
-9
No files matched your search
@@ -11,10 +11,18 @@ build:
|
||||
moon build --target native cmd/router
|
||||
moon build --target native cmd/client
|
||||
|
||||
# Start public I2P router with embedded HTTP proxy on 127.0.0.1:4444
|
||||
# Start public I2P router with embedded HTTP proxy and BitTorrent + DHT API
|
||||
proxy:
|
||||
moon build --target native cmd/router
|
||||
./_build/native/debug/build/cmd/router/router.exe --public --http-proxy 127.0.0.1:4444
|
||||
./_build/native/debug/build/cmd/router/router.exe --public --http-proxy 127.0.0.1:4444 --torrent-api 127.0.0.1:4445
|
||||
|
||||
# Install Firefox Native Messaging host and build extensions/firefox-i2p-torrent.xpi
|
||||
extension:
|
||||
python3 scripts/install_firefox_native_host.py
|
||||
|
||||
# Build self-contained Linux x86_64 Firefox + moon-i2p router AppImage
|
||||
appimage:
|
||||
python3 scripts/build_appimage.py
|
||||
|
||||
# Run all MoonBit tests across wasm, js, and native targets
|
||||
test:
|
||||
|
||||
Reference in new issue
Block a user