16
// DisableRelay explicitly disables the relay transport.
17
//
18
// Deprecated: This flag is deprecated and is overridden by
19
- // `Transports.Relay` if specified.
19
+ // `Swarm.Transports.Relay` if specified.
20
DisableRelay bool `json:",omitempty"`
21
22
- // EnableRelayHop makes this node act as a public relay, relaying
23
- // traffic between other nodes.
24
- EnableRelayHop bool
25
-
26
- // EnableAutoRelay enables the "auto relay" feature.
27
- //
28
- // When both EnableAutoRelay and EnableRelayHop are set, this go-ipfs node
29
- // will advertise itself as a public relay. Otherwise it will find and use
30
- // advertised public relays when it determines that it's not reachable
31
- // from the public internet.
22
+ // EnableAutoRelay enables the "auto relay user" feature.
23
+ // Node will find and use advertised public relays when it determines that
24
+ // it's not reachable from the public internet.
25
EnableAutoRelay bool
26
27
+ // RelayService.* controls the "auto relay service" feature.
28
+ // When enabled, node will provide a limited relay service to other peers.
29
+ RelayService RelayService
30
+
31
// Transports contains flags to enable/disable libp2p transports.
32
Transports Transports
33
35
ConnMgr ConnMgr
36
}
37
38
+// RelayService configures the resources of the circuit v2 relay.
39
+// For every field a reasonable default will be defined in go-ipfs.
40
+type RelayService struct {
41
+ // Enables the limited relay (circuit v2 relay).
42
+ Enabled Flag `json:",omitempty"`
43
+
44
+ // ConnectionDurationLimit is the time limit before resetting a relayed connection.
45
+ ConnectionDurationLimit *OptionalDuration `json:",omitempty"`
46
+ // ConnectionDataLimit is the limit of data relayed (on each direction) before resetting the connection.
47
+ ConnectionDataLimit *OptionalInteger `json:",omitempty"`
48
+
49
+ // ReservationTTL is the duration of a new (or refreshed reservation).
50
+ ReservationTTL *OptionalDuration `json:",omitempty"`
51
+
52
+ // MaxReservations is the maximum number of active relay slots.
53
+ MaxReservations *OptionalInteger `json:",omitempty"`
54
+ // MaxCircuits is the maximum number of open relay connections for each peer; defaults to 16.
55
+ MaxCircuits *OptionalInteger `json:",omitempty"`
56
+ // BufferSize is the size of the relayed connection buffers.
57
+ BufferSize *OptionalInteger `json:",omitempty"`
58
+
59
+ // MaxReservationsPerPeer is the maximum number of reservations originating from the same peer.
60
+ MaxReservationsPerPeer *OptionalInteger `json:",omitempty"`
61
+ // MaxReservationsPerIP is the maximum number of reservations originating from the same IP address.
62
+ MaxReservationsPerIP *OptionalInteger `json:",omitempty"`
63
+ // MaxReservationsPerASN is the maximum number of reservations origination from the same ASN.
64
+ MaxReservationsPerASN *OptionalInteger `json:",omitempty"`
65
+}
66
+
67
type Transports struct {
68
// Network specifies the base transports we'll use for dialing. To
69
// listen on a transport, add the transport to your Addresses.Swarm.