update config documentation
vyzo committed
Apr 13, 2021 at 18:06 UTC
5a1593e87cb0fd466f34605b08edeba55fb47df0
1 file changed
+49
-18
docs/config.md
+49
-18
@@ -79,7 +79,7 @@ documented in `ipfs config profile --help`.
79
enabled block-level garbage collection), you plan on storing very little data in
80
your IPFS node, and disk usage is more critical than performance, consider using
81
flatfs.
82
- - This datastore uses up to several gigabytes of memory.
82
+ - This datastore uses up to several gigabytes of memory.
83
84
This profile may only be applied when first initializing the node.
85
@@ -218,6 +218,8 @@ does (e.g, `"1d2h4m40.01s"`).
218
- [`Swarm.Transports.Network.QUIC`](#swarmtransportsnetworkquic)
219
- [`Swarm.Transports.Network.Websocket`](#swarmtransportsnetworkwebsocket)
220
- [`Swarm.Transports.Network.Relay`](#swarmtransportsnetworkrelay)
221
+- [`DNS`](#dns)
222
+ - [`DNS.Resolvers`](#dnsresolvers)
223
224
## `Addresses`
225
@@ -608,7 +610,7 @@ Examples:
610
611
Array of paths that should be exposed on the hostname.
612
611
-Example:
613
+Example:
614
```json
615
{
616
"Gateway": {
@@ -692,7 +694,7 @@ If additional config is provided for those hostnames, it will be merged on top o
694
}
695
```
696
695
-It is also possible to remove a default by setting it to `null`.
697
+It is also possible to remove a default by setting it to `null`.
698
For example, to disable subdomain gateway on `localhost`
699
and make that hostname act the same as `127.0.0.1`:
700
@@ -713,14 +715,14 @@ Below is a list of the most common public gateway setups.
715
}
716
}'
717
```
716
- **Backward-compatible:** this feature enables automatic redirects from content paths to subdomains:
717
- `http://dweb.link/ipfs/{cid}` → `http://{cid}.ipfs.dweb.link`
718
- **X-Forwarded-Proto:** if you run go-ipfs behind a reverse proxy that provides TLS, make it add a `X-Forwarded-Proto: https` HTTP header to ensure users are redirected to `https://`, not `http://`. It will also ensure DNSLink names are inlined to fit in a single DNS label, so they work fine with a wildcart TLS cert ([details](https://github.com/ipfs/in-web-browsers/issues/169)). The NGINX directive is `proxy_set_header X-Forwarded-Proto "https";`.:
719
- `http://dweb.link/ipfs/{cid}` → `https://{cid}.ipfs.dweb.link`
720
- `http://dweb.link/ipns/your-dnslink.site.example.com` → `https://your--dnslink-site-example-com.ipfs.dweb.link`
718
+ **Backward-compatible:** this feature enables automatic redirects from content paths to subdomains:
719
+ `http://dweb.link/ipfs/{cid}` → `http://{cid}.ipfs.dweb.link`
720
+ **X-Forwarded-Proto:** if you run go-ipfs behind a reverse proxy that provides TLS, make it add a `X-Forwarded-Proto: https` HTTP header to ensure users are redirected to `https://`, not `http://`. It will also ensure DNSLink names are inlined to fit in a single DNS label, so they work fine with a wildcart TLS cert ([details](https://github.com/ipfs/in-web-browsers/issues/169)). The NGINX directive is `proxy_set_header X-Forwarded-Proto "https";`.:
721
+ `http://dweb.link/ipfs/{cid}` → `https://{cid}.ipfs.dweb.link`
722
+ `http://dweb.link/ipns/your-dnslink.site.example.com` → `https://your--dnslink-site-example-com.ipfs.dweb.link`
723
**X-Forwarded-Host:** we also support `X-Forwarded-Host: example.com` if you want to override subdomain gateway host from the original request:
724
`http://dweb.link/ipfs/{cid}` → `http://{cid}.ipfs.example.com`
723
-
725
+
726
727
* Public [path gateway](https://docs.ipfs.io/how-to/address-ipfs-on-web/#path-gateway) at `http://ipfs.io/ipfs/{cid}` (no Origin separation)
728
```console
@@ -738,7 +740,7 @@ Below is a list of the most common public gateway setups.
740
```
741
* Note that `NoDNSLink: false` is the default (it works out of the box unless set to `true` manually)
742
741
-* Hardened, site-specific [DNSLink gateway](https://docs.ipfs.io/how-to/address-ipfs-on-web/#dnslink-gateway).
743
+* Hardened, site-specific [DNSLink gateway](https://docs.ipfs.io/how-to/address-ipfs-on-web/#dnslink-gateway).
744
Disable fetching of remote data (`NoFetch: true`)
745
and resolving DNSLink at unknown hostnames (`NoDNSLink: true`).
746
Then, enable DNSLink gateway only for the specific hostname (for which data
@@ -898,7 +900,7 @@ Type: `bool`
900
901
###### `Pinning.RemoteServices: Policies.MFS.PinName`
902
901
-Optional name to use for a remote pin that represents the MFS root CID.
903
+Optional name to use for a remote pin that represents the MFS root CID.
904
When left empty, a default name will be generated.
905
906
Default: `"policy/{PeerID}/mfs"`, e.g. `"policy/12.../mfs"`
@@ -907,7 +909,7 @@ Type: `string`
909
910
###### `Pinning.RemoteServices: Policies.MFS.RepinInterval`
911
910
-Defines how often (at most) the pin request should be sent to the remote service.
912
+Defines how often (at most) the pin request should be sent to the remote service.
913
If left empty, the default interval will be used. Values lower than `1m` will be ignored.
914
915
Default: `"5m"`
@@ -927,7 +929,7 @@ Sets the default router used by pubsub to route messages to peers. This can be o
929
connected peers. This router is extremely inefficient but _very_ reliable.
930
* `"gossipsub"` - [gossipsub][] is a more advanced routing algorithm that will
931
build an overlay mesh from a subset of the links in the network.
930
-
932
+
933
Default: `"gossipsub"`
934
935
Type: `string` (one of `"floodsub"`, `"gossipsub"`, or `""` (apply default))
@@ -1035,7 +1037,7 @@ Tells reprovider what should be announced. Valid strategies are:
1037
- "all" - announce all stored data
1038
- "pinned" - only announce pinned data
1039
- "roots" - only announce directly pinned keys and root keys of recursive pins
1038
-
1040
+
1041
Default: all
1042
1043
Type: `string` (or unset for the default)
@@ -1070,7 +1072,7 @@ public internet (e.g., it's not behind a firewall).
1072
To force a specific DHT mode, client or server, set `Routing.Type` to
1073
`dhtclient` or `dhtserver` respectively. Please do not set this to `dhtserver`
1074
unless you're sure your node is reachable from the public network.
1073
-
1075
+
1076
**Example:**
1077
1078
```json
@@ -1079,8 +1081,8 @@ unless you're sure your node is reachable from the public network.
1081
"Type": "dhtclient"
1082
}
1083
}
1082
-```
1083
-
1084
+```
1085
+
1086
Default: dht
1087
1088
Type: `string` (or unset for the default)
@@ -1294,7 +1296,7 @@ Type: `flag`
1296
1297
Listen Addresses:
1298
* /ip4/0.0.0.0/tcp/4001 (default)
1297
-* /ip6/::/tcp/4001 (default)
1299
+* /ip6/::/tcp/4001 (default)
1300
1301
#### `Swarm.Transports.Network.Websocket`
1302
@@ -1423,3 +1425,32 @@ other IPFS and libp2p implementations. Unlike Yamux:
1425
Default: `200`
1426
1427
Type: `priority`
1428
+
1429
+## `DNS`
1430
+
1431
+Options for configuring DNS resolution.
1432
+
1433
+## `DNS.Resolvers`
1434
+
1435
+Map of FQDNs to resolver URLs.
1436
+
1437
+This option allows you to specify domain-specific resolvers for custom DNS resolution.
1438
+Currently only https URLs are supported, using DNS over HTTPS.
1439
+
1440
+The default resolver can be overriden by specifying a URL for `.`.
1441
+
1442
+Example:
1443
+```
1444
+ "DNS": {
1445
+ "Resolvers": {
1446
+ "eth.": "https://different-ens.example.net/dns-query",
1447
+ "crypto.": "https://unstoppablesomething.example.com/dns-query",
1448
+ "libre.": "https://ns1.iriseden.fr/dns-query",
1449
+ ".": "https://doh-ch.blahdns.com:4443/dns-query"
1450
+ }
1451
+ }
1452
+```
1453
+
1454
+Default: `null`
1455
+
1456
+Type: `object[string -> string]`