feat: add Minecraft proxy and refresh dependencies

This commit is contained in:
Loki 2026-10-16 23:04:41 +02:00
parent a4d0880a0a
commit cfaad47948
Signed by: boba
GPG key ID: 6CDE87BC9A778D97
47 changed files with 2671 additions and 1005 deletions

View file

@ -0,0 +1,56 @@
# Minecraft Java edge configuration for deploy/docker-compose.yml.
whitelist = ["127.0.0.1", "::1"]
[bind]
address = "0.0.0.0"
port = 25565
[backend]
# Docker host address; expose this backend port only to trusted Rampart nodes.
upstreams = ["host.docker.internal:25566"]
[protocol.minecraft]
enabled = true
max_frame_bytes = 8192
timeout_secs = 5
send_proxy_protocol = false
[workers]
count = 4
[limits]
handshake_timeout_secs = 5
max_connections_per_ip = 10
rate_limit_pps = 5.0
rate_limit_burst = 10.0
[ban]
ban_duration_secs = 3600
[store]
redis_url = "redis://redis:6379/0"
blacklist_cache_ttl_secs = 300
clickhouse_url = ""
[xdp]
enabled = false
interface = "eth0"
[logging]
level = "info"
format = "text"
[metrics]
enabled = true
port = 9090
[pow]
enabled = false
difficulty = 4
# Enable only when a trusted upstream TCP proxy sends PROXY protocol v2.
[proxy_protocol]
ingress_enabled = false
trusted_cidrs = []
ingress_timeout_ms = 750
max_header_bytes = 512

View file

@ -0,0 +1,42 @@
# Generic HTTP/1.1 edge configuration.
whitelist = ["127.0.0.1", "::1"]
[bind]
address = "0.0.0.0"
port = 25565
[backend]
upstreams = ["127.0.0.1:25566"]
[workers]
count = 4
[limits]
handshake_timeout_secs = 5
max_connections_per_ip = 10
rate_limit_pps = 5.0
rate_limit_burst = 10.0
[ban]
ban_duration_secs = 3600
[store]
redis_url = ""
blacklist_cache_ttl_secs = 300
clickhouse_url = ""
[xdp]
enabled = false
interface = "eth0"
[logging]
level = "info"
format = "text"
[metrics]
enabled = true
port = 9090
[pow]
enabled = false
difficulty = 4

View file

@ -1,13 +1,23 @@
# Rampart edge — единый конфиг (схема: src/config/sections.rs)
# Rampart edge для Minecraft Java (схема: src/config/sections/)
# whitelist — корневое поле, поэтому оно задаётся до любых TOML-секций.
whitelist = ["127.0.0.1", "::1"]
[bind]
address = "0.0.0.0"
port = 25565
[backend]
# Generic TCP-бэкенды за edge-нодой (addr:port)
# Адрес Paper за доверенным прокси; закрой этот порт firewall-ом от интернета.
upstreams = ["127.0.0.1:25566"]
[protocol.minecraft]
enabled = true
max_frame_bytes = 8192
timeout_secs = 5
# Outbound: включай вместе с proxies.proxy-protocol: true на Paper и firewall,
# разрешающим backend-порт только от этого Rampart.
send_proxy_protocol = false
[workers]
count = 4
@ -41,4 +51,10 @@ port = 9090
enabled = false
difficulty = 4
whitelist = ["127.0.0.1", "::1"]
# Inbound: включай только если входящий TCP-прокси передаёт PROXY v2.
# Укажи точные адреса/CIDR этого прокси; не добавляй сюда адреса игроков.
[proxy_protocol]
ingress_enabled = false
trusted_cidrs = []
ingress_timeout_ms = 750
max_header_bytes = 512