echoip-slatecave/echoip_config.toml

69 lines
2.2 KiB
TOML
Raw Permalink Normal View History

2023-02-18 22:16:09 +01:00
[server]
# What port to listen on and where request are supposed to come from
listen_on = "127.0.0.1:3000"
2023-02-18 22:16:09 +01:00
# What header your reverse proxy sets that contains the real ip-address
2023-02-25 12:14:50 +01:00
# Possible Values: Every Variation of SecureClientIpSource in the axum_client_ip crate
2023-02-18 22:16:09 +01:00
# https://docs.rs/axum-client-ip/latest/axum_client_ip/enum.SecureClientIpSource.html
2023-02-25 12:14:50 +01:00
# Note: This one is also used for rate limiting
# Related: https://adam-p.ca/blog/2022/03/x-forwarded-for/
ip_header = "RightmostXForwardedFor"
2023-02-18 22:16:09 +01:00
# When you don't want to use a proxy server:
#ip_header = "ConnectInfo"
# You can specify a custom location for static files here
# Defaults to the static directory in the templete direcotry
# Acts as an "underlay"
#static_location = ""
2023-02-25 12:14:50 +01:00
# Allow querying of private range ips
# enable if you want to use this service
# on your internal network for some reason
allow_private_ip_lookup = false
2023-02-18 22:16:09 +01:00
[dns]
# Enable the /dig enpoint
allow_forward_lookup = true
2023-02-18 22:16:09 +01:00
# Enable reverse lookup, make sure to configure the hidden_suffixes
# to contain your locally used domains, to prevent information leakage
allow_reverse_lookup = true
2023-02-18 22:16:09 +01:00
# echoip-sltecave will pretend that domains
# that end with one of these suffixes don't exist
# both for forward and reverse lookup
hidden_suffixes = [".local", ".box"]
2023-02-18 22:16:09 +01:00
[geoip]
# Path to geoip databses
# Currently only the mmdb format is supported
# Official databases can be obtained from maxmind.com
asn_database = "mmdb/GeoLite2-ASN.mmdb"
location_database = "mmdb/GeoLite2-City.mmdb"
2023-02-18 22:16:09 +01:00
# If anyone knows a free (as in freedom) groip database
# please open an issue so I can integrate it
# https://codeberg.org/slatian/service.echoip-slatecave
[template]
# Path to the template directory, can contain glob patterns
template_location = "templates"
# Prefixes of user agents that should get a text reponse by default
text_user_agents = ["curl/"]
2023-02-25 12:14:50 +01:00
[ratelimit]
# Configure a Quota for the Rate limiter
# Please note that this depends on the ip_header being
# configured correctly!
# How many requests per minute are allowed
# (How fast the leaky bucket drains)
per_minute = 20
# How many requests may come in at once
# (How much capacity the leaky bucket has)
burst = 15
#Note: The ratelimit is implemented using the governor crate