Comments (10)
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.
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.
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.
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.
@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.
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.
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.
Should I write up something more detailed and put it in a PR for a new BEP?
from bittorrent.org.
Yes, I think this would be a good subject for a BEP.
from bittorrent.org.
Closing in favor of #92
from bittorrent.org.
Related Issues (20)
- Can the bep52 spec clearly explain what happens with non-powers of two. HOT 8
- Synthetic migration torrents HOT 8
- https://www.bittorrent.org is offline HOT 4
- Is BitTorrent an Open Source Protocol? HOT 3
- Connect
- hop.code-workspace.txt
- faq: nostr and bittorrent? HOT 2
- Question: The reasonings of the UDP6 `IP address` field (BEP-15)
- Adopt DNSLink for mapping domains to torrents
- Proposal: Git Integration HOT 1
- Proposal: HTTP and TCP Tunneling HOT 4
- [Proposal] Passwordless authentication with Bittorrent?
- BEP: Extensions supported by tracker HOT 14
- Wrong ed25519 keys? HOT 9
- BEP Proposal: TLS HOT 1
- Post Quantum Cryptography Support HOT 1
- Predefined directories: Allowing bittorrent to easily be adopted with other applications HOT 4
- BEP 15 Magic Constant HOT 1
- BEP 44: Signature verification algorithm is invalid if the data is not a string HOT 4
- does bencode dictionary allow duplicated keys? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bittorrent.org.