@@ -22,9 +22,16 @@ type SwarmConfig struct {
2222 // EnableAutoRelay enables the "auto relay user" feature.
2323 // Node will find and use advertised public relays when it determines that
2424 // it's not reachable from the public internet.
25+ //
26+ // Deprecated: This flag is deprecated and is overriden by
27+ // `Swarm.AutoRelay.Enabled` if specified.
2528 EnableAutoRelay bool
2629
27- // RelayService.* controls the "auto relay service" feature.
30+ // AutoRelay controls the "auto relay service" feature.
31+ // When enabled, the node will use relays if it is not publicly reachable.
32+ AutoRelay AutoRelay
33+
34+ // RelayService.* controls the "relay service".
2835 // When enabled, node will provide a limited relay service to other peers.
2936 RelayService RelayService
3037
@@ -35,6 +42,16 @@ type SwarmConfig struct {
3542 ConnMgr ConnMgr
3643}
3744
45+ type AutoRelay struct {
46+ // Enables the AutoRelay.
47+ Enabled Flag `json:",omitempty"`
48+
49+ // StaticRelays configures static relays to use when this node is not
50+ // publicly reachable. If set, auto relay will not try to find any
51+ // other relay servers.
52+ StaticRelays []string `json:",omitempty"`
53+ }
54+
3855// RelayService configures the resources of the circuit v2 relay.
3956// For every field a reasonable default will be defined in go-ipfs.
4057type RelayService struct {
0 commit comments