Disable Cloudflare proxy for Minecraft record to allow direct client connections.

This commit is contained in:
Root User 2026-03-20 01:18:29 +01:00
parent c0cb00ed55
commit 7ff4590722
Signed by: root
GPG key ID: 087F0A95E5766D72

View file

@ -842,6 +842,17 @@ in {
else else
export record_name="$r.${domain}" export record_name="$r.${domain}"
fi fi
# Default to Cloudflare proxy enabled for all records, but explicitly
# disable the proxy for the Minecraft record so clients connect
# directly to the origin on port 25565 (Cloudflare does not proxy
# arbitrary Minecraft TCP without Spectrum).
if [ "$r" = "minecraft" ]; then
export proxy="false"
else
export proxy="true"
fi
# Invoke the single-run script explicitly with the system's bash via env to avoid /bin/bash shebang issues # Invoke the single-run script explicitly with the system's bash via env to avoid /bin/bash shebang issues
${pkgs.bash}/bin/bash /etc/cloudflare-ddns/update-single.sh "$record_name" "$zone_identifier" "$auth_email" "$auth_key" || true ${pkgs.bash}/bin/bash /etc/cloudflare-ddns/update-single.sh "$record_name" "$zone_identifier" "$auth_email" "$auth_key" || true
done done