-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standard URI for ipfs and ipns protocols (Discussion) #1678
Comments
I strongly agree that IPFS objects should be identifiable by URI, mostly because of uniformity as described by RFC 3986:
I don't care if The above suggestion seems entirely reasonable to me:
I could also see an argument for IPFS identifiers being URNs per RFC 2141:
IPNS is separate. I could see an argument for it being a separate scheme, as proposed above:
On the other hand, I could see the IPNS public key hash being a naming authority per RFC 3986.
Authorities are preceded by a double slash, so:
…and if IPNS public key hashes are interpreted as an authority, distinct from the global (no-authority) IPFS paths, IPFS and IPNS could be viewed as two halves of one scheme:
|
@willglynn, thanks for your comments. While working with this in practice, I realized that one may want to provide IPFS gateway information as part of the URL. Again, using the hypothetical example of adding IPFS support to something like Should this information always be specified external to the URL (e.g., configuration options to the tool)? Or does permitting this in the URL make sense? That would give us something like:
Where
|
In my view, IPFS gateway information is external to the URI. I think it's analogous to HTTP/FTP/SOCKS proxy information for which tools like |
Yeah, that was mostly my inclination as well. Externally configured it is, then. |
The more I think about it, the more I favor treating IPNS names as a URI authority. Consider:
Retrieval would be processed as "resolve IPNS
Retrieval would be processed as "DNS look up
Retrieval would be processed as "DNS look up |
I feel this quote belongs here :-)
So the canonical way of representing IPFS address is That being said, IMHO it would not hurt to additionally provide a silent support of URLs like |
@lidel nothing has changed since that quote :) |
Indeed; IPFS can choose whatever syntax it wants for canonical use. I'm suggesting that there be an official, standardized way of encoding IPFS identifiers into URIs, since it is better to interoperate with URI-centric tools than not, and since it's better to have one way of encoding IPFS identifiers into URIs than multiple incompatible methods. I would favor
If the IPFS namespace is one big path hierarchy, then mapping IPFS |
Ok, so as long as this discussion is about interoperability layer, Starting with
Additionally we could agree to default to
What are your thoughts on this? |
A goal from @jbenet's post:
If this is the objective, then the corresponding URIs should be Notably, these same references – Using double-slashes ( |
Makes sense. This way a rule for legacy layer would be super simple: always add |
Great! Sounds like a workable direction. There are a couple other possible pain points I can think of when mapping IPFS paths <-> URIs. Mostly, URIs are specified to be a particular subset of US-ASCII and certain characters have specific meanings, so unless IPFS conventions happen to be compatible, we'll need to use percent-encoding to bridge the gap. The specifics depend on some gory details:
|
I have a proposal for a content addressing URI scheme here: https://bentrask.com/notes/content-addressing.html. I traded emails with Juan Benet about it a year ago when I first wrote it. Obviously I couldn't convince him. RFC 6920 proposes a different but similar scheme. It would be nice if the URI scheme was common between different projects (IPFS, Camlistore, my own). A single content address could be resolved over various different systems depending on context. Edit: I compared four different proposals here. |
Sorry, I'm late to the party. Thanks very much @lidel for representing my viewpoint :) I'm going to try responding only to things i think are unresolved. ask again if i missed something
I think @lidel elucidated my viewpoint excellently, and i do not need to express again that this is not desired becuase it complicates things, and forces us to add a 2+ protocol identifiers.
Exactly right. URLs on the HTTP gateways ARE NOT IPFS Paths/URIs (they contain one, in a larget HTTP URL).
Hmmmm, i'm not sure. I understand the spec... it may be ok to consider
I like this, maybe we make
Yes, the paths are supposed to be UTF-8 strings. We should be enforcing it, though i dont think it's being enforced atm.
Not at this time, though it may become relevant.
yes.
Sorry @btrask :/ -- i just disagree :)
you didn't compare the proper IPFS URIs, which are paths:
These are all valid in IPFS. Soon we should also have:
The first component is the protocol "scheme". One remaining thing to address: the protocol schemeI've known for some time now that we're going to need to have + support a protocol scheme identifier, for all the use cases that absolutely require one. _Instead of using only I think we should use one of:
As in:
but happy to hear more suggestions. I know it's rude to use a one-letter schme identifier... but hey... nobody else is using it. |
I understand Juan. Sorry for the misleading comparison. If IPFS addresses are paths, what would you think about simply using
|
From my experience 👍 Yes, it makes IPFS work out-of-the box with legacy software (as long as you have IPFS filesystem mounted via FUSE driver provided by go-ipfs). 👎 ..but if you don't have root access and/or can't set up FUSE -- bad luck IMO As a minimalist I really like the |
The Windows is supposed to use backslashes but forward slashes are often accepted and silently corrected to backslashes. |
@gatesvp or someone else using windows, could you please check what happens with |
Just tested on Windows, |
@mappum is that the case even if you install a protocol handler for |
Yes, just tried adding a protocol handler to the registry for |
I'm using both ?foo#bar for the ia book reader, so think they should both be supported :) also 👍 for minimalism |
Hm.. |
may be worth doing:
wish |
I'd go with |
|
Yesterday we had thought of using some more:
I dont think it does, the browser tools could undo that change for the user. my problem with |
a worry with
which is not ideal. this is the sort of thing 99% of internet users will be confused by, so it should be as clear as we can make it |
Attaching IPFS Picture a
These work as expected – i.e. as paths. If that same document were retrieved from
These work as expected because If that same document were retrieved from
Again these work because the authority is constant, and the IPFS paths are mapped to URI paths. If that same document were retrieved from
Please do not make Can this be worked around client-side? Yes, but there are many more clients that assume paths are paths than there are IPFS implementations that would assume something different. I don't want to patch
If users typing in |
we have to make this work. it's not an option. 99% of people on the internet will try it. I believe that we can teach the browser's I will add that i understand your post well. im saying we have to work around the limitations. |
This issue is very old and should be closed. A lot changed since 2015:
|
I was reading this, hoping to find just that. IPFS wants to get away from hosting locations for reasons of persistency, but IPNS is different. I love the idea of using DNS (and DNSSEC) and getting very powerful bookmarks:
I will add the spec to my reading list, it's useful stuff! |
I would like to add ipfs support to a tool that expects a URL-format specification. Hypothetically, let's say I wanted to add ipfs suport to
curl
. I would need ascheme:data
format specification that follows the standard url format.I asked about this on irc and immediately folks started trying to direct me away from URLs to the multiaddr spec. Setting aside for the moment then I'm not clear what problem multiaddr is trying to solve or why URLs aren't appropriate, some tools will simply require a URL format to operate.
In the absence of any other suggestions, I would like to suggest that we document the following standard forms:
ipfs:<hash>[/<path>]
for IPFS objects, as in:ipns:<hash>[/path]
for IPNS names:The text was updated successfully, but these errors were encountered: