#!/usr/bin/env bash set -euo pipefail ### Update index.html for snowflake if it is not up-to-date APP_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..")" APP_DATA_DIR="${APP_DIR}/data" INDEX_HTML_FILE="${APP_DATA_DIR}/index.html" # We use a marker at the top of the file to identify the canonical index.html for snowflake MARKER_REGEX='^' # We check if the index.html file does not exist or if it exists and the marker is not up-to-date if [[ ! -f "${INDEX_HTML_FILE}" ]] || ! grep -qx "${MARKER_REGEX}" "${INDEX_HTML_FILE}"; then echo "Updating index.html file for snowflake." # Overwrite the index.html file cat >"${INDEX_HTML_FILE}" <<'EOF'
Thank you for installing Tor Snowflake Proxy on your Umbrel to help defeat Tor censorship around the world.
No further action is required from your end other than keeping your Umbrel running. :)
Hourly statistics of the data relayed through your proxy are available below.