Comments (19)
from beaker.
@diasdavid great, thanks for opening this issue.
This document explains the repo. I think the background process is the right place to integrate the transport protocols, so that data can persist across navigations, and so we're not confined to WebRTC. So, go-ipfs seems like the right call.
Most of my dat integration's structure should be copyable for IPFS. There may be ways to reuse code btwn the protocol integrations, which will also pay off when we integrate webtorrent. No need to focus on that yet, though; let's just make it work, first.
After we have an ipfs://
and view-ipfs://
protocol, we can look into injecting the IPFS API into web pages.
Some info for reference:
- npm-go-ipfs ships prebuilt go-ipfs binaries, so devs should not need go installed to run beaker's build
- When ipfs/js-ipfsd-ctl#78 closes, js-ipfsd-ctl will install the arch-appropriate ipfs binary on first execution. We'll need to hook into this and tell the user what's going on.
- js-ipfs-api is how we'll interact with the go binary.
from beaker.
@diasdavid @jbenet this is what I have in mind for integration right now. I shared it with the dat guys and they think it's doable on their end. I'm interested if you have technical or design issues to raise.
from beaker.
I've hit an issue that'll need some thought.
Chromium (and thus Electron) have a concept of "standard" URLs. You can read about them here.
To make electron's webviews handle paths correctly (in links, in imgs, etc) we want Electron to treat the folder hash as the domain. Then, paths like /icon.png
will resolve as expected:
in ipfs://QmTqDSxMH6xsKabqhBSeBVu89UmbF2Z1CbN4k4tT6Zhy8R/
, it'll resolve to...
ipfs://QmTqDSxMH6xsKabqhBSeBVu89UmbF2Z1CbN4k4tT6Zhy8R/icon.png
Here's the problem: the domain in standard URIs are case-insensitive. Once a protocol is registered as standard, chromium automatically runs toLowerCase on the domain. In base58/64, this destroys information.
I've committed a basic integration. If you serve an index.html
via ipfs, then remove 'ipfs'
from this line, you can open the file via ipfs://{root-hash-that-includes-the-index.html}
. But, if you readd 'ipfs'
to the standard protocol registrations, you'll see the url bar automatically toLowerCase(), and the GET will fail.
Two possible solutions:
- Only use hex-encoded IPFS urls. This may not be super feasible, since the rest of the ecosystem is in base52+.
- Dont use chromium's standard-url protocols. This may work, but it won't be super easy. Maybe we can make the webviews work, as expected, through some combination of JS injected into the client, and request interception.
We might raise issues with electron, but that's an unlikely solution as well.
from beaker.
Two small updates on my last post...
- I managed to get things mostly working without the standard scheme. Paths were resolving better than I expected. So, that may not be too hard to handle.
- I was pointed to ipfs/kubo#1678. Reading it now.
from beaker.
I was pointed to ipfs/kubo#1678. Reading it now.
@pfraze Long story short:
- use
/ipfs/Qm...
wherever possible - if you have to use a URI, use
fs:/ipfs/Qm...
from beaker.
To make electron's webviews handle paths correctly (in links, in imgs, etc) we want Electron to treat the folder hash as the domain. Then, paths like /icon.png will resolve as expected
Absolute paths like /icon.png
are strongly discouraged on IPFS, as they break on the HTTP gateway (and violate nesting properties). Therefore it's generally safe to assume that websites on IPFS only use relative links, with the exception of absolute /ipfs/Qm...
links.
Edit: I'd actually go further than that and say that paths like /icon.png
shouldn't resolve for IPFS sites, as you'd end up with webpages that work in beaker but break elsewhere.
from beaker.
@diasdavid hey, I'd like to do a call with the IPFS team, to hear about the vision for IPFS browser. Do you think we could schedule one?
from beaker.
hey @pfraze I am really interested. A couple of weeks ago I attempted to make an ipfs-specific browser (specific to ipfs in every sense - even its components were on IPFS and makes it easier to be self-publish), I am happy to discuss design choices, I really love the approach in combining all the decentralized projects!
great work!
from beaker.
@nicola right on, ping me on IRC sometime and we can chat
from beaker.
Can we do it Tuesday, 9am PDT, 6pm UTC? @pfraze @nicola @jbenet
from beaker.
Are those times ==? I think they may be off by an hour.
I can do Tuesday
from beaker.
I can do tuesday too
from beaker.
@pfraze you are right, fixed. Looking forward to chat today :)
9am PDT, 5pm WEST, 6pm UTC
from beaker.
Same. How should we get in touch? Google hangout?
On Tue, Jun 21, 2016 at 5:54 AM, David Dias [email protected]
wrote:
@pfraze https://github.com/pfraze you are right, fixed. Looking forward
to chat today :)9am PDT, 5pm WEST, 6pm UTC
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#2 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ABNhUyYymaenLuLrDdrIC4sSuk3N0n_Vks5qN8LqgaJpZM4IzLJz
.
from beaker.
Sent a cal invite with a Hangout URL :)
from beaker.
Now basically working. The code has been moved into https://github.com/pfrazee/beaker-plugin-ipfs. Give it a shot!
from beaker.
@pfrazee that repo link is dead now. What's the status of this a year later?
from beaker.
Hey @Powersource, see my comment here #480 (comment)
from beaker.
Related Issues (20)
- [Question] JS: how to prompt self-cloning a site?
- FATAL:electron_main_delegate.cc(253)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
- [6059:0925/061055.321176:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/BEAKER/beaker/scripts/node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.
- Can't start Beaker on MacOS 11.6 HOT 3
- Watchlist eyeball icon pops up next to the menu button, but when I click it I go to `beaker://watchlist` which produces "This site can't be reached"
- When trying to open browser immediately after installtion Java.Script Error
- Error: Can't walk dependency graph: Cannot find module '@beaker/dat-serve-resolve-path' f HOT 2
- Consider dat support in brave browser, reconsider ipfs in beaker
- implementation 'com.google.firebase:firebase-analytics:17.4.1'
- implementation 'com.google.firebase:firebase-analytics:17.4.1'
- Javascript error immediately after installation HOT 1
- Web browser extensions
- No more development? HOT 7
- No space between words in interface
- Beaker Installation Issues
- What about adding Aggregore features into Beaker Browser?
- Beaker Browser with Solid
- no IDN?
- PR: Prepare for alignment with upstream code-oss web-modules HOT 2
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 beaker.