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

Commit

Permalink
feat: turn on delegate nodes by default (#3148)
Browse files Browse the repository at this point in the history
To help find content and peers on the network, turn on delegate nodes by default.

Disables delegate nodes while using the `test` config profile.
  • Loading branch information
achingbrain authored Jul 10, 2020
1 parent dfe15d7 commit 3fd2ca8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/ipfs/src/core/components/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const profiles = {
config.Addresses.API = defaultConfig.Addresses.API ? '/ip4/127.0.0.1/tcp/0' : ''
config.Addresses.Gateway = defaultConfig.Addresses.Gateway ? '/ip4/127.0.0.1/tcp/0' : ''
config.Addresses.Swarm = defaultConfig.Addresses.Swarm.length ? ['/ip4/127.0.0.1/tcp/0'] : []
config.Addresses.Delegates = []
config.Bootstrap = []
config.Discovery.MDNS.Enabled = false
config.Discovery.webRTCStar.Enabled = false
Expand All @@ -102,6 +103,7 @@ const profiles = {
config.Addresses.API = defaultConfig.Addresses.API
config.Addresses.Gateway = defaultConfig.Addresses.Gateway
config.Addresses.Swarm = defaultConfig.Addresses.Swarm
config.Addresses.Delegates = defaultConfig.Addresses.Delegates
config.Bootstrap = defaultConfig.Bootstrap
config.Discovery.MDNS.Enabled = defaultConfig.Discovery.MDNS.Enabled
config.Discovery.webRTCStar.Enabled = defaultConfig.Discovery.webRTCStar.Enabled
Expand Down
7 changes: 6 additions & 1 deletion packages/ipfs/src/core/runtime/config-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ module.exports = () => ({
],
API: '',
Gateway: '',
Delegates: []
Delegates: [
'/dns4/node0.delegate.ipfs.io/tcp/443/https',
'/dns4/node1.delegate.ipfs.io/tcp/443/https',
'/dns4/node2.delegate.ipfs.io/tcp/443/https',
'/dns4/node3.delegate.ipfs.io/tcp/443/https'
]
},
Discovery: {
MDNS: {
Expand Down
7 changes: 6 additions & 1 deletion packages/ipfs/src/core/runtime/config-nodejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ module.exports = () => ({
],
API: '/ip4/127.0.0.1/tcp/5002',
Gateway: '/ip4/127.0.0.1/tcp/9090',
Delegates: []
Delegates: [
'/dns4/node0.delegate.ipfs.io/tcp/443/https',
'/dns4/node1.delegate.ipfs.io/tcp/443/https',
'/dns4/node2.delegate.ipfs.io/tcp/443/https',
'/dns4/node3.delegate.ipfs.io/tcp/443/https'
]
},
Discovery: {
MDNS: {
Expand Down

0 comments on commit 3fd2ca8

Please sign in to comment.