-
Notifications
You must be signed in to change notification settings - Fork 2
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
Load apps / sites like https://lunet.link/myapp.io/
#2
Comments
I need to do some exploration to be certain but I think
Seems to suggest that sandboxed iframes might be given some unique origin, in which case we don't need subdomains to separate origin and might be able to just use same lunen.link SW across them. If that doesn't work out there is also some hope with blob URLs. In other words if we can somehow isolate apps / sites from each other we won't need to deal with subdomains which I think would be really amazing & as it simplifies everything greatly! |
Sadly without |
I have gave up on making using Instead I've set up https://celestial.link/ static site on S3 which serves same content across all the subdomains like https://mycid.celestial.link/. Content served right now does not really do much but I plan to make it bootstrap SW proxy to lunet. Lunet will be able to infer CID based of off origin that is going to be subdomain & serve content that corresponds to it. In this setup visiting
This has interesting consequences
|
It just occurred to me that this can be untied from specific protocol & embrace diversity by registering |
This might have being little too bold of a statement as page could |
However, according to the spec
So, if |
Prototype is live! Now you can go to https://lunet.link/peerdium.gozala.io/ And it will load peerdium fork. This time it no longer needs any bootstrap just a DNS TXT record for
Following also works https://lunet.link/webui.lunet.link/ In this instance through following record for
Finally you can load anything from IPFS in same way just via CID, for example following loads same peerdium fork: https://lunet.link/QmYjtd61SyXU4aVSKWBrtDiXjHtpJVFCbvR7RgJ57BPZro/ |
At the moment each app is hosted by an author on some domain which on first load imports lunet client which will setup a service worker to load app and generally make it available across sessions online or offline without having to interact with servers.
@jimpick and up implementing a simple server which generates bootstrapping doc / sw from subdomain. Specifically when loading
https://cid.lunet.link/
it would serve html which mounts corresponding cid andlunet.js
SW script.@autonome in our conversation made a good point that user in this case needs to trust
lunet.link
because all the apps do more or less go through it.This got me thinking about alternative way to architect lunet that would address both things in a really neat way.
https://lunet.link/
could be just a static site with a service worker setup such that when sayhttps://lunet.link/peerdium.gozala.io/doc
is loaded it will redirect tohttps://lunet.link/?redirect=peerdium.gozala.io/doc
which will install SW and redirects back tohttps://lunet.link/peerdium.gozala.io/doc
causing a SW to serve it.SW on request to
https://lunet.link/peerdium.gozala.io/doc
will do following:Will lookup dnslink TXT record to determine CID, let's say it's a
$cid1
.Will respond with a following markup:
lunet will serve same thing under all subdomains meaning that
cid1.lunet.link
will just register SW which will route requests (similar to how it's done today) to the corresponding client document in this casecid1.lunet.link
that will route them back to the parent dochttps://lunet.link/peerdium.gozala.io/doc
which will take care of fetching cid1 from the IPFS and serving it.Why / How is this better
In this setup
lunet.link
becomes commodity, you don't have to trust it. You can deploy it anywhere (in fact fork github repo & enabling gh-pages probably will do fine). So in a way it addresses point made by @autonome you don't have to trust it just fork & deploy, best part being you'll need to load it once per device.We remove whole bootstrapping out of the equation. Knowing CID is just enough, better yet on first load we could allow user to choose to "install" it in local namespace meaning map it to say
https://lunet.link/peerdium/
. App could provide name suggestions, lunet could pick on that isn't taken and allow user to use that or override in place.Unlike current setup which requires app / site to cooperate (by serving bootstrap code which embeds lunet client from that domain) it always doc from own subdomain which will then serve corresponding app / site. In other words no cooperation is required.
In a way we are removing dependency on DNS, well not really because we made it far more loosely coupled because
User can just use CID
User can map to whatever name desired.
In a future we could offer alternative name resolution from DNS (web of trust anyone ?)
We put browser in your browser! However maybe in a future we could remove top browser layer.
The text was updated successfully, but these errors were encountered: