- 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/
109 lines
3.9 KiB
HTML
109 lines
3.9 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Moon I2P Torrent & DHT Manager</title>
|
|
<link rel="stylesheet" href="ui.css" />
|
|
</head>
|
|
<body class="manager">
|
|
<header>
|
|
<div class="brand">
|
|
<img src="icon.svg" alt="" />
|
|
<span>moon-i2p BitTorrent & I2P DHT Manager</span>
|
|
</div>
|
|
<div class="row">
|
|
<span id="router-pill" class="pill offline">Offline</span>
|
|
<button id="start-router-btn">Start Router</button>
|
|
<button id="stop-router-btn" class="secondary" style="display:none;">Stop Router</button>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="grid-2">
|
|
<section class="card">
|
|
<h2><span>I2P Router & HTTP Proxy</span></h2>
|
|
<div class="grid-2">
|
|
<div class="stat">
|
|
<div class="stat-label">NetDB / Tunnels</div>
|
|
<div id="net-summary" class="stat-val">--</div>
|
|
</div>
|
|
<div class="stat">
|
|
<div class="stat-label">I2P Proxy (.i2p)</div>
|
|
<label class="row" style="gap:4px;">
|
|
<input id="proxy-enabled" type="checkbox" />
|
|
<span id="proxy-addr" class="mono">127.0.0.1:4444</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="stat" style="margin-top:8px;">
|
|
<div class="stat-label">Torrent Session .b32.i2p (share with DHT peers)</div>
|
|
<div id="torrent-b32" class="stat-val mono">--</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>
|
|
<span>I2P Kademlia DHT (Proto 17 / 18)</span>
|
|
<span id="dht-summary" class="mono">0 nodes</span>
|
|
</h2>
|
|
<div class="grid-2">
|
|
<div class="stat">
|
|
<div class="stat-label">Secure Node ID (20B)</div>
|
|
<div id="dht-node-id" class="stat-val mono">--</div>
|
|
</div>
|
|
<div class="stat">
|
|
<div class="stat-label">Sent / Recv / Peers</div>
|
|
<div id="dht-stats" class="stat-val">0 / 0 / 0</div>
|
|
</div>
|
|
</div>
|
|
<form id="bootstrap-form" class="row" style="margin-top:8px;">
|
|
<input id="bootstrap-b32" type="text" placeholder="Bootstrap node .b32.i2p" />
|
|
<input id="bootstrap-port" type="number" value="6881" style="width:84px;" />
|
|
<button type="submit" class="secondary">Bootstrap</button>
|
|
</form>
|
|
<div id="dht-nodes-list" class="node-list mono"></div>
|
|
</section>
|
|
</div>
|
|
|
|
<section class="card">
|
|
<h2><span>Add Torrent or Magnet URI</span></h2>
|
|
<form id="magnet-form" class="row">
|
|
<input id="magnet-uri" type="text" placeholder="magnet:?xt=urn:btih:...&dn=..." />
|
|
<button type="submit">Add Magnet</button>
|
|
</form>
|
|
<div id="dropzone" class="dropzone">
|
|
Drop a .torrent file here or click to select one from disk
|
|
<input id="torrent-file" type="file" accept=".torrent" style="display:none;" />
|
|
</div>
|
|
<div id="status-msg" class="msg"></div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>
|
|
<span>Active & Completed Torrents</span>
|
|
<span id="torrent-count" class="mono">0</span>
|
|
</h2>
|
|
<div id="torrents-list">No torrents added yet.</div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2><span>Extension & Router Settings</span></h2>
|
|
<form id="settings-form">
|
|
<div class="grid-2">
|
|
<div><div class="stat-label">HTTP Proxy Port</div><input id="cfg-proxy-port" type="number" /></div>
|
|
<div><div class="stat-label">Torrent API Port</div><input id="cfg-api-port" type="number" /></div>
|
|
</div>
|
|
<div style="margin-top:8px;">
|
|
<div class="stat-label">Default Download Directory</div>
|
|
<input id="cfg-dl-dir" type="text" placeholder="~/Downloads/moon-i2p" />
|
|
</div>
|
|
<div class="row" style="margin-top:8px;justify-content:space-between;">
|
|
<label class="row"><input id="cfg-intercept" type="checkbox" /> <span>Intercept magnet: and .torrent links on .i2p pages</span></label>
|
|
<button type="submit">Save Settings</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
|
|
<script src="ui.js"></script>
|
|
</body>
|
|
</html>
|