Giter VIP home page Giter VIP logo

Comments (10)

ssiloti avatar ssiloti commented on July 28, 2024 1

Creating a new scheme for hosting websites in torrents would be a reasonable thing to do. The scheme should support both directly naming an infohash and naming a public key which is resolved to an infohash via BEP46.

from bittorrent.org.

anacrolix avatar anacrolix commented on July 28, 2024 1

I'm not sure #92 supercedes this one, as it's still desirable to be able to link to files within torrents using the magnet URI scheme. #92 proposes an entirely new scheme.

from bittorrent.org.

the8472 avatar the8472 commented on July 28, 2024

As you note the URI specification only handles paths (and optionally authorities) immediately following the scheme:. Since the URN embedded in the query component of the magnet is not part of the path it does not benefit from any of the relative path resolution semantics of URIs, e.g. you can't actually have an <img uri="foo.jpg"> in such a document, which means you always need to use absolute URIs.
And if you're already using absolute URIs you can then use BEP53 and add the file name as one of the decorative magnet URI or URN components

from bittorrent.org.

arvidn avatar arvidn commented on July 28, 2024

as the author of the website, and (presumably) the generator of the .torrent file, you will now the index of all files. couldn't you just refer to the files as numbers, and just rely on BEP53?

Essentially I'm suggesting that it may be easier to write a transformation pass over your HTML, as part of building the site, that resolves paths into file indices.

from bittorrent.org.

RangerMauve avatar RangerMauve commented on July 28, 2024

@the8472 Would it maybe make sense to create a new protocol for this? Since magnet links aren't necessarily BitTorrent specific in the first place, maybe there should be an intermediate protocol type that's used when you actually load the website, and then have a way to convert that to magnet links for sharability.

@arvidn As I mentioned in this comment, I don't think that people necessarily will know the index of files in their torrent ahead of time.

The ideal use case would be that somebody builds up a static website which can be served from the local filesystem, upload it to BitTorrent without any additional processing, and share the magnet link with someone to have them download it.

Having an additional processing step would be possible, but it'd confuse newcomers and lead to a bad user experience compared to mentally modeling their site as some files in a folder. A use case I could see, taking from the Beaker Browser, would be somebody publishing some p2p web content, and another person "forking" their own copy of it which they can modify for their own purposes. If you have additional build steps before content gets published, you'd now need some way of converting the files back for better UX. Plus, you'd be limited by having to process all your content which would make it hard to use with dynamic things like CSS and JavaScript.

What if the browser intercepted magnet links, then converted them to something like bittorrent:identifier/optional/path.html where the hash is either the bith+infohash, or as per BEP 46 it could be btpk+public key hash for mutable torrents. This is similar to a proposal made in 2010 for a new bittorrent: protocol.

from bittorrent.org.

RangerMauve avatar RangerMauve commented on July 28, 2024

Alternately, maybe instead of a straight up magnet link, I should just use the URN portion from magnet links.

Have bith:infohash/optional/path and btpk:public key/optional/path. Then the browser can extract file paths from magnet links, and these URIs could easily be converted back to magnet links.

from bittorrent.org.

RangerMauve avatar RangerMauve commented on July 28, 2024

So, how crazy is the idea of creating new protocol types? I think it's more elegant for interfacing with browsers and preserves the "url path in a folder" semantics that are used in other protocols like HTTP.

from bittorrent.org.

RangerMauve avatar RangerMauve commented on July 28, 2024

Should I write up something more detailed and put it in a PR for a new BEP?

from bittorrent.org.

ssiloti avatar ssiloti commented on July 28, 2024

Yes, I think this would be a good subject for a BEP.

from bittorrent.org.

RangerMauve avatar RangerMauve commented on July 28, 2024

Closing in favor of #92

from bittorrent.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.