Top Related Projects
Reference implementation of the Filecoin protocol, written in Go
An IPFS implementation in Go
IPFS implementation in JavaScript
Pinset orchestration for IPFS
Quick Overview
The IPFS Companion is a browser extension that integrates the InterPlanetary File System (IPFS) into the user's web browsing experience. It allows users to access IPFS-hosted content directly from their web browser, providing a seamless way to interact with the decentralized web.
Pros
- Decentralized Web Access: The IPFS Companion enables users to access content hosted on the IPFS network, promoting the adoption of a more decentralized and resilient web.
- Improved Privacy and Security: By using IPFS, the IPFS Companion helps users avoid centralized servers and the potential privacy and security issues associated with them.
- Offline Accessibility: The IPFS Companion can cache content, allowing users to access it even when they are offline or when the original source is unavailable.
- Seamless Integration: The extension integrates directly into the user's web browser, providing a user-friendly way to interact with the IPFS network.
Cons
- Limited Browser Support: The IPFS Companion is currently only available for the Firefox and Chrome/Chromium-based browsers, limiting its reach to users of other browsers.
- Complexity for Non-Technical Users: Setting up and using the IPFS Companion may be more challenging for users who are not familiar with decentralized technologies or the IPFS network.
- Dependency on IPFS Infrastructure: The IPFS Companion relies on the availability and performance of the IPFS network, which can be affected by network congestion or other issues.
- Potential for Compatibility Issues: As a browser extension, the IPFS Companion may occasionally experience compatibility issues with certain websites or web applications.
Getting Started
To get started with the IPFS Companion, follow these steps:
- Install the IPFS Companion extension for your browser:
- Once the extension is installed, you can access IPFS-hosted content by simply navigating to the desired IPFS URL (e.g.,
ipfs://QmSomeCID
). - The IPFS Companion will automatically detect the IPFS URL and provide you with the option to view the content.
- You can also use the IPFS Companion to pin content to the IPFS network, share IPFS links, and manage your IPFS node settings.
For more advanced usage and configuration options, please refer to the IPFS Companion documentation.
Competitor Comparisons
Reference implementation of the Filecoin protocol, written in Go
Pros of Lotus
- Lotus is a full-featured Filecoin node implementation, providing a robust and comprehensive solution for interacting with the Filecoin network.
- Lotus offers advanced features like storage mining, retrieval, and deal management, making it a powerful tool for Filecoin participants.
- The Lotus project has a large and active community, with regular updates and improvements to the codebase.
Cons of Lotus
- Lotus has a steeper learning curve compared to IPFS Companion, as it requires a deeper understanding of the Filecoin ecosystem.
- The Lotus codebase is more complex and may be less accessible to developers new to the Filecoin project.
- Lotus has a higher resource footprint, as it requires more system resources to run a full Filecoin node.
Code Comparison
IPFS Companion:
browser.runtime.onInstalled.addListener(function() {
browser.contextMenus.create({
id: "ipfs-companion-context-menu",
title: browser.i18n.getMessage("contextMenuTitle"),
contexts: ["page", "link", "image", "video", "audio"]
});
});
Lotus:
func (api *FullNodeAPI) StateMinerInfo(ctx context.Context, a address.Address, tsk types.TipSetKey) (miner.MinerInfo, error) {
act, err := api.StateGetActor(ctx, a, tsk)
if err != nil {
return miner.MinerInfo{}, err
}
st, err := api.ChainReadObj(ctx, act.Head)
if err != nil {
return miner.MinerInfo{}, err
}
An IPFS implementation in Go
Pros of ipfs/kubo
- Comprehensive IPFS implementation, providing a full-featured IPFS node
- Supports a wide range of IPFS features and functionalities
- Actively maintained and developed by the IPFS core team
Cons of ipfs/kubo
- Larger codebase and more complex to set up and configure
- May have a higher resource footprint compared to ipfs-companion
- Requires more technical expertise to use effectively
Code Comparison
ipfs/kubo (Go):
func (n *IpfsNode) Bootstrap(cfg BootstrapConfig) error {
if n.Bootstrapper != nil {
return n.Bootstrapper.Bootstrap(cfg)
}
return n.loadBootstrappers(cfg)
}
ipfs/ipfs-companion (JavaScript):
async function start() {
await browser.runtime.onInstalled.addListener(onInstalled);
await browser.runtime.onStartup.addListener(onStartup);
await browser.runtime.onMessage.addListener(onMessage);
// ...
}
IPFS implementation in JavaScript
Pros of ipfs/js-ipfs
- Provides a comprehensive JavaScript implementation of the IPFS protocol, allowing for seamless integration with web-based applications.
- Offers a wide range of features and functionality, including support for various IPFS commands and APIs.
- Enables developers to build decentralized applications that leverage the power of the IPFS network.
Cons of ipfs/js-ipfs
- May have a steeper learning curve compared to ipfs/ipfs-companion, as it requires a deeper understanding of the IPFS protocol and its underlying concepts.
- Can be more resource-intensive, as it includes the full IPFS node functionality, which may not be necessary for all use cases.
- Requires more setup and configuration compared to the more user-friendly ipfs/ipfs-companion.
Code Comparison
ipfs/js-IPFS:
const IPFS = require('ipfs')
const node = await IPFS.create()
const { cid } = await node.add('Hello, IPFS!')
console.log(cid.toString())
ipfs/ipfs-companion:
const ipfsCompanion = await import('ipfs-companion')
const { ipfs } = await ipfsCompanion.create()
const { cid } = await ipfs.add('Hello, IPFS!')
console.log(cid.toString())
Pinset orchestration for IPFS
Pros of ipfs-cluster/ipfs-cluster
- Scalability: ipfs-cluster provides a scalable solution for managing and coordinating multiple IPFS nodes, making it suitable for large-scale deployments.
- High Availability: The cluster architecture ensures high availability of IPFS content, with automatic replication and failover mechanisms.
- Monitoring and Orchestration: ipfs-cluster offers advanced monitoring and orchestration capabilities, simplifying the management of IPFS networks.
Cons of ipfs-cluster/ipfs-cluster
- Complexity: Setting up and configuring an ipfs-cluster can be more complex compared to the simpler ipfs/ipfs-companion.
- Resource Requirements: Running an ipfs-cluster may require more computational resources (CPU, memory, storage) compared to a single IPFS node.
Code Comparison
ipfs/ipfs-companion:
browser.runtime.onInstalled.addListener(function() {
browser.contextMenus.create({
id: "ipfs-companion-context-menu",
title: browser.i18n.getMessage("contextMenuTitle"),
contexts: ["page", "link", "image", "video", "audio"]
});
});
ipfs-cluster/ipfs-cluster:
func (c *Cluster) Pin(ctx context.Context, h cid.Cid, opts ...PinOption) error {
pin := &api.Pin{
Cid: h,
ReplicationFactorMin: -1,
ReplicationFactorMax: -1,
}
return c.PinWithOpts(ctx, pin, opts...)
}
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
IPFS Companion Browser Extension
Harness the power of IPFS in your browser!
Table of contents
About IPFS Companion
IPFS Companion harnesses the power of your locally running IPFS node (either through the IPFS Desktop app or the command-line daemon) directly inside your favorite Chromium-based or Firefox browser, enabling support for ipfs://
addresses, redirecting content-addressed websites and file paths to your local Gateway, easy IPFS file import and sharing, and more.
IPFS is a peer-to-peer hypermedia protocol designed to make the web faster, safer, more resilient, and more open. It enables the creation and dissemination of completely distributed sites and applications that donât rely on centralized hosting and stay true to the original vision of an open, flat web. Visit the IPFS Project website to learn more.
IPFS Companion features
Automatically detect and redirect IPFS resources
Detect URLs with IPFS paths
IPFS Companion detects and tests requests for IPFS-like paths ( such as /ipfs/{cid}
or /ipns/{peerid_or_host-with-dnslink}
) on any website. If a path is a valid IPFS address, it is redirected to load from your local gateway. The gateway at localhost
will also automatically switch to a subdomain to provide a unique origin for each website:
https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
âhttp://localhost:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
âhttp://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi.ipfs.localhost:8080
Detect DNSLink-enabled URLs
IPFS Companion detects DNSLink info in the DNS records of websites. If a site uses DNSLink (a few examples are https://docs.ipfs.io, https://ipld.io, and http://tr.wikipedia-on-ipfs.org), IPFS Companion redirects the HTTP request to your local gateway:
http://docs.ipfs.tech
âhttp://localhost:8080/ipns/docs.ipfs.tech
âhttp://docs.ipfs.tech.ipns.localhost:8080/
Detect pages with x-ipfs-path
headers
IPFS Companion also upgrades transport to IPFS if it finds the x-ipfs-path
in any HTTP response headers; this also acts as a fallback for cases when an IPFS path is not present in the URL. Learn more.
Toggle redirects globally or per site
You can disable and re-enable local gateway redirects by several means:
- Suspend redirects globally in IPFS Companion's preferences
- Suspend redirects per site using the toggle under "Current tab" (illustrated below) or in IPFS Companion's preferences
- Add
x-ipfs-companion-no-redirect
to the URL itself as a hash (example) or query parameter (example)
Access frequently-used IPFS actions from your browser bar
IPFS Companion enables you to quickly and easily access common actions from your browser bar with just a few clicks:
- See how many peers you're connected with a glance at the cube icon in your browser bar
- Check your IPFS API and gateway status by clicking the cube icon to reveal the main menu
- Right-click images and other page assets to easily add them to IPFS (including the option to preserve file names)
- Choose the Import option in the main menu for quick drag-and-drop import from a browser tab
- Pin or unpin IPFS resources (via API) directly from the main menu
- Copy shareable public gateway links, IPFS content paths, or CIDs of IPFS resources directly from the main menu
- Launch the IPFS Web UI dashboard from the main menu with a single click
- Toggle gateway redirects or switch all IPFS Companion features on/off quickly and easily from the main menu (illustrations below)
Toggle gateway redirects on a per-website basis
You can toggle redirects (of any IPFS sub-resources) for an individual website under the Current Tab section of the main menu. If that site uses DNSLink, toggling off will restore the site's original URL, too.
Switch all IPFS Companion features on/off
To temporarily suspend all IPFS integrations (redirects, API status content scripts, protocol handlers, etc.), use the on/off button at the top of the IPFS Companion menu.
Try out experiments!
IPFS Companion ships with a variety of experimental features. Some are disabled by default, so be sure to check out IPFS Companion's Preferences to see them all.
- Make plaintext IPFS links clickable (demo)
- Re-route requests made via the following experimental protocols to an HTTP gateway (public or custom):
ipfs://$cid
ipns://$cid_or_fqdn
Install IPFS Companion
Latest stable release
Firefox | Firefox for Android | Chrome | Brave | Opera | Edge |
---|---|
Important! Make sure you have IPFS installed on your computer as well. Because IPFS Companion (in its standard configuration) talks to your computerâs local IPFS node to work its browser magic, youâll need to have IPFS running on your computer, too.
It's also possible to grab vendor-specific packages for each release,
but these builds are not signed, nor will automatically update. .zip
bundles are meant only to be manually loaded via chrome://extensions
(Chromium) or about:debugging
(Firefox) for smoke-testing.
Development
To work on IPFS Companion's code, you'll need to install it from source. Quick steps are below, but see the full developer notes for more detailed instructions and tips.
- Clone https://github.com/ipfs-shipyard/ipfs-companion.git
- Run this all-in-one dev build to install dependencies, build, and launch in the browser of your choice:
- Chromium
$ npm run dev-build chromium
- Firefox
$ npm run dev-build firefox # firefox:nightly works too!
- Chromium
Contribute
All are welcome to help make IPFS Companion even better!
- Check out the contribution guide for how to get started as a developer
- Open an issue
- Make sure you read and abide by the IPFS Code of Conduct
Release Process
The release process has been documented here.
Help & troubleshooting
Ask a question
The best place to ask about IPFS Companion (or IPFS in general!) is in the official IPFS Forums, where you can search past discussions for others who may have had the same questions, too. There's also an active #ipfs community on IRC.
Common troubleshooting steps
These frequently encountered troubleshooting situations may be helpful:
- Import via right-click does not work in Firefox: See this workaround.
- HTTP-to-HTTPS redirects fail when using Ghostery: Ghostery is known to toy with HTTP-to-HTTPS redirect, which in some setups breaks websites utilizing public gateways (more details). Until this is fixed upstream, a workaround is to whitelist affected sites.
- NoScript breaks IPFS Companion: By default, NoScript breaks IPFS Companion by blocking assets loaded from an IPFS gateway running on localhost. To fix this, extend the SYSTEM ruleset and prepend it with IPFS whitelist (feel free to modify this, but get familiar with ABE rule syntax first):
# Enable IPFS redirect to LOCAL
Site ^http://127.0.0.1:8080/(ipfs|ipns)*
Anonymize
# Prevent Internet sites from requesting LAN resources.
Site LOCAL
Accept from LOCAL
Deny
Privacy & license info
- IPFS Companion Privacy policy
- The IPFS logo belongs to the IPFS Project and is licensed under a CC-BY-SA 3.0 license
- is-ipfs, js-multihash, and other npm dependencies are under MIT license, unless stated otherwise
- IPFS Companion itself is released under CC0; to the extent possible under law, the author has waived all copyright and related or neighboring rights to this work, effectively placing it in the public domain
Top Related Projects
Reference implementation of the Filecoin protocol, written in Go
An IPFS implementation in Go
IPFS implementation in JavaScript
Pinset orchestration for IPFS
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot