Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit e54da1d

Browse files
committed
docs: fix broken links and make constructor docs more obvious
1 parent b4c021d commit e54da1d

File tree

5 files changed

+21
-38
lines changed

5 files changed

+21
-38
lines changed

docs/BROWSERS.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
JS IPFS is the implementation of IPFS protocol in JavaScript. It can run on any
44
evergreen browser, inside a service or web worker, browser extensions, Electron and in Node.js.
55

6-
**This document provides key information about running JS IPFS in the browser.
6+
**This document provides key information about running JS IPFS in the browser.
77
Save time and get familiar with common caveats and limitations of the browser context.**
88

99
## Limitations of the Browser Context
@@ -12,13 +12,13 @@ Save time and get familiar with common caveats and limitations of the browser co
1212

1313
This means JS IPFS running in the browser is limited to Web APIs available on a web page.
1414
There is no access to raw TCP sockets nor low level UDP, only WebSockets and WebRTC.
15-
15+
1616
- Key [Web APIs](https://developer.mozilla.org/en-US/docs/Web/API) require or are restricted by [Secure Context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) policies.
1717

1818
This means JS IPFS needs to run within Secure Context (HTTPS or localhost).
1919
JS IPFS running on HTTPS website requires Secure WebSockets (TLS) and won't work with unencrypted one.
2020
[Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) not being available at all.
21-
21+
2222
- [DHT](https://en.wikipedia.org/wiki/Distributed_hash_table) is not available in JS IPFS yet.
2323

2424
[We are working on it](https://github.com/ipfs/js-ipfs/pull/1994). For now, the discovery and connectivity to other peers is achieved with a mix of rendezvous and
@@ -29,7 +29,7 @@ Save time and get familiar with common caveats and limitations of the browser co
2929

3030
We provide a few additional components useful for running JS IPFS in the browser:
3131

32-
- [libp2p-websocket-star](https://github.com/libp2p/js-libp2p-websocket-star/) - incorporates both a transport and a discovery service that is facilitated by the custom rendezvous server available in the repo.
32+
- [libp2p-websocket-star](https://github.com/libp2p/js-libp2p-websocket-star/) - incorporates both a transport and a discovery service that is facilitated by the custom rendezvous server available in the repo.
3333
- Instructions on enabling `websocket-star` in js-ipfs config can be found [here](https://github.com/ipfs/js-ipfs#is-there-a-more-stable-alternative-to-webrtc-star-that-offers-a-similar-functionality).
3434
- Make sure to [run your own rendezvous server](https://github.com/libp2p/js-libp2p-websocket-star/#usage-1).
3535
- [libp2p-webrtc-star](https://github.com/libp2p/js-libp2p-webrtc-star) - incorporates both a transport and a discovery service that is facilitated by the custom rendezvous server available in the repo
@@ -45,12 +45,12 @@ You can find detailed information about running js-ipfs [here](https://github.co
4545
## Best Practices
4646

4747
- Configure nodes for using self-hosted `*-star` signaling and transport service. When in doubt, use WebSockets ones.
48-
- Run your own instance of `*-star` signaling service.
48+
- Run your own instance of `*-star` signaling service.
4949
The default ones are under high load and should be used only for tests and development.
5050
- Make sure content added to js-ipfs running in the browser is persisted/cached somewhere on regular IPFS daemon
5151
- Manually `pin` or preload CIDs of interest with `refs -r` beforehand.
52-
- Preload content on the fly using [preload](https://github.com/ipfs/js-ipfs#optionspreload) feature and/or
53-
configure [delegated routing](https://github.com/ipfs/js-ipfs#configuring-delegate-routers).
52+
- Preload content on the fly using [preload](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionspreload) feature and/or
53+
configure [delegated routing](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/DELEGATE_ROUTERS.md).
5454
- Avoid public instances in production environment. Make sure preload and delegate nodes used in config are self-hosted and under your control (expose a subset of go-ipfs APIs via reverse proxy such as Nginx).
5555

5656
## Code Examples

docs/IPFS.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

examples/exchange-files-in-browser/public/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function start () {
5252
Addresses: {
5353
Swarm: [
5454
// This is a public webrtc-star server
55-
// '/dns4/star-signal.cloud.ipfs.team/wss/p2p-webrtc-star'
55+
// '/dns4/star-signal.cloud.ipfs.team/tcp/443/wss/p2p-webrtc-star'
5656
'/ip4/127.0.0.1/tcp/13579/wss/p2p-webrtc-star'
5757
]
5858
},

packages/ipfs/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ We've come a long way, but this project is still in Alpha, lots of development i
5454
- [Browser CDN](#browser-cdn)
5555
- [Browser bundle](#browser-bundle)
5656
- [Documentation](#documentation)
57+
- [Getting started & constructor options](#getting-started--constructor-options)
5758
- [Core API](#core-api)
5859
- [How to run IPFS in various environments](#how-to-run-ipfs-in-various-environments)
59-
- [How to use IPFS in your application](#how-to-use-ipfs-in-your-application)
6060
- [Different topics in detail](#different-topics-in-detail)
6161
- [Questions?](#questions)
6262
- [Need help?](#need-help)
@@ -107,6 +107,10 @@ Learn how to bundle IPFS into your application with webpack, parceljs and browse
107107

108108
## Documentation
109109

110+
### Getting started & constructor options
111+
112+
* [docs/MODULE.md](./docs/MODULE.md)
113+
110114
### Core API
111115

112116
* [API Docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api)
@@ -117,10 +121,6 @@ Learn how to bundle IPFS into your application with webpack, parceljs and browse
117121
* [docs/DAEMON.md](./docs/DAEMON.md)
118122
* [docs/DOCKER.md](./docs/DOCKER.md)
119123

120-
### How to use IPFS in your application
121-
122-
* [docs/MODULE.md](./docs/MODULE.md)
123-
124124
### Different topics in detail
125125

126126
* [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md)

packages/ipfs/docs/DELEGATE_ROUTERS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Configuring Delegate Routers
22

3+
## What is it?
4+
5+
Delegate routers peform tasks on behalf of nodes that may be missing functionality, so for example they may search the DHT for peers or content providers on behalf of IPFS implementations that do not have a DHT.
6+
7+
The delegate node is started and the client of the delegate calls API methods using the IPFS HTTP API client.
8+
9+
## How do I do it?
10+
311
If you need to support Delegated Content and/or Peer Routing, you can enable it by specifying the multiaddrs of your delegate nodes in the config via `options.config.Addresses.Delegates`. If you need to run a delegate router we encourage you to run your own, with go-ipfs. You can see instructions for doing so in the [delegated routing example](https://github.com/libp2p/js-libp2p/tree/master/examples/delegated-routing).
412

513
If you are not able to run your own delegate router nodes, we currently have two nodes that support delegated routing. **Important**: As many people may be leveraging these nodes, performance may be affected, which is why we recommend running your own nodes in production.

0 commit comments

Comments
 (0)