1366 Commits
Author SHA1 Message Date
zzz 0a1a95709c i2psnark: Send sorted dictionaries in extensions as required by spec 2026-08-31 18:39:32 -04:00
zzz b06f550843 i2psnark: Check available disk space when magnet has xl param 2026-08-31 18:07:32 -04:00
zzz ec491969a1 i2psnark: Don't NPE on missing map in extension handshake 2026-08-31 17:35:40 -04:00
zzz 00cf0d2eed i2psnark: Clip long magnet links on details page 2026-08-29 13:45:47 -04:00
zzz d4db8fbb50 i2psnark: Validation fix for UDP URLs without a path part 2
and remove ancient "i2p" hostname check
2026-08-29 11:33:53 -04:00
zzz d5ba2e7ddc i2psnark: Default tracker type to open on add tracker form 2026-08-29 08:18:48 -04:00
zzz 1df04c927a i2psnark: Show free disk space on add torrent form 2026-08-29 07:23:11 -04:00
zzz 345c228129 i2psnark: Allow adding udp tracker URLs without a path on config form 2026-08-28 17:51:58 -04:00
zzz bb6d329279 i2snark: Show all magnet link trackers on details page after
transition out of magnet mode. Part 3/3
2026-08-28 15:55:42 -04:00
zzz 7f2fa91363 i2snark: Save all magnet link trackers in torrent file
part 2/3

- fix NPE in part 1
- store all in torrent file when saved
2026-08-28 15:11:38 -04:00
zzz b9b9ea86e4 javadoc fix 2026-08-28 13:24:17 -04:00
zzz 89d24b80b0 i2snark: Use all trackers in magnet links, not just the first
part 1/2

- Pass MagnetURI directly to addMagnet()
- Store all trackers in Snark and TrackerClient
- save all trackers in per-torrent config file
2026-08-28 13:23:42 -04:00
zzz 563d0a7244 i2snark: Add length from xl param to magnet name if available 2026-08-28 09:11:31 -04:00
zzz 97c435565c i2snark: Refactor Message.sendMessage() to use a switch
for efficiency and sanity.
Add support for BEP 52 messages.
2026-08-28 07:43:17 -04:00
zzz e40b54f844 i2snark: v2 WIP part 7
- consolidate length rectification code
- fix rectification for file length > 2 GB
- make InputStream method public again, with the requirement
  to call rectify() first for files
- clarify plen param requirement for files vs. pieces
- add plen param for byte[] method
- add debug output for empty hashes
2026-08-27 17:24:55 -04:00
zzz 73cc98d28b i2psnark: Compress KRPC DG1 messages 2026-08-26 08:21:00 -04:00
zzz 6efe2dc715 i2psnark: Compress UDP connect requests 2026-08-26 07:59:51 -04:00
zzz 529ea7ac43 i2psnark: Close all RAFs after creating or checking files
to avoid possible stale fds after errors,
ro vs rw issues after rechecks, running out of fds,
and other corner cases
2026-08-25 09:30:45 -04:00
zzz fda1ced99c i2psnark: Remove ancient/disabled single-torrent and CLI code
from the original snark, unused for 20 years.
CoordinatorSet and acceptor are now always non-null.
Cleanup in prep for hybrid support (WIP)
2026-08-24 11:10:54 -04:00
zzz d0fae9f895 i2psnark: Only call retransmitRequests() for non-fast peers 2026-08-24 08:25:02 -04:00
zzz a60f10ba3b i2psnark: Reduce log level for common error serving file resources 2026-08-23 11:21:36 -04:00
zzz 5311271498 i2snark: v2 WIP cleanup
a v2 infohash is a Hash not a MerkleHash
2026-08-23 11:15:14 -04:00
zzz a258c86b06 i2snark: v2 WIP part 6 2026-08-23 11:12:24 -04:00
zzz 029d2df70e i2snark: limit log in one more spot 2026-08-23 11:09:12 -04:00
zzz 517e660389 i2psnark: Add support for magnet xl param 2026-08-22 10:31:53 -04:00
zzz 697bb94f8f i2psnark: Smooth out request throttling
The request throttler had several problems:

- Throttling was very laggy, but when it reacted it throttled too quickly.
- PartialPieces got returned back to PeerCoordinator,
  and then back to PeerState, every few seconds, rather
  than continuing steady-state in PeerState
- Holding the PartialPiece in the PeerCoordinator for
  several seconds while staying interested is poor and risks snubbing
- Max request queue size was reduced far too quickly,
  doing so exponentially when the reduction occurred linearly
- shouldRequest() called the request limiter second in the conditional,
  so the estimator was not decayed properly when over down bw limit
- shouldRequest() used overDownBandwidthLimit() rather than _down.offer(),
  ensuring a very slow and laggy feedback loop.
- Requests were added too quickly on unthrottle

Fix these by:

- Fixing and slowing max request queue size reduction to simulate
  an exponential reduction over time when throttled
- Fixing shouldRequest() to always call offer() for both limiters
- Slow addition of requests after unthrottle to simulate
  a linear increase over time

Log tweaks also

The request queue now mostly maintains a steady size,
and properly meters the requests.
The PartialPiece returns to the PeerCoordinator much less often,
and comes back to PeerState much quicker if it does.

Further tuning TODO
2026-08-22 10:22:50 -04:00
zzz 171838070a i2psnark: Improve handling of chunks received out-of-order
- For fast peers:
  Do not rerequest, peer is expected to meet its BEP 6 obligation,
  and rerequesting needlessly inflates the request bandwidth estimate
- Drop dup requests for pieces peers already have
- Remove old comment about future enhancements we already did
- Fix repeated PartialPiece log about hole filled in
- Log tweaks

Should improve d/l from qbittorrent that aggressively reorders
2026-08-21 11:30:42 -04:00
zzz cc63ee6843 i2psnark: Improve BitField.toString() for logging 2026-08-20 11:29:20 -04:00
zzz 101a9e54e4 i2psnark: Enum for metainfo types + cleanups (v2 WIP part 5)
- FileTree remove unused param
- PieceLayers remove unused method
2026-08-20 09:38:22 -04:00
zzz 2b002e2b7a i2psnark: Don't load whole pieces in memory when creating/rechecking torrents
for large piece sizes, use a buffer instead,
in two spots: creating and rechecking.
Pass the hash instead of the piece to MetaInfo.checkPiece()
Remove now-unused methods.
2026-08-19 12:06:22 -04:00
zzz 7751367b85 i2psnark: Fail in BDecoder on dup dictionary entry 2026-08-18 17:40:33 -04:00
zzz 63e966890f i2psnark: Fix extraction of metainfo file attributes 2026-08-17 11:44:24 -04:00
zzz a900ca3286 i2psnark: v2 updates (WIP part 4)
- Refactor padding file addition, inspired by similar code in I2P+
  Now will be called from Storage, not done on-the-fly during
  MetaInfo creation, which was the wrong place.
- Skip padding files in PieceLayers constructor based on attributes
- toString() tweaks for logging
2026-08-16 13:05:38 -04:00
zzz 7e3220d293 i2psnark: Piece hash calc optimization on torrent creation
to avoid extra copy and object churn
2026-08-16 12:56:35 -04:00
zzz 276491a450 i2psnark: v2 updates (WIP part 3)
- Revert: make InputStream method private, for root
- Add checks to InputStream method
- Add method for calculating hash from a byte[]
2026-08-15 20:14:02 -04:00
zzz 042efa8493 i2psnark: v2 updates (WIP part 2)
- Add method to generate piece hashes from a File
- Make InputStream methods private
- Fix subclass name
- Add alternate construtor for PieceLayers
- Change PieceLayers constructor exception class
2026-08-15 13:51:39 -04:00
zzz 498488b0d0 i2psnark: Use MagnetURI for magnet creation in Storage CLI 2026-08-14 08:43:21 -04:00
zzz f028b640a2 i2psnark: Add dn name param to magnet links on details page 2026-08-14 08:36:52 -04:00
zzz 76f0101162 i2psnark: Strict URI encoding for UTF-8 2026-08-14 07:50:26 -04:00
zzz d5639a35bf i2psnark: MagnetURI improvements
- Move link generation from I2PSnarkServlet to MagnetURI
- Add v2 generation and parsing support
- Add CLI test
2026-08-13 12:08:27 -04:00
zzz 33233faa32 CLI: Add V2Util 2026-08-13 10:37:08 -04:00
zzz ad9ce4f795 i2psnark: Add v2 utility classes (WIP)
Not hooked in, not for this release, for safekeeping only
2026-08-13 08:48:41 -04:00
zzz ce34963939 i2psnark: PeerID cleanups
- Make destHash final
- Use destHash.hashCode() for hashCode()
- Use b32 for toString() if full dest not known
2026-08-12 10:55:45 -04:00
zzz e62549d59f i2psnark: add missing translation tag 2026-08-11 11:24:17 -04:00
zzz 013ba1842e Build: Recognize gettext version 1.0
for fast-mode msgfmt.
In forky/stonking.
Adapted from fix courtesy I2P+
2026-08-11 09:13:17 -04:00
zzz 927d1297ee i2psnark: javadoc add @since 2026-08-10 19:16:14 -04:00
zzz bd81ab51d3 i2psnark: Disable I2CP bw limiting
For now, disable it, since we now have good bandwidth limiting
in snark, we don't need the additional throttling/drops in I2CP
causing more streaming issues and making snark/streaming analysis/optimization harder.

The I2CP limiter is also bad and old and needs to be completely rewritten or tossed out.
2026-08-10 12:19:56 -04:00
zzz 25503b72e3 i2psnark: Add CompleteBitfield subclass for efficiency
and use it on reception of HAVE_ALL
2026-08-10 12:02:19 -04:00
zzz a8f555be72 i2psnark: PeerID tweaks
- truncate peer IDs before b64, not after, for efficiency
- reduce dest b64 chars from 6 to 4
- deprecate non-compact PeerID constructor
2026-08-09 17:27:16 -04:00
zzz ed3134d776 i2psnark: Log tweaks
- log peer hashes in acceptors in b32, not b64
- log infohashes in hex, not b64
2026-08-09 16:57:18 -04:00