600 /api/ requests a minute per client address (--requests-per-minute), 429 with Retry-After; static UI files and the node's own machine are exempt. The real client behind a reverse proxy is read from X-Forwarded-For only when the connection comes from a --trusted-proxy, taking the last entry that is not itself a trusted proxy. k8s: TRUSTED_PROXY in config.env (the private ranges) is passed as --trusted-proxy. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
34 lines
1.9 KiB
Bash
34 lines
1.9 KiB
Bash
# The public name of this node: a DNS name (A record, or a dynamic-DNS name)
|
|
# that points at your router's public IP. Nodes behind a router do not know
|
|
# their own public address, so the node announces this name instead.
|
|
PUBLIC_HOST=bootstrap.allmende.stinnesbeck.com
|
|
|
|
# The port your router forwards to the cluster, as seen from the internet
|
|
# (TCP and UDP). Keep it 4001 unless the router cannot forward it.
|
|
PUBLIC_PORT=4001
|
|
|
|
# The regions this node keeps listings for: a place name or a 3-character
|
|
# geohash, several separated by commas (REGION=mechernich or REGION=u1h,u0u).
|
|
# Empty (the default) follows none: it then only helps others connect.
|
|
# It is the starting value: once the owner chooses regions in the browser, those
|
|
# are kept on the volume and win over this (delete /data/regions.json to use
|
|
# this again). Changing this file restarts the pod, because the ConfigMap name
|
|
# changes with its content.
|
|
REGION=
|
|
|
|
# The proof-of-work (leading zero bits) this node requires of listings, reports
|
|
# and revocations. It must equal the network's: a node refuses what carries
|
|
# less than its own value, so a node at 24 and one at 16 exchange no listings.
|
|
# The default of the binary is 24; it is written here so it is visible, and so
|
|
# a later change of the network's value is one edit in one place.
|
|
DIFFICULTY=24
|
|
|
|
# The reverse proxies in front of the web UI and API (your ingress controller),
|
|
# comma separated addresses or networks. Only a connection from one of them may
|
|
# say who the real client is (X-Forwarded-For); the node then limits requests
|
|
# per real client (600 a minute) instead of counting the whole site as one
|
|
# client. These are the private ranges, which covers the pod networks of k3s
|
|
# (10.42.0.0/16), most CNIs and a Traefik on the same cluster. Empty: every
|
|
# visitor shares one allowance, which throttles the site as a whole.
|
|
TRUSTED_PROXY=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|