Skip to content
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

Update wikitemplate-IPFS.md #339

Merged
merged 4 commits into from
Oct 7, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 69 additions & 34 deletions wikitemplate-IPFS.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@

Note: For the other types, downloading from the IPFS webui (My Node) and ensuring they still play in a media player, is enough.

### `Sharing a local file using IPFS (without keys)`
### `Sharing a local file using IPFS (without IPNS keys)`

- [ ] Verify the IPFS item is available in the main app menu. Go to `IPFS -> Share Local File Using IPFS` select and import any local file.
- [ ] Verify the file is downloaded and imported successfully,
- [ ] Verify the import folder is opened upon successful completion.
- [ ] Verify the shareable link is copied to the clipboard, and opens when pasting into a new tab.
- [ ] Verify the shareable link starting with `https://dweb.link/ipfs/` is copied to the clipboard, and opens when pasting into a new tab.
- [ ] Share the following filetypes:
- [ ] .avi
- [ ] .txt
Expand All @@ -87,68 +87,104 @@
- [ ] .ogg
- [ ] .wav
- [ ] .webm

### `Sharing a local folder using IPFS (without keys)`
### `Sharing a local folder using IPFS (without IPNS keys)`

- [ ] Go to `IPFS -> share Local Folder Using IPFS`, and select and import any local folder.
- [ ] Verify the whole folder is downloaded and imported successfully.
- [ ] Verify the import folder opens upon successful import.
- [ ] Verify the shareable link is copied to the clipboard, and opens when pasting into a new tab.

## "Open using IPFS" badge in address bar

## BAdge shown only when IPFS support is enabled
lidel marked this conversation as resolved.
Show resolved Hide resolved

- [ ] Verify, on a new profile, you can load `https://en.wikipedia-on-ipfs.org`, switch `Method to resolve IPFS resources` to either `Gateway` or `Local node` in `brave://settings/ipfs`, and then see an `Open using IPFS` badge/icon in the URL bar.


### Badge on a public gateway

- [ ] Verify that loading `https://dweb.link/ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/wiki/Mars.html` redirects you seamlessly to `https://bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa.ipfs.dweb.link/wiki/Mars.html`, and there's an `Open using IPFS` badge/button in the URL bar. Confirm that clicking `Open using IPFS` goes to `ipfs://bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa/wiki/Mars.html`.
- [ ] Verify that loading `https://ipfs.io/ipns/libp2p.io/` shows an `Open using IPFS` button in the URL bar, and clicking it redirects to `ipns://libp2p.io/`. Confirm it resolves and loads.

### Badge on DNSlink websites

- [ ] Verify clicking on `Open using IPFS` on `https://en.wikipedia-on-ipfs.org/wiki/Asia/#Economy` loads `ipns://en.wikipedia-on-ipfs.org/wiki/Asia/#Economy` in a new tab.
- [ ] Verify clicking on `Open using IPFS` on `https://blog.ipfs.io/24-uncensorable-wikipedia` loads `ipns://blog.ipfs.io/24-uncensorable-wikipedia/` in a new tab.

## Automatic redirects to IPFS

### Redirect via configured IPFS gateway
- [ ] Via `brave://settings/ipfs`, set `Redirect IPFS resources to the configured IPFS gateway` to `On`. Load `https://en.wikipedia-on-ipfs.org/` and confirm it redirects to
`http://en.wikipedia-on-ipfs.org.ipns.localhost:48081/wiki/`.
- [ ] Via `brave://settings/ipfs`, set `Redirect IPFS resources to the configured IPFS gateway` to `On`. Load `https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR` and confirm it redirects to
`ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi`.

### Redirect via DNSLink
- [ ] Verify with `Automatically redirect to IPFS pages via DNSLink when possible` set to `On`, visiting `https://en.wikipedia-on-ipfs.org/wiki` redirects to `ipns://en.wikipedia-on-ipfs.org/wiki`.

### Interstitial page (`Ask` mode in `brave://settings/ipfs`)
- [ ] Verify when loading an IPFS/IPNS resource it triggers an interstitial page with the choice to install and use via local node or a public gateway.
- [ ] Load `ipns://brantly.eth` while using `Local node` for the resolver, and confirm there's a clickable info badge to the left of the URL, which says `This content was loaded over the IPFS protocol.`

## DNSLink
- [ ] Load `ipns://brantly.eth` while using `Local node` for the resolver, and confirm there's a clickable info badge "IPFS" to the left of the URL, with on click pop-up that says `This content was loaded over the IPFS protocol.`

- [ ] Verify that loading `https://dweb.link/ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/wiki/Mars.html` redirects you seamlessly to `https://bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa.ipfs.dweb.link/wiki/Mars.html`, and there's an `Open using IPFS` badge/button in the URL bar. Confirm that clicking `Open using IPFS` goes to `ipfs://bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa/wiki/Mars.html`.
- [ ] Verify that loading `https://ipfs.io/ipns/libp2p.io/` shows an `Open using IPFS` button in the URL bar, and clicking it redirects to `ipns://libp2p.io/`. Confirm it resolves and loads.

## IPFS Companion

- [ ] Verify that toggling `IPFS Companion` to `On` via `brave://settings/ipfs` prompts you to install the extension. After clicking `Add extension`, confirm you get a notification that IPFS Companion was added to Brave, and are then taken to the `Set your IPFS preference` interstitial page.
- [ ] Verify that clicking on the puzzle-piece icon on the browser toolbar, then `IPFS Companion`, will load a popup. Click on the gears (settings) icon and confirm it loads the `Companion Preferences` page.
- [ ] Verify that clicking on the puzzle-piece icon on the browser toolbar, then `IPFS Companion`, will load a popup.
- [ ] Click on the gears (settings) icon and confirm it loads the `Companion Preferences` page.
- [ ] Click on `My Node` and confirm it opens the same ipfs-webui interface as `My Node` at `brave://ipfs-internals`

## IPFS URLs

- [ ] Ensure each of the following IPFS URLs load over both `Gateway` and `Local node` modes:
- [ ] `ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html`
- [ ] `ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html#Life`
- [ ] `ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi/`
- [ ] `ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/Tokyo_National_Museum.html`
- [ ] `ipfs:QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme`

## IPNS URLs

- [ ] Ensure each of the following IPNS URLs load over both `Gateway` and `Local node` modes:
- [ ] `ipns://brantly.eth`
- [ ] `ipns://en.wikipedia-on-ipfs.org`
- [ ] `ipns://libp2p.io/`
- [ ] `ipns://en.wikipedia-on-ipfs.org/wiki/Tokyo`
- [ ] `ipns://ipfs.io`
- [ ] `ipns://en.wikipedia-on-ipfs.org/wiki/Tokyo#Islands`
- [ ] `ipns://docs.ipfs.io`
- [ ] `ipns://brantly.eth` (ENS)
- [ ] `ipns://brave.crypto` (Unstoppable Domains)

## Gateway
## Gateway choice

## The interstitial page

- [ ] Verify, on a new profile, you can change the IPFS public gateway address to `https://cloudflare-ipfs.com/` via `Settings -> IPFS -> Change`.
- [ ] Verify visiting `ipns://en.wikipedia-on-ipfs` loads the interstitial page.
- [ ] Verify selecting `Use a public gateway` loads `https://cloudflare-ipfs.com/ipns/en.wikipedia-on-ipfs.org/wiki/`.
- [ ] Verify, on a new profile, you can load `https://en.wikipedia-on-ipfs.org`, switch `Method to resolve IPFS resources` to either `Gateway` or `Local node` in `brave://settings/ipfs`, and then see an `Open using IPFS` badge/icon in the URL bar.
- [ ] Verify clicking on `Open using IPFS` on `https://blog.ipfs.io/24-uncensorable-wikipedia` loads `ipfs://bafybeiaieqdmhtnehaau7kqoj2lmdfqc7juk34cjyb7dxr35vahp22bquu/24-uncensorable-wikipedia/`.
- [ ] Verify selecting `Use a public gateway` loads `https://cf-ipfs.com/ipns/en.wikipedia-on-ipfs.org/wiki/` which then redirect to unique origin at `https://en-wikipedia--on--ipfs-org.ipns.cf-ipfs.com/wiki/`
- [ ] Verify selecting `Use local node` loads `ipns://en.wikipedia-on-ipfs.org/wiki/`

### Public Path gateway

- [ ] Verify, on a new profile, you can't change the IPFS public gateway address to `https://cloudflare-ipfs.com/` via `Settings -> IPFS -> IPFS public gateway address
-> Change`.
- [ ] An error informing that only gateways with proper Origin isolation can be used in browser context is displayed.
lidel marked this conversation as resolved.
Show resolved Hide resolved

### Public Subdomain Gateway

- [ ] Verify, on a new profile, you can change the IPFS public gateway address to `https://cf-ipfs.com/` via `Settings -> IPFS -> IPFS public gateway address
-> Change`.
- [ ] Verify opening `ipns://en.wikipedia-on-ipfs.org/wiki/` and selecting `Use a public gateway` loads `https://cf-ipfs.com/ipns/en.wikipedia-on-ipfs.org/wiki/` which then redirect to unique origin at `https://en-wikipedia--on--ipfs-org.ipns.cf-ipfs.com/wiki/` Verify loads `https://cf-ipfs.com/ipns/en.wikipedia-on-ipfs.org/wiki/` which then redirect to unique origin at `https://en-wikipedia--on--ipfs-org.ipns.cf-ipfs.com/wiki/`

### Protocol system handler/OS integration

#### ipfs://

- [ ] Verify (`Windows`) that pressing `Win+R`, typing `open ipfs://bafkreigcnxudvpojjfwncmauociy5q46zsq46oe66cxbyzie3imabuoege`, and pressing `Enter` opens Brave and loads an HTML page with the word `PASS`.
- [ ] Verify (`macOS`): opening Terminal, and typing `open ipfs://bafkreigcnxudvpojjfwncmauociy5q46zsq46oe66cxbyzie3imabuoege`, and pressing `Enter` opens Brave and loads an HTML page with the word `PASS`.
- [ ] Verify (`Linux`) that opening a shell and typing `xdg-open ipfs://bafkreigcnxudvpojjfwncmauociy5q46zsq46oe66cxbyzie3imabuoege` and pressing `Enter` opens Brave and loads an HTML page with the word `PASS`.

#### ipns://

- [ ] Verify (`Windows`) that pressing `Win+R`, typing `open ipns://en.wikipedia-on-ipfs.org/wiki/Tokyo#Islands`, and pressing `Enter` opens Brave and loads an HTML page scrolled to the header `Islands`.
- [ ] Verify (`macOS`): opening Terminal, and typing `open ipns://en.wikipedia-on-ipfs.org/wiki/Tokyo#Islands`, and pressing `Enter` opens Brave and loads an HTML page scrolled to the header `Islands`.
- [ ] Verify (`Linux`) that opening a shell and typing `xdg-open ipns://en.wikipedia-on-ipfs.org/wiki/Tokyo#Islands`, and pressing `Enter` opens Brave and loads an HTML page scrolled to the header `Islands`.


## Peers

- [ ] Prerequisites: local node launched and local gateway configured on two machines, locally networked (LAN, can be over Wi-Fi).
Expand All @@ -158,6 +194,7 @@
- [ ] Verify when you go to `brave://settings/ipfs/peers` and click on the `Add` button, it prompts you to enter a new peer-connection string. Confirm that entering an incorrect string yields `This name is not valid` upon clicking `Submit`. (Acceptable ones are only CIDs or something like `**/p2p/**` format.)
- [ ] Verify if a peer is added and node is started, it proposes to restart node to apply changes.
- [ ] Verify the local node is restarted by clicking `Restart` button; happen it shows error message and suggests to see more on diagnostic page.
- [ ] Verify that `Peering.Peers` section of IPFS node config file got updated (either via `My Node → Settings → IPFS Config` or by manually inspecting `brave_ipfs/config` file).

### `Removing`

Expand All @@ -167,30 +204,26 @@

- [ ] Prerequisites: local node launched and local gateway configured. Go to `Settings -> IPFS`, there should be an available `Set up your IPNS keys` option, which opens `brave://settings/ipfs/keys`

### `Sharing a local file using an IPFS key`
### `Sharing a local file using an IPNS key`

- [ ] Verify you're able to share a local file via `IPFS > Share local file using IPFS`.
- [ ] Verify you're able to share a local file via `IPFS -> Share local file using IPNS -> self`.
lidel marked this conversation as resolved.
Show resolved Hide resolved
- [ ] Verify once the file is imported, the import folder is opened and the file can be downloaded.
- [ ] Once the import is successful, verify a shareable link is copied to the clipboard by opening a new tab and pasting from the context menu or `CTRL+V`.
- [ ] Verify you see the IPFS key (e.g. `k51qzi5uqu5dgxhiv8w8cdvmgdhbvy3t9gn4jwpwwro18fots0xtdabpcxxzwc`) before the `?filename=filename.ext` from the copied text.
- [ ] Once the import is successful, verify a shareable link starting with `https://dweb.link/ipns/` is copied to the clipboard by opening a new tab and pasting from the context menu or `CTRL+V`.
- [ ] Verify you see the IPNS key (e.g. `k51q...`) before the `?filename=filename.ext` from the copied text.

### `Sharing a local folder using an IPFS key`
### `Sharing a local folder using an IPNS key`

- [ ] Verify you're able to share a local file via `IPFS > Share local folder using IPFS`.
- [ ] Verify you're able to share a local file via `IPFS > Share local folder using IPNS -> self`.
- [ ] Verify once the file is imported, the import folder is opened and the file can be downloaded.
- [ ] Once the import is successful, verify a shareable link is copied to clipboard by opening a new tab and pasting from context menu or `CTRL+V`.
- [ ] Verify you see the IPFS key (e.g. `k51qzi5uqu5dgxhiv8w8cdvmgdhbvy3t9gn4jwpwwro18fots0xtdabpcxxzwc`) before the `?filename=filename.ext` from the copied text.
- [ ] Once the import is successful, verify a shareable link starting with `https://dweb.link/ipns/` is copied to clipboard by opening a new tab and pasting from context menu or `CTRL+V`.
- [ ] Verify you see the IPNS key (e.g. `k51q...`) before the `?filename=filename.ext` from the copied text.

### `Importing keys`

- [ ] Verify adding a new key by clicking on the `Import` button and choosing an existing key file to import.
- [ ] Verify imported key is available with entered name; verify entering `self` will yield `This name cannot be used`.
- [ ] Verify you cannot import the same key twice.

### `Pinning content with IPNS key`

- [ ] Verify keys are available in all import menus in order to pin content by selected key. the import link should contain the selected key.

### `Add/Remove/Rotate keys`

- [ ] Verify when you click `Add`, it prompts for key name and generates a new key.
Expand All @@ -210,6 +243,8 @@
- [ ] Verify the setting is enabled by default.
- [ ] Verify disable/enable setting is retained between browser launch/restarts.
- [ ] Verify setting state is retained during upgrade.
- [ ] Verify you can't change the IPFS public gateway address to `https://cloudflare-ipfs.com/` (An error informing that only gateways with proper Origin isolation can be used in browser context is displayed)
- [ ] Verify you you can change the IPFS public gateway address to `https://cf-ipfs.com/` (provides origin isolation)
lidel marked this conversation as resolved.
Show resolved Hide resolved

### `IPFS/IPNS URI`

Expand Down