From 6266d711f3b96c5361080fe2227449a49c2aaf10 Mon Sep 17 00:00:00 2001 From: Jorropo Date: Sat, 5 Jun 2021 21:11:07 +0200 Subject: [PATCH] feat: add Addresses#AppendAnnounce --- addresses.go | 11 ++++++----- init.go | 9 +++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/addresses.go b/addresses.go index 2d88468..709b28d 100644 --- a/addresses.go +++ b/addresses.go @@ -2,9 +2,10 @@ package config // Addresses stores the (string) multiaddr addresses for the node. type Addresses struct { - Swarm []string // addresses for the swarm to listen on - Announce []string // swarm addresses to announce to the network - NoAnnounce []string // swarm addresses not to announce to the network - API Strings // address for the local API (RPC) - Gateway Strings // address to listen on for IPFS HTTP object gateway + Swarm []string // addresses for the swarm to listen on + Announce []string // swarm addresses to announce to the network, if len > 0 replaces auto detected addresses + AppendAnnounce []string // similar to Announce but doesn't overwride auto detected addresses, they are just appended + NoAnnounce []string // swarm addresses not to announce to the network + API Strings // address for the local API (RPC) + Gateway Strings // address to listen on for IPFS HTTP object gateway } diff --git a/init.go b/init.go index 13d40b6..10f9faa 100644 --- a/init.go +++ b/init.go @@ -121,10 +121,11 @@ func addressesConfig() Addresses { "/ip4/0.0.0.0/udp/4001/quic", "/ip6/::/udp/4001/quic", }, - Announce: []string{}, - NoAnnounce: []string{}, - API: Strings{"/ip4/127.0.0.1/tcp/5001"}, - Gateway: Strings{"/ip4/127.0.0.1/tcp/8080"}, + Announce: []string{}, + AppendAnnounce: []string{}, + NoAnnounce: []string{}, + API: Strings{"/ip4/127.0.0.1/tcp/5001"}, + Gateway: Strings{"/ip4/127.0.0.1/tcp/8080"}, } }