Add relay config

This commit is contained in:
Arnaud 2026-04-22 19:53:39 +04:00
parent e48ca913a9
commit 4a4941a593
No known key found for this signature in database
GPG Key ID: A6C7C781817146FA
2 changed files with 7 additions and 1 deletions

View File

@ -319,6 +319,12 @@ type
name: "nat-max-relays"
.}: int
relay* {.
desc: "Enable circuit relay server (hop) - use on publicly reachable nodes only",
defaultValue: false,
name: "relay"
.}: bool
func defaultAddress*(conf: StorageConf): IpAddress =
result = static parseIpAddress("127.0.0.1")

View File

@ -198,7 +198,7 @@ proc new*(
## create StorageServer including setting up datastore, repostore, etc
let listenMultiAddr = getMultiAddrWithIpAndTcpPort(config.listenIp, config.listenPort)
let relayClient = relayClientModule.RelayClient.new()
let relayClient = relayClientModule.RelayClient.new(canHop = config.relay)
let autonatClient = AutonatV2Client.new(random.Rng.instance())
let autonatService = AutonatV2Service.new(