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

Commit ac9134e

Browse files
committed
chore: add keychain and update table of contents
1 parent a85580c commit ac9134e

File tree

1 file changed

+60
-39
lines changed

1 file changed

+60
-39
lines changed

doc/config.md

Lines changed: 60 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,34 @@ The js-ipfs config file is a JSON document located in the root directory of the
55
## Table of Contents
66

77
- [`Addresses`](#addresses)
8+
- [`API`](#api)
9+
- [`Delegates`](#delegates)
10+
- [`Gateway`](#gateway)
11+
- [`Swarm`](#swarm)
812
- [`Bootstrap`](#bootstrap)
913
- [`Datastore`](#datastore)
14+
- [`Spec`](#spec)
1015
- [`Discovery`](#discovery)
16+
- [`MDNS`](#mdns)
17+
- [`webRTCStar`](#webrtcstar)
1118
- [`Identity`](#identity)
19+
- [`PeerID`](#peerid)
20+
- [`PrivKey`](#privkey)
1221
- [`Keychain`](#keychain)
1322
- [`Swarm`](#swarm)
14-
23+
- [`ConnMgr`](#connmgr)
1524

1625
## `Addresses`
1726
Contains information about various listener addresses to be used by this node.
1827

19-
- `API`
28+
#### - API
2029
The IPFS daemon exposes an HTTP API that allows to control the node and run the same commands as you can do from the command line. It is defined on the [HTTP API Spec](https://docs.ipfs.io/reference/api/http).
2130

2231
[Multiaddr](https://github.com/multiformats/multiaddr/) or array of [Multiaddr](https://github.com/multiformats/multiaddr/) describing the address(es) to serve the HTTP API on.
2332

2433
Default: `/ip4/127.0.0.1/tcp/5002`
2534

26-
- `Delegates`
35+
#### Delegates
2736
Delegate peers are used to find peers and retrieve content from the network on your behalf.
2837

2938
Array of [Multiaddr](https://github.com/multiformats/multiaddr/) describing which addresses to use as delegate nodes, in order to create a delegate routers.
@@ -33,14 +42,14 @@ Contains information about various listener addresses to be used by this node.
3342
[]
3443
```
3544

36-
- `Gateway`
45+
#### Gateway
3746
A gateway is exposed by the IPFS daemon, which allows an easy way to access content from IPFS, using an IPFS path.
3847

3948
[Multiaddr](https://github.com/multiformats/multiaddr/) or array of [Multiaddr](https://github.com/multiformats/multiaddr/) describing the address(es) to serve the gateway on.
4049

4150
Default: `/ip4/127.0.0.1/tcp/9090`
4251

43-
- `Swarm`
52+
#### Swarm
4453
Array of [Multiaddr](https://github.com/multiformats/multiaddr/) describing which addresses to listen on for p2p swarm connections.
4554

4655
Default:
@@ -59,40 +68,40 @@ initiate a connection to the network.
5968
Contains information related to the construction and operation of the on-disk
6069
storage system.
6170

62-
- `Spec`
63-
Spec defines the structure of the IPFS datastore. It is a composable structure, where each datastore is represented by a JSON object. Datastores can wrap other datastores to provide extra functionality (e.g. metrics, logging, or caching).
71+
#### Spec
72+
Spec defines the structure of the IPFS datastore. It is a composable structure, where each datastore is represented by a JSON object. Datastores can wrap other datastores to provide extra functionality (e.g. metrics, logging, or caching).
6473

65-
This can be changed manually, however, if you make any changes that require a different on-disk structure, you will need to run the [ipfs-ds-convert tool](https://github.com/ipfs/ipfs-ds-convert) to migrate data into the new structures.
74+
This can be changed manually, however, if you make any changes that require a different on-disk structure, you will need to run the [ipfs-ds-convert tool](https://github.com/ipfs/ipfs-ds-convert) to migrate data into the new structures.
6675

67-
Default:
68-
```
76+
Default:
77+
```json
78+
{
79+
"mounts": [
80+
{
81+
"child": {
82+
"path": "blocks",
83+
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
84+
"sync": true,
85+
"type": "flatfs"
86+
},
87+
"mountpoint": "/blocks",
88+
"prefix": "flatfs.datastore",
89+
"type": "measure"
90+
},
6991
{
70-
"mounts": [
71-
{
72-
"child": {
73-
"path": "blocks",
74-
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
75-
"sync": true,
76-
"type": "flatfs"
77-
},
78-
"mountpoint": "/blocks",
79-
"prefix": "flatfs.datastore",
80-
"type": "measure"
92+
"child": {
93+
"compression": "none",
94+
"path": "datastore",
95+
"type": "levelds"
8196
},
82-
{
83-
"child": {
84-
"compression": "none",
85-
"path": "datastore",
86-
"type": "levelds"
87-
},
88-
"mountpoint": "/",
89-
"prefix": "leveldb.datastore",
90-
"type": "measure"
91-
}
92-
],
93-
"type": "mount"
97+
"mountpoint": "/",
98+
"prefix": "leveldb.datastore",
99+
"type": "measure"
94100
}
95-
```
101+
],
102+
"type": "mount"
103+
}
104+
```
96105

97106
## `Discovery`
98107
Contains options for configuring IPFS node discovery mechanisms.
@@ -124,15 +133,28 @@ Contains options for configuring IPFS node discovery mechanisms.
124133

125134
## `Identity`
126135

127-
- `PeerID`
128-
The unique PKI identity label for this configs peer. Set on init and never read, its merely here for convenience. IPFS will always generate the peerID from its keypair at runtime.
136+
### `PeerID`
137+
The unique PKI identity label for this configs peer. Set on init and never read, its merely here for convenience. IPFS will always generate the peerID from its keypair at runtime.
129138

130-
- `PrivKey`
131-
The base64 encoded protobuf describing (and containing) the nodes private key.
139+
### `PrivKey`
140+
The base64 encoded protobuf describing (and containing) the nodes private key.
132141

133142
## `Keychain`
143+
We can customize the key management and criptographically protected messages by changing the Keychain options. Those options are used for generating the derived encryption key (`DEK`). The `DEK` object, along with the passPhrase, is the input to a PBKDF2 function.
134144

145+
Default:
146+
```json
147+
{
148+
"dek": {
149+
"keyLength": 512 / 8,
150+
"iterationCount": 1000,
151+
"salt": "at least 16 characters long",
152+
"hash": "sha2-512"
153+
}
154+
}
155+
```
135156

157+
You can check the [parameter choice for pbkdf2/](https://cryptosense.com/parameter-choice-for-pbkdf2/) for more information.
136158

137159
## `Swarm`
138160

@@ -160,7 +182,6 @@ The "basic" connection manager tries to keep between `LowWater` and `HighWater`
160182

161183
**Example:**
162184

163-
164185
```json
165186
{
166187
"Swarm": {

0 commit comments

Comments
 (0)