go-ipfs-config: feat: add Addresses.AppendAnnounce (#135)
Jorropo committed
Nov 23, 2021 at 19:09 UTC
a6008f0e36b7a70cb038a069d3e541a133e02e77
2 files changed
+11
-9
config/addresses.go
+6
-5
@@ -2,9 +2,10 @@ package config
2
3
// Addresses stores the (string) multiaddr addresses for the node.
4
type Addresses struct {
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 Strings // address for the local API (RPC)
9
- Gateway Strings // 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, if len > 0 replaces auto detected addresses
7
+ AppendAnnounce []string // similar to Announce but doesn't overwride auto detected addresses, they are just appended
8
+ NoAnnounce []string // swarm addresses not to announce to the network
9
+ API Strings // address for the local API (RPC)
10
+ Gateway Strings // address to listen on for IPFS HTTP object gateway
11
}
config/init.go
+5
-4
@@ -121,10 +121,11 @@ func addressesConfig() Addresses {
121
"/ip4/0.0.0.0/udp/4001/quic",
122
"/ip6/::/udp/4001/quic",
123
},
124
- Announce: []string{},
125
- NoAnnounce: []string{},
126
- API: Strings{"/ip4/127.0.0.1/tcp/5001"},
127
- Gateway: Strings{"/ip4/127.0.0.1/tcp/8080"},
124
+ Announce: []string{},
125
+ AppendAnnounce: []string{},
126
+ NoAnnounce: []string{},
127
+ API: Strings{"/ip4/127.0.0.1/tcp/5001"},
128
+ Gateway: Strings{"/ip4/127.0.0.1/tcp/8080"},
129
}
130
}
131