-
Notifications
You must be signed in to change notification settings - Fork 29
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
Web Extension runs a local go-IPFS node and redirects IPFS urls to the gateway #11
Comments
Breaking this up:
|
Is it a goal to work in Firefox on Android? The current Firefox extension doesn't. I think there should be an explicit decision, even if it is "not now" or "with a subset of low-resource features". |
Old extension does not work on Android, but from what I was able to find WebExtension version should work the same in Android as it does on desktop (+/- some gui elements): ipfs/ipfs-companion#109 |
@lidel I don't believe web-extensions are ever going to allow bundling binaries like go-ipfs or spawning them processes. I am also skeptical that they would allow implementing custom protocol handlers, in fact with e10s (firefox with multiple processes) intentionally reduced abilities of custom protocol handlers. |
@Gozala I see two ways of shipping IPFS with add-on:
As for custom protocol handlers in WebExtension, there is an open API request at Bugzilla, however it is not clear to me how that implementation will handle origin issues (but that discussion should continue in #6, #3). |
@whyrusleeping made progress on this and put together a test: https://github.com/whyrusleeping/ipfs-webext. From what I can tell, it's spawning go-ipfs via a shell script. According to his notes, we would:
My immediate question is, how is this sandboxed (if at all)? Can the extensions run just any shell-script?
@lidel How do the add-ons background scripts run in terms of isolation? If we have js-ipfs bundled in the add-on and we run it in the background script, is it one per page/tab or one per window? Is it running in its own process or process per page/tab? The concern here is generally resource consumption and more specifically getting CPU cycles if it's in the background. |
@haadcode a background script starts running as soon as you install the extension until you uninstall it or close firefox. There is only one instance of the background script running at all times so if we go the js-ipfs route, background scripts would be the best way to start a daemon in the background. There is more information about background scripts here: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Anatomy_of_a_WebExtension#Background_scripts |
The webextension i've been working on relies on the user installing and ipfs binary and a 'native messaging host' descriptor (Which i've made a handy install script to do). Once thats done, the extension can start the ipfs daemon on its own and redirect requests to it. @lidel Ideally, We could integrate the work i've been doing into your extension, and then your extension should work for both firefox and chrome (webextensions are cross-browser compatible for the most part, if i understand correctly) |
This issue will be "done" when:
|
@whyrusleeping your instructions say
Please explain where to find the option to select “Load unpacked extension” |
@flyingzumwalt The sentence right before the one you quote says how to do the same in firefox. Let me adjust the spacing (newlines in markdown don't mean a newline until you have two, i forgot this fact) |
After installing, my copy of the extension doesn't provide a way to start the daemon. It just says
Thus far, the extension has neither
The other two acceptance criteria are
Does it do those? |
@flyingzumwalt My code does not print any of those messages. Are you using my extension? Did the install.sh script succeed? Did you try going to |
The daemon is started automatically when the extension loads |
Yeah. When I try to start it on the command line I get |
You don't need to start it on the command line. The webextension starts it on its own. Where are you seeing a message saying that the daemon isnt running? |
I see it when I click on the IPFS cube icon in chrome. |
@flyingzumwalt I think that might be a different extension you have installed. |
Try loading https://ipfs.io/ipns/ipfs.io in your browser |
How can I test whether the extension is resolving content through the daemon? The readme says
But that prevents offline use. I want to turn off my wifi and read content that I already pinned on my local daemon. I also want to resolve content from daemons on a local network without hitting a remote gateway. Why isn't that possible? |
@flyingzumwalt the requests to ipfs.io get redirected. This works without internet, assuming you have the content in question cached (though the dns resolution of my /ipns/ipfs.io example wouldnt work without internet) |
Nevermid the bit about |
@flyingzumwalt Yeah, i didnt put any effort into UI. Others have done that work much better than i will be able to. |
@flyingzumwalt Try pulling latest on the extension and running the install again. I fixed a warning message firefox was giving me about a field in the hosts file. |
@whyrusleeping WebExtensions are supposed to be cross-browser compatible, but Firefox ships own "twist" on the topic under However, running As for But |
Test results: The extension https://github.com/whyrusleeping/ipfs-webext works for me in Firefox and Chrome on OS X 10.10, 10.11 and 10.12 and Firefox and in Chromium on Ubuntu 12.04, 14.04, 16.04 and 16.10. |
Example: https://github.com/lidel/ipfs-firefox-addon
This will be done when:
We have published a Web Extension that runs a local node and redirects IPFS urls to the gateway
General notes:
Acceptance Criteria:
Also see #12.
Background
@Gozala (2017-02-01):
and from @jbenet
ALSO
Background
@Gozala (2017-02-01):
@jbenet (2017-02-05):
@Gozala (2017-02-06)
and
The text was updated successfully, but these errors were encountered: