I2P Address: [http://git.idk.i2p]

Skip to content

I2p torrent location header

idk requested to merge i2p-torrent-location-header into master

This turns I2PSnark into a peer-to-peer CDN for sites that use an X-I2P-TorrentLocation header or meta http-equiv tag. The content of the tag should be a magnet link corresponding to a torrent containing a directory having exactly the same hostname as the site that you are visiting(b32 or .i2p). If this tag is discovered, a pageAction becomes available which displays the magnet link, which can be handled by the magnet protocol handler. The torrent acts as a peer-to-peer cache for the files inside it that are referenced by the site. Then a content script modifies the page so that image src tags point to their bittorrent equivalents, and adds an onerror event which returns them to the original state. This content script is triggered when the tab is re-opened. As the torrent completes, images on a site will be loaded from Snark instead of from the remote host.

Merge request reports

Loading