Skip to content
This repository has been archived by the owner. It is now read-only.

Magnet link in IPFS #25

Closed
jxxp9 opened this issue Aug 25, 2015 · 10 comments
Closed

Magnet link in IPFS #25

jxxp9 opened this issue Aug 25, 2015 · 10 comments
Labels

Comments

@jxxp9
Copy link

jxxp9 commented Aug 25, 2015

Will it be possible to fetch and resolve a typical bittorrent magnet link using IPFS? This way, those link (referring to well identified content) don't get broken if (hopefully soon) we'll use IPFS to share files. They'd need to be mapped to corresponding IPFS object, I guess. But is it doable, theoretically, or I'm totally wrong?

@jbenet
Copy link
Contributor

jbenet commented Aug 25, 2015

IPFS already has its own link, URI formats, which are 100% unix-safe:

/ipfs/<hash>/<path>
/ipns/<hash>/<path>
/ipns/<domain>/<path> # hacky shortcut to one below
/dns/<domain>/<path>

You can already use this in browsers. we are working on the many pieces necessary for resolution to work in browsers out of the box:

@jxxp9
Copy link
Author

jxxp9 commented Aug 25, 2015

Great! Thank you so much!

@jbenet jbenet closed this as completed Aug 25, 2015
@jbenet
Copy link
Contributor

jbenet commented Aug 25, 2015

should we keep these open, or close them? am not sure if people will see them if closed?

@jbenet jbenet reopened this Aug 25, 2015
@jxxp9
Copy link
Author

jxxp9 commented Aug 25, 2015

Let it open, so others too can comment, thanks!

@Mithgol
Copy link

Mithgol commented Sep 14, 2015

URLs in form ipfs:Qme3pKkedCfcebDmkZz5tU2suMjHP4EPi29NMNNxQrQzwy/done seem useful because they are relatively short (51 characters plus the length of the path such as /done).

For example, they won't be broken in the middle to be forcibly wrapped to the next line on a traditional (80 characters per line) terminal unless the path (after the hash) exceeds ≈28 characters. That's at least twice as good as the old 8.3 character limit.

They are also less likely to cause horizontal scrollbars in modern editors or HTML textareas.

Unfortunately, such short URLs are supported, as far as I can tell, only by the addon for Firefox.

For the sake of comparison:

  • possible future unixweb://ipfs/ URLs are 10 characters longer than ipfs:,
  • the current http://gateway.ipfs.io/ipfs/ URLs are 23 characters longer than ipfs:.

@jbenet
Copy link
Contributor

jbenet commented Sep 14, 2015

the canonical paths will start to look like:

/ipfs/<hash>/<path>
/ipns/ipfs.io/docs/install

@jbenet
Copy link
Contributor

jbenet commented Sep 14, 2015

please note that the unixweb;// or nix:// thing is a workaround, not meant as the canonical identifier. people SHOULD still use just:

/ipfs/<hash>/<path>
/ipns/ipfs.io/docs/install

it's annoying right now, but it will lead to a much better future if we fix the massive UNIX / Web rift.

@hikari-no-yume
Copy link

hikari-no-yume commented May 2, 2016

Does this actually work properly with the web's security model? If different IPFS sites are just different paths under one hostname, then under the Same-origin policy, all IPFS sites would appear to have the same “origin”, which could be problematic.

It's also inconvenient that IPFS sites are unable to use absolute paths with / for self-reference.

@whyrusleeping
Copy link

whyrusleeping commented May 2, 2016

This is something we hope to address with per page suborigins: https://w3c.github.io/webappsec-suborigins/

@flyingzumwalt
Copy link
Contributor

flyingzumwalt commented May 23, 2017

This issue was moved to https://discuss.ipfs.io/t/magnet-link-in-ipfs/385

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants