From 21589b743a6047b06d07ced2ef39e3fb03f27c44 Mon Sep 17 00:00:00 2001 From: Roxy <75404941+TealSeer@users.noreply.github.com> Date: Sun, 11 May 2025 13:05:02 -0400 Subject: [PATCH] Add user agent string to BYOND download requests (#91101) ## About The Pull Request Someone in the BYOND discord said that they were able to fix their CI script by making sure the request had a user agent attached, and lummox said that BYOND suffered a DDoS yesterday so the failures are probably anti-bot measures. ## Why It's Good For The Game Fix CI mayhaps ## Changelog N/A --- Dockerfile | 2 +- tools/ci/download_byond.sh | 2 +- tools/ci/install_byond.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a27c64574f1..bfa3929d3bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get install -y --no-install-recommends \ COPY dependencies.sh . RUN . ./dependencies.sh \ - && curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip \ + && curl -H "User-Agent: tgstation/1.0 CI Script" "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip \ && unzip byond.zip \ && cd byond \ && sed -i 's|install:|&\n\tmkdir -p $(MAN_DIR)/man6|' Makefile \ diff --git a/tools/ci/download_byond.sh b/tools/ci/download_byond.sh index 19b7f201707..d927c314eeb 100755 --- a/tools/ci/download_byond.sh +++ b/tools/ci/download_byond.sh @@ -2,4 +2,4 @@ set -e source dependencies.sh echo "Downloading BYOND version $BYOND_MAJOR.$BYOND_MINOR" -curl "http://www.byond.com/download/build/$BYOND_MAJOR/$BYOND_MAJOR.${BYOND_MINOR}_byond.zip" -o C:/byond.zip +curl -H "User-Agent: tgstation/1.0 CI Script" "http://www.byond.com/download/build/$BYOND_MAJOR/$BYOND_MAJOR.${BYOND_MINOR}_byond.zip" -o C:/byond.zip diff --git a/tools/ci/install_byond.sh b/tools/ci/install_byond.sh index 9108bde5ebe..4d65a3b0fc9 100755 --- a/tools/ci/install_byond.sh +++ b/tools/ci/install_byond.sh @@ -14,7 +14,7 @@ else rm -rf "$HOME/BYOND" mkdir -p "$HOME/BYOND" cd "$HOME/BYOND" - curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip + curl -H "User-Agent: tgstation/1.0 CI Script" "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip unzip byond.zip rm byond.zip cd byond