feat: add non-blocking NTCP2 sends and Firefox settings sync
check / check (macos-latest) (push) Failing after 26s
check / check (ubuntu-latest) (push) Failing after 27s
check / check (windows-latest) (push) Failing after 30s

- NTCP2: queue outbound data frames and flush them without blocking (send_blocks_nb, send_i2np_nb, flush_nonblocking)
- NTCP2: bound write_all with a deadline and set TCP keepalive and user timeout on peer sockets
- Firefox extension 0.1.3: save settings as a patch, keep unsaved form fields from being overwritten on refresh, add timeouts to router API calls, and honor the interceptTorrents toggle in the content script
This commit is contained in:
nandi committed 2026-11-28 18:39:32 -08:00
1 parent 82aaa9f11e
commit 9aa15f9ae8
18 files changed
+1323 -239

No files matched your search

+20
View File
@@ -1,6 +1,23 @@
"use strict";
(function () {
let interceptTorrents = true;
if (browser.storage && browser.storage.local) {
browser.storage.local
.get({ interceptTorrents: true })
.then((res) => {
interceptTorrents = !!res.interceptTorrents;
})
.catch(() => {});
}
if (browser.storage && browser.storage.onChanged) {
browser.storage.onChanged.addListener((changes, area) => {
if (area === "local" && Object.prototype.hasOwnProperty.call(changes, "interceptTorrents")) {
interceptTorrents = !!changes.interceptTorrents.newValue;
}
});
}
function showToast(text, isError) {
let el = document.getElementById("moon-i2p-torrent-toast");
if (!el) {
@@ -33,6 +50,9 @@
document.addEventListener(
"click",
async (ev) => {
if (!interceptTorrents) {
return;
}
if (ev.button !== 0 || ev.altKey || ev.ctrlKey || ev.metaKey || ev.shiftKey) {
return;
}