Open flyingzumwalt opened 7 years ago
basically need to have an ipfs node in a browser extension that can be used by
@haadcode did you get a chance to look into this? Can we reuse this code?
Note: we probably don't want to use francisco's code from the chrome extension. Instead we want to use the code from @lidel's web extension: https://github.com/lidel/ipfs-firefox-addon and @whyrusleeping's extension https://github.com/whyrusleeping/ipfs-webext but we want to use the UI from station https://github.com/ipfs/station, similar to how Francisco used the station UI in the chrome extension
The node info part of this issue is in ipfs-companion.
Being able to start/stop an ipfs daemon form a WebExtension would be very nice. It relies on the the runtime.connectNative
webext api being available and needs an custom ipfs-manager
app to be installed on the users system, which can talk the browsers Native Messaging protocol... it'd be much like running another server locally, whose job it is to stop / start / report on ipfs... from @whyrusleeping's readme:
The way i see this extension working when "done" is roughly as follows:
- Extension ships with a small shell script that is able to download an
ipfs-manager
type program that does a few things:- communications with firefox via nativeMessaging (does the length prefixed json message stuff)
- Is able to download, init, start and stop an ipfs daemon
- Is able to control the ipfs daemon via messages from the webextension
https://developer.chrome.com/apps/nativeMessaging
This could be made to work in firefox and chrome today, but is a large chunk of work. The ipfs-manager
app can't be installed with the add-on, as it's external to browser add-on. It would have to be installed along with an ipfs binary or station. We don't want users to have to install even more things to make the browser integration work, so it should probably happen automatically if you install station.
Our ipfs-manager
is named.. Station IPFS Desktop 🙃
What is missing to to make IPFS Desktop to understand Native Messaging, so that Companion can detect and talk to it. If we need a separate script/binary, then it should be opportunistically installed with IPFS Desktop, like @olizilla suggested.
I strongly hope we bundle/develop this functionality within IPFS Desktop itself, limiting the number of projects that need to be maintained.
Show controls to start + stop the IPFS daemon within the web extension.
Use the code from @whyrusleeping's extension https://github.com/whyrusleeping/ipfs-webext to add a start/stop IPFS operation to @lidel's web extension: https://github.com/lidel/ipfs-firefox-addon
If we have time, use the UI from station https://github.com/ipfs/station, similar to how Francisco used the station UI in the chrome extension
The priority:
If we have to bump the station UI part to a separate issue and do the work on a future sprint, that's fine. The key is to get the start/stop functionality into @lidel's web extension.
So the end-result of this work might merely add a "start/stop ipfs" button into this:![lidel web extension snapshot](https://github.com/lidel/ipfs-firefox-addon/raw/master/screenshot.png)
but if we have time, it will also transform that UI to look more like this:![station chrome extension ui snapshot](https://lh3.googleusercontent.com/yCXookiID1XLnSkea8I98n38X5glDiXULUkL25ISPpn9D-azmpNOZvNLlTfqoEGmfkRj1oef=s1280-h800-e365-rw)