go-ipfs-config: core: make announced swarm addresses configurable
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
Lars Gierth committed
May 31, 2017 at 02:49 UTC
c875a44a8d6a71009f37da22a29e75175dae1742
2 files changed
+9
-5
config/addresses.go
+5
-3
@@ -2,7 +2,9 @@ package config
2
3
// Addresses stores the (string) multiaddr addresses for the node.
4
type Addresses struct {
5
- Swarm []string // addresses for the swarm network
6
- API string // address for the local API (RPC)
7
- Gateway string // address to listen on for IPFS HTTP object gateway
5
+ Swarm []string // addresses for the swarm to listen on
6
+ Announce []string // swarm addresses to announce to the network
7
+ NoAnnounce []string // swarm addresses not to announce to the network
8
+ API string // address for the local API (RPC)
9
+ Gateway string // address to listen on for IPFS HTTP object gateway
10
}
config/init.go
+4
-2
@@ -36,8 +36,10 @@ func Init(out io.Writer, nBitsForKeypair int) (*Config, error) {
36
// "/ip4/0.0.0.0/udp/4002/utp", // disabled for now.
37
"/ip6/::/tcp/4001",
38
},
39
- API: "/ip4/127.0.0.1/tcp/5001",
40
- Gateway: "/ip4/127.0.0.1/tcp/8080",
39
+ Announce: []string{},
40
+ NoAnnounce: []string{},
41
+ API: "/ip4/127.0.0.1/tcp/5001",
42
+ Gateway: "/ip4/127.0.0.1/tcp/8080",
43
},
44
45
Datastore: datastore,