feat: add I2P BitTorrent engine, DHT, and Firefox torrent extension
check / check (macos-latest) (push) Failing after 29s
check / check (ubuntu-latest) (push) Failing after 29s
check / check (windows-latest) (push) Failing after 30s

- 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:
nandi committed 2026-11-28 13:19:03 -08:00
1 parent 14eae00f5c
commit fbe6818c4e
37 files changed
+8543 -9

No files matched your search

+12
View File
@@ -44,6 +44,8 @@ pub fn hmac_sha256(Bytes, Bytes) -> Bytes
pub fn poly1305_mac(Bytes, Bytes) -> Bytes raise CryptoError
pub fn sha1(Bytes) -> Bytes
pub fn sha256(Bytes) -> Bytes
pub fn sha512(Bytes) -> Bytes
@@ -64,6 +66,16 @@ pub suberror CryptoError {
}
// Types and methods
pub struct Sha1 {
state : FixedArray[UInt32]
block : FixedArray[Byte]
mut block_len : Int32
mut total_len : UInt64
}
pub fn Sha1::finalize(Self) -> Bytes
pub fn Sha1::new() -> Self
pub fn Sha1::update(Self, Bytes) -> Unit
pub struct Sha256 {
state : FixedArray[UInt32]
block : FixedArray[Byte]