Skip to content

Commit 295c3fc

Browse files
committed
feat(brave): peer discovery with ws-star
This should improve things until we have TCP transport, MulticastDNS and DHT
1 parent a0978b8 commit 295c3fc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

add-on/src/lib/ipfs-client/embedded-chromesockets.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ exports.init = function init (opts) {
4242

4343
const defaultOpts = JSON.parse(optionDefaults.ipfsNodeConfig)
4444

45-
// TODO: check if below is needed after js-ipfs is released with DHT disabled
4645
defaultOpts.libp2p = {
4746
config: {
4847
dht: {
48+
// TODO: check if below is needed after js-ipfs is released with DHT disabled
4949
enabled: false
5050
}
5151
}

add-on/src/lib/options.js

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ function buildDefaultIpfsNodeConfig () {
5454
// for people already running regular go-ipfs and js-ipfs on standard ports
5555
config.config.Addresses.API = '/ip4/127.0.0.1/tcp/5003'
5656
config.config.Addresses.Gateway = '/ip4/127.0.0.1/tcp/9091'
57+
// Until we have MulticastDNS+DNS, peer discovery is done over ws-star
58+
config.config.Addresses.Swarm.push('/dnsaddr/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star')
5759
/*
5860
(Sidenote on why we need API for Web UI)
5961
Gateway can run without API port,

0 commit comments

Comments
 (0)