Skip to content

Resolve /ipfs/<address> and /ipns/<address> links #134

Description

@defder-su

Problem

Large files (e.g., videos) are not very usable in ZeroNet. It makes sense to use IPFS for such static content. But how?

Current

Multiple sources are more or less useful (seeing Video section) for inlined content.

<video poster="img/TimeManDemo.png" controls preload="none" width=640 height=480>
<source src="/ipfs/bafybeida5bicp23nuxyg3a763q5a3rdsa6yzazzojvwumkyyigroigs5mi/QmNhmdbsFL4gcQG44mFQtTStyzVNycUJsTF42pRTdt6w2s.m4v" type="video/mp4">
<source src="http://localhost:8080/ipfs/bafybeida5bicp23nuxyg3a763q5a3rdsa6yzazzojvwumkyyigroigs5mi/QmNhmdbsFL4gcQG44mFQtTStyzVNycUJsTF42pRTdt6w2s.m4v" type="video/mp4">
<source src="http://bafybeida5bicp23nuxyg3a763q5a3rdsa6yzazzojvwumkyyigroigs5mi.ipfs.localhost:48084/QmNhmdbsFL4gcQG44mFQtTStyzVNycUJsTF42pRTdt6w2s.m4v" type="video/mp4">
<source src="https://robotizing.net/ipfs/bafybeida5bicp23nuxyg3a763q5a3rdsa6yzazzojvwumkyyigroigs5mi/QmNhmdbsFL4gcQG44mFQtTStyzVNycUJsTF42pRTdt6w2s.m4v" type="video/mp4">
<source src="https://ipfs.io/ipfs/bafybeida5bicp23nuxyg3a763q5a3rdsa6yzazzojvwumkyyigroigs5mi/QmNhmdbsFL4gcQG44mFQtTStyzVNycUJsTF42pRTdt6w2s.m4v" type="video/mp4">
<img src="img/TimeManDemo.png"></img>
</video>

But it looks like fortune-telling. Also, what about hyperlinks?

Solution

Namecoin domains are already friendly in ZeroNet. So, what about IPFS?

Developer could just use relative links like <a href=/ipfs/Qmcu5z3bdYkQwJnMK3bqdwnHzaqZuAYdjbMxyjTJSrQABX>.
ZeroNet node should redirect all links with prefixes /ipfs/ and /ipns/ to IPFS gateway specified in config. Default value could be https://ipfs.io, and user can set other gateway or local IPFS node.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions