mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 06:24:24 +01:00
added urls tests and corrected outdated urls (#78)
* added urls tests and corrected outdated urls * removed outdated autobase example link * change successful test status from <=300 to < 300 * removed index.test.cjs * fixed test status code --------- Co-authored-by: rafapaezbas <rafa@holepunch.com>
This commit is contained in:
@@ -254,8 +254,6 @@ await base.view.update()
|
||||
console.log(base.view.length)
|
||||
```
|
||||
|
||||
More sophisticated indexing might require multiple appends per input node, or reading from the view during `apply` -- both are perfectly valid. The [multiwriter Hyperbee example](https://github.com/holepunchto/autobase/blob/master/examples/autobee-simple.js) shows how this `apply` pattern can be used to build Hypercore-based indexing data structures using this approach.
|
||||
|
||||
#### View Creation
|
||||
|
||||
#### **`base.start({ apply, unwrap } = {})`**
|
||||
|
||||
@@ -465,7 +465,7 @@ Creates a replication stream. We should pipe this to another Hypercore instance.
|
||||
|
||||
The `isInitiator` argument is a boolean indicating whether a peer is the initiator of the connection (ie the client) or the passive peer waiting for connections (i.e., the server).
|
||||
|
||||
> If a P2P swarm like Hyperswarm is being used, whether a peer is an initiator can be determined by checking if the swarm connection is a client socket or a server socket. In Hyperswarm, a user can check that using the [client property on the peer details object](https://github.com/hyperswarm/hyperswarm#swarmonconnection-socket-details--).
|
||||
> If a P2P swarm like Hyperswarm is being used, whether a peer is an initiator can be determined by checking if the swarm connection is a client socket or a server socket. In Hyperswarm, a user can check that using the [client property on the peer details object](https://github.com/holepunchto/hyperswarm#swarmonconnection-socket-details).
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# HyperDHT
|
||||
|
||||
The DHT powering Hyperswarm and built on top of [dht-rpc](https://github.com/mafintosh/dht-rpc). The HyperDHT uses a series of holepunching techniques to ensure connectivity works on most networks and is mainly used to facilitate finding and connecting to peers using end-to-end encrypted Noise streams.
|
||||
The DHT powering Hyperswarm and built on top of [dht-rpc](https://github.com/holepunchto/dht-rpc). The HyperDHT uses a series of holepunching techniques to ensure connectivity works on most networks and is mainly used to facilitate finding and connecting to peers using end-to-end encrypted Noise streams.
|
||||
|
||||
In the HyperDHT, peers are identified by a public key, not by an IP address. A public key can be connected regardless of where the peers are located, even if they move between different networks.
|
||||
|
||||
@@ -68,7 +68,7 @@ Create a new DHT node.
|
||||
| **`bootstrap`** | overwrite the default bootstrap servers, just need to be an array of any known DHT node(s) | Array | `['node1.hyperdht.org:49737', 'node2.hyperdht.org:49737', 'node3.hyperdht.org:49737']` |
|
||||
| **`keyPair`** | optionally pass the public key and secret key as a key pair to use for server.listen and connect | Object | `null` |
|
||||
|
||||
See [dht-rpc](https://github.com/mafintosh/dht-rpc) for more options as HyperDHT inherits from that.
|
||||
See [dht-rpc](https://github.com/holepunchto/dht-rpc) for more options as HyperDHT inherits from that.
|
||||
|
||||
> ℹ️ The default bootstrap servers are publicly served on behalf of the commons. To run a fully isolated DHT, start one or more DHT nodes with an empty bootstrap array (`new DHT({bootstrap:[]})`) and then use the addresses of those nodes as the `bootstrap` option in all other DHT nodes. At least one persistent node is needed for the network to be completely operational.
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Hyperswarm offers a simple interface to abstract away the complexities of underl
|
||||
Notable features include:
|
||||
|
||||
* An improved UDP holepunching algorithm that uses arbitrary DHT nodes (optionally selected by the connecting peers) to proxy necessary metadata while being maximally privacy-preserving.
|
||||
* A custom-built transport protocol, [UDX](https://github.com/hyperswarm/libudx), that takes advantage of the holepunching algorithm to avoid unnecessary overhead (it doesn't include handshaking since holepunching takes care of that, for example). It's blazing fast.
|
||||
* A custom-built transport protocol, [UDX](https://github.com/holepunchto/libudx), that takes advantage of the holepunching algorithm to avoid unnecessary overhead (it doesn't include handshaking since holepunching takes care of that, for example). It's blazing fast.
|
||||
* A simplified DHT API that closely resembles NodeJS's `net` module, but using public keys instead of IP addresses.
|
||||
|
||||
> [GitHub (Hyperswarm)](https://github.com/hyperswarm/hyperswarm)
|
||||
> [GitHub (Hyperswarm)](https://github.com/holepunchto/hyperswarm)
|
||||
|
||||
* [Hyperswarm](../building-blocks/hyperswarm.md)
|
||||
* [Create a new instance](hyperswarm.md#installation)
|
||||
@@ -225,4 +225,4 @@ Stops discovering peers for the given topic.
|
||||
|
||||
> If a topic was previously joined in server mode, `leave` will stop announcing the topic on the DHT.
|
||||
>
|
||||
>If a topic was previously joined in client mode, `leave` will stop searching for servers announcing the topic.
|
||||
>If a topic was previously joined in client mode, `leave` will stop searching for servers announcing the topic.
|
||||
|
||||
Reference in New Issue
Block a user