Skip to content

Support chrome.sockets.* APIs #664

Closed
@lidel

Description

@lidel

About APIs

Chromium OS exposes chrome.sockets.* for its apps:

We can access those APIs in Brave by adding ipfs-companion (beta+stable) as blessed_extension in brave-core/../_api_features.json (suggested by @bbondy)

See also my notes on bringing IPFS to Brave in 2019: brave/brave-browser#819 (comment)

Potential use

Relevant libraries

Created for and used in webtorrent:

MVP: Exposing HTTP Gateway

Quick notes about first steps:

  1. Create Brave build that exposes chrome.sockets.* APIs to temporary extensions
  2. Detect js-ipfs is running in Brave and enable Gateway by providing a valid multiaddr instead of empty string
  3. Try building ipfs-companion/js-ipfs with chrome-net and chrome-ngram as replacements for Node APIs in browser contexts
  4. Start ipfs-companion in Brave, switch to embedded js-ipfs node
    • did it start and open Gateway on TCP port specified in step 2? is HTTP Gateway working as expected?
      • if yes, then we are lucky and this it! :)
      • if not, then we need to write additional code for exposing Gateway over chrome.sockets.*
  5. Continue in Embedded JS-IPFS in Brave (experiment) #716

cc #312

Metadata

Metadata

Assignees

Labels

P1High: Likely tackled by core team if no one steps uparea/braveIssues related to Brave Browser

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions