|
| bool | enable_client = true |
| | Open circuits through other peers. Off makes this a relay-only node.
|
| size_t | max_probes = 3 |
| | Peers asked whether they hold a target, per attempt.
|
| size_t | max_outbound_circuits = 8 |
| | Circuits this node may hold open as a client at once.
|
| std::chrono::milliseconds | open_timeout {8000} |
| | How long an attempt may take from the first probe to a live connection.
|
| std::chrono::milliseconds | cooldown {60000} |
| | How long after a failed attempt before the same target may be tried again.
|
| bool | accept_inbound = true |
| | Accept circuits other peers open toward us.
|
| size_t | max_inbound_circuits = 16 |
| | Circuits opened TO us that may be live at once.
|
| bool | serve = false |
| | Serve as a relay.
|
| size_t | max_circuits = 32 |
| | Circuits this node will carry for others at once.
|
| size_t | max_circuits_per_peer = 2 |
| | Circuits one peer may have us carrying, so a single peer cannot take the whole budget.
|
| uint64_t | max_circuit_rate_bps = 10'000'000 |
| | Bits per second one circuit may move each way, on average over circuit_burst: bursts up to that much pass as they come.
|
| std::chrono::milliseconds | circuit_burst {2000} |
| | What the rate is averaged over.
|
| std::chrono::seconds | max_circuit_duration {3600} |
| | How long one circuit may live.
|
| size_t | request_budget = 8 |
| | Requests (probes and circuit openings) one peer may make per window.
|
| std::chrono::milliseconds | request_window {1000} |
| uint32_t | window = Circuit::kDefaultWindow |
| | Bytes this node is willing to have in flight per byte-stream circuit — the credit window it advertises (see transport/relay_link.h).
|
| bool | upgrade_with_hole_punch = true |
| | When a relayed peer connects, ask HolePunch to try it directly, so the circuit is replaced by a direct link as soon as one is possible.
|
| std::chrono::milliseconds | tick {250} |
| | Bookkeeping cadence — attempt timeouts, cooldowns, circuit expiry.
|
Definition at line 107 of file relay.h.
| uint64_t librats::Relay::Config::max_circuit_rate_bps = 10'000'000 |
Bits per second one circuit may move each way, on average over circuit_burst: bursts up to that much pass as they come.
0 removes the cap. Past it a circuit is slowed, never closed — what a call or a transfer through a relay can rely on is the rate, not a volume it runs out of. A forwarded circuit is held the way a bottleneck link holds a flow (a short queue, see transport/udp_mux.h); a byte stream by withholding the far end's credit until the sender is back within it. The default carries a 1080p call with room to spare.
Definition at line 162 of file relay.h.