Files
iroh/iroh-dns-server/config.dev.toml
Vítor Vasconcellos fe684c23e6 feat(iroh-dns-server)!: Make http rate limit configurable (#2772)
Hello,

We are currently testing some new cloud features at
[Spacedrive](https://github.com/spacedriveapp/spacedrive), and our
implementation relies heavily on iroh. As part of this, we are deploying
our own iroh-dns-server. However, since all of our backend services
operate behind a reverse proxy, we noticed that the iroh-dns-server was
frequently hitting its rate limit because it wasn’t aware of the proxy
setup. To address this, I decided to implement a configurable rate limit
for the iroh-dns-server.

## Description

This PR adds a new entry to the `iroh-dns-server` TOML file for
configuring the HTTP rate limit. The new configuration allows for
disabling the rate limit and also supports configuring it to use the
[SmartIPKeyExtract](https://github.com/benwis/tower-governor/blob/v0.4.2/src/key_extractor.rs#L85-L119),
making it compatible with reverse proxies.

## Breaking Changes

- `iroh-dns-server`'s configuration structure now has a new field
allowing to choose the rate limiting algorithms.

## Notes & open questions

:)

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
2024-10-29 14:35:38 +00:00

24 lines
436 B
TOML

pkarr_put_rate_limit = "disabled"
[http]
port = 8080
bind_addr = "127.0.0.1"
[https]
port = 8443
bind_addr = "127.0.0.1"
domains = ["localhost"]
cert_mode = "self_signed"
[dns]
port = 5300
bind_addr = "127.0.0.1"
default_soa = "dns1.irohdns.example hostmaster.irohdns.example 0 10800 3600 604800 3600"
default_ttl = 900
origins = ["irohdns.example.", "."]
rr_a = "127.0.0.1"
rr_ns = "ns1.irohdns.example."
[mainline]
enabled = true