feat: add a dmidecode shim and allow for disabling cleartext session tokens storage

This commit is contained in:
IhToN
2026-01-17 21:10:52 +01:00
committed by ATAlgaba
parent 4fa3d0554d
commit 6f844b2d86
4 changed files with 51 additions and 1 deletions

View File

@@ -49,6 +49,34 @@ RUN mkdir -p /egg-hytale
COPY --chmod=755 ./lib /egg-hytale/lib
RUN sed -i 's/\r$//' /egg-hytale/lib/*.sh
# Create dmidecode shim for Docker usage
RUN echo "Creating local dmidecode for Docker usage." && \
cat > /usr/local/bin/dmidecode << 'EOF'
#!/bin/sh
if [ "$1" = "-s" ] && [ "$2" = "system-uuid" ]; then
UUID_FILE="$HOME/.hytale_system_uuid"
if [ -f "$UUID_FILE" ]; then
cat "$UUID_FILE"
else
if command -v uuidgen >/dev/null 2>&1; then
uuidgen | tr "A-Z" "a-z" | tee "$UUID_FILE" >/dev/null
else
cat /proc/sys/kernel/random/uuid | tee "$UUID_FILE" >/dev/null
fi
cat "$UUID_FILE"
fi
printf "\n"
exit 0
fi
echo "dmidecode shim: unsupported args: $*" >&2
exit 1
EOF
RUN chmod +x /usr/local/bin/dmidecode
RUN sed -i 's/\r$//' /entrypoint.sh
# Create the container user
RUN useradd -m -d /home/container -s /bin/bash container

View File

@@ -309,6 +309,18 @@
],
"sort": 24
},
{
"name": "Unencrypted Auth Session",
"description": "Enable it to store the Authorization Session as a token in the root server. Needed if the server is not able to store an encrypted auth session. Intended for game server providers.",
"env_variable": "UNENCRYPTED_AUTH_SESSION",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": [
"boolean"
],
"sort": 23
},
{
"name": "Patchline",
"description": "What release channel you want to use",

View File

@@ -260,6 +260,16 @@
"rules": "required|integer|between:1,65535",
"field_type": "text"
},
{
"name": "Unencrypted Auth Session",
"description": "Enable it to store the Authorization Session as a token in the root server. Needed if the server is not able to store an encrypted auth session. Intended for game server providers.",
"env_variable": "UNENCRYPTED_AUTH_SESSION",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Override Session Token",
"description": "Optional session token used to override the normal server authentication process. This option only takes effect when both override tokens are set. If left empty, the server will request authentication on startup. Intended for game server providers.",

View File

@@ -4,4 +4,4 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
echo "Building and pushing dev image..."
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/natroutter/egg-hytale:dev --push "$PROJECT_DIR"
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/ihton/egg-hytale:dev --push "$PROJECT_DIR"