You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/BROWSERS.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
JS IPFS is the implementation of IPFS protocol in JavaScript. It can run on any
4
4
evergreen browser, inside a service or web worker, browser extensions, Electron and in Node.js.
5
5
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.
7
7
Save time and get familiar with common caveats and limitations of the browser context.**
8
8
9
9
## Limitations of the Browser Context
@@ -12,13 +12,13 @@ Save time and get familiar with common caveats and limitations of the browser co
12
12
13
13
This means JS IPFS running in the browser is limited to Web APIs available on a web page.
14
14
There is no access to raw TCP sockets nor low level UDP, only WebSockets and WebRTC.
15
-
15
+
16
16
- 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.
17
17
18
18
This means JS IPFS needs to run within Secure Context (HTTPS or localhost).
19
19
JS IPFS running on HTTPS website requires Secure WebSockets (TLS) and won't work with unencrypted one.
20
20
[Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) not being available at all.
21
-
21
+
22
22
-[DHT](https://en.wikipedia.org/wiki/Distributed_hash_table) is not available in JS IPFS yet.
23
23
24
24
[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
29
29
30
30
We provide a few additional components useful for running JS IPFS in the browser:
31
31
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.
33
33
- 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).
34
34
- Make sure to [run your own rendezvous server](https://github.com/libp2p/js-libp2p-websocket-star/#usage-1).
35
35
-[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
45
45
## Best Practices
46
46
47
47
- 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.
49
49
The default ones are under high load and should be used only for tests and development.
50
50
- Make sure content added to js-ipfs running in the browser is persisted/cached somewhere on regular IPFS daemon
51
51
- 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
- Preload content on the fly using [preload](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionspreload) feature and/or
- 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).
Copy file name to clipboardExpand all lines: packages/ipfs/docs/DELEGATE_ROUTERS.md
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,13 @@
1
1
# Configuring Delegate Routers
2
2
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
+
3
11
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).
4
12
5
13
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