add filter_private_ips option to discard private IPs.

Might be used when tracker is behind reverse proxy and one of provided
addresses in `real_ip_header` is private/local address.

Additional changes:

* check if provided address is not multicast/broadcast
* configure `http.Server.ReadHeaderTimeout` with `http.ReadTimeout` to mitigate Slowloris
* update dependencies
* minor docs fixes
This commit is contained in:
Lawrence, Rendall
2022-07-23 15:30:12 +03:00
parent 3e36ad7cbf
commit 96653c45a3
13 changed files with 125 additions and 63 deletions

View File

@@ -50,7 +50,7 @@ The typical control flow of handling announces, in more detail, is:
#### Configuration
The frontend must be configurable using a single, exported struct. The struct must have YAML annotations. The struct
must implement `log.Fielder` to be logged on startup.
must implement `zerolog.LogObjectMarshaler` to be logged on startup.
#### Metrics