From 18f23497b440b032814a753510a826b75b4a4f42 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Fri, 26 Dec 2025 14:01:14 +0100 Subject: [PATCH 01/15] add tor-snowflake script --- ct/tor-snowflake.sh | 78 +++++++++++++++++++++++++ frontend/public/json/tor-snowflake.json | 35 +++++++++++ install/tor-snowflake-install.sh | 69 ++++++++++++++++++++++ 3 files changed, 182 insertions(+) create mode 100644 ct/tor-snowflake.sh create mode 100644 frontend/public/json/tor-snowflake.json create mode 100644 install/tor-snowflake-install.sh diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh new file mode 100644 index 000000000..004cc5547 --- /dev/null +++ b/ct/tor-snowflake.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: KernelSailor +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://snowflake.torproject.org/ + +APP="tor-snowflake" +var_tags="privacy;proxy;tor" +var_cpu="1" +var_ram="512" +var_disk="4" +var_os="debian" +var_version="13" +var_unprivileged="1" +var_nesting="0" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/snowflake ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + if ! id snowflake &>/dev/null; then + msg_error "snowflake user not found!" + exit + fi + + msg_info "Updating Container OS" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Updated Container OS" + + RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop snowflake-proxy + msg_ok "Stopped Service" + + msg_info "Updating Go" + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func) + setup_go + msg_ok "Updated Go" + + msg_info "Updating ${APP} to v${RELEASE}" + cd /opt/snowflake || exit + $STD git fetch --all + $STD git checkout "v${RELEASE}" + chown -R snowflake:snowflake /opt/snowflake + $STD sudo -u snowflake go build -o proxy ./proxy + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to v${RELEASE}" + + msg_info "Starting Service" + systemctl start snowflake-proxy + msg_ok "Started Service" + msg_ok "Updated successfully!" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}." + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}Tor Snowflake setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Snowflake proxy is running as a systemd service.${CL}" +echo -e "${INFO}${YW} Check status: systemctl status snowflake-proxy${CL}" diff --git a/frontend/public/json/tor-snowflake.json b/frontend/public/json/tor-snowflake.json new file mode 100644 index 000000000..00ed299f9 --- /dev/null +++ b/frontend/public/json/tor-snowflake.json @@ -0,0 +1,35 @@ +{ + "name": "Tor Snowflake", + "slug": "tor-snowflake", + "categories": [ + 4 + ], + "date_created": "2025-12-19", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": "https://community.torproject.org/relay/setup/snowflake/standalone/", + "website": "https://snowflake.torproject.org/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/tor.webp", + "config_path": null, + "description": "Snowflake is a pluggable transport that proxies traffic through temporary proxies using WebRTC. Snowflake allows users in censored locations to access the open internet by connecting through volunteer-run proxies. Running a Snowflake proxy helps users circumvent internet censorship by forwarding their traffic through your server.", + "install_methods": [ + { + "type": "default", + "script": "ct/tor-snowflake.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 4, + "os": "debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh new file mode 100644 index 000000000..f9a1a56f2 --- /dev/null +++ b/install/tor-snowflake-install.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: KernelSailor +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://snowflake.torproject.org/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + ca-certificates \ + curl \ + git \ + jq +msg_ok "Installed Dependencies" + +setup_go + +msg_info "Creating snowflake user" +useradd -r -s /bin/false -d /opt/snowflake snowflake +msg_ok "Created snowflake user" + +msg_info "Building Snowflake Proxy from Source" +cd /opt || exit +RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') +$STD git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git +cd snowflake || exit +git config --global --add safe.directory /opt/snowflake +$STD git checkout "v${RELEASE}" +chown -R snowflake:snowflake /opt/snowflake +cd proxy || exit +$STD sudo -u snowflake go build -o snowflake-proxy . +cd /opt/snowflake || exit +echo "${RELEASE}" >/opt/tor-snowflake_version.txt +msg_ok "Built Snowflake Proxy v${RELEASE}" + +msg_info "Creating Service" +cat </etc/systemd/system/snowflake-proxy.service +[Unit] +Description=Snowflake Proxy Service +Documentation=https://snowflake.torproject.org/ +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=snowflake +Group=snowflake +WorkingDirectory=/opt/snowflake +ExecStart=/opt/snowflake/proxy/snowflake-proxy -verbose -unsafe-logging +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now snowflake-proxy +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc From 8aa09d64dcd41d549f2670147b202516bf3efbba Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Fri, 26 Dec 2025 19:33:12 +0100 Subject: [PATCH 02/15] vars as arguments --- ct/tor-snowflake.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index 004cc5547..b0ca17a96 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -6,14 +6,14 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # Source: https://snowflake.torproject.org/ APP="tor-snowflake" -var_tags="privacy;proxy;tor" -var_cpu="1" -var_ram="512" -var_disk="4" -var_os="debian" -var_version="13" -var_unprivileged="1" -var_nesting="0" +var_tags="${var_tags:-privacy;proxy;tor}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-4}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" +var_nesting="${var_nesting:-0}" header_info "$APP" variables From 2dd49e9b433603d00d217841a925a704954bda40 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Fri, 26 Dec 2025 19:34:10 +0100 Subject: [PATCH 03/15] apt use new version --- ct/tor-snowflake.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index b0ca17a96..ca37f19f0 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -34,8 +34,8 @@ function update_script() { fi msg_info "Updating Container OS" - $STD apt-get update - $STD apt-get -y upgrade + $STD apt update + $STD apt upgrade -y msg_ok "Updated Container OS" RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') From 85652adee932929dce600599450c524bae528161 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Fri, 26 Dec 2025 19:37:59 +0100 Subject: [PATCH 04/15] download code from release instead of git repo --- ct/tor-snowflake.sh | 25 +++++++++---------------- install/tor-snowflake-install.sh | 21 ++++++--------------- 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index ca37f19f0..62d9501da 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: KernelSailor # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -24,14 +24,6 @@ function update_script() { header_info check_container_storage check_container_resources - if [[ ! -d /opt/snowflake ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - if ! id snowflake &>/dev/null; then - msg_error "snowflake user not found!" - exit - fi msg_info "Updating Container OS" $STD apt update @@ -44,17 +36,18 @@ function update_script() { systemctl stop snowflake-proxy msg_ok "Stopped Service" - msg_info "Updating Go" - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func) setup_go - msg_ok "Updated Go" msg_info "Updating ${APP} to v${RELEASE}" - cd /opt/snowflake || exit - $STD git fetch --all - $STD git checkout "v${RELEASE}" + cd /opt + $STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o snowflake.tar.gz + $STD tar -xzf snowflake.tar.gz + rm -rf snowflake + mv "snowflake-v${RELEASE}" snowflake + rm snowflake.tar.gz chown -R snowflake:snowflake /opt/snowflake - $STD sudo -u snowflake go build -o proxy ./proxy + cd /opt/snowflake/proxy + $STD sudo -u snowflake go build -o snowflake-proxy . echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to v${RELEASE}" diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh index f9a1a56f2..bd9e7c833 100644 --- a/install/tor-snowflake-install.sh +++ b/install/tor-snowflake-install.sh @@ -13,14 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y \ - ca-certificates \ - curl \ - git \ - jq -msg_ok "Installed Dependencies" - setup_go msg_info "Creating snowflake user" @@ -28,16 +20,15 @@ useradd -r -s /bin/false -d /opt/snowflake snowflake msg_ok "Created snowflake user" msg_info "Building Snowflake Proxy from Source" -cd /opt || exit RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') -$STD git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git -cd snowflake || exit -git config --global --add safe.directory /opt/snowflake -$STD git checkout "v${RELEASE}" +cd /opt +$STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o snowflake.tar.gz +$STD tar -xzf snowflake.tar.gz +mv "snowflake-v${RELEASE}" snowflake +rm snowflake.tar.gz chown -R snowflake:snowflake /opt/snowflake -cd proxy || exit +cd /opt/snowflake/proxy $STD sudo -u snowflake go build -o snowflake-proxy . -cd /opt/snowflake || exit echo "${RELEASE}" >/opt/tor-snowflake_version.txt msg_ok "Built Snowflake Proxy v${RELEASE}" From 654047e08abf08a3460e07765d3c78c0f46d0646 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Mon, 29 Dec 2025 11:45:58 +0100 Subject: [PATCH 05/15] change App location --- ct/tor-snowflake.sh | 23 +++++++++++---------- install/tor-snowflake-install.sh | 34 ++++++++++++++++---------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index 62d9501da..5fea776e9 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -15,6 +15,8 @@ var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" var_nesting="${var_nesting:-0}" +SNOWFLAKEUSER="snowflake" + header_info "$APP" variables color @@ -31,24 +33,21 @@ function update_script() { msg_ok "Updated Container OS" RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') - if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_info "Stopping Service" + VERSION_FILE="/home/${SNOWFLAKEUSER}/.${APP}_version" + if [[ ! -f "${VERSION_FILE}" ]] || [[ "${RELEASE}" != "$(cat "${VERSION_FILE}")" ]]; then systemctl stop snowflake-proxy msg_ok "Stopped Service" setup_go msg_info "Updating ${APP} to v${RELEASE}" - cd /opt - $STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o snowflake.tar.gz - $STD tar -xzf snowflake.tar.gz - rm -rf snowflake - mv "snowflake-v${RELEASE}" snowflake - rm snowflake.tar.gz - chown -R snowflake:snowflake /opt/snowflake - cd /opt/snowflake/proxy - $STD sudo -u snowflake go build -o snowflake-proxy . - echo "${RELEASE}" >/opt/${APP}_version.txt + $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" + $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tar -xzf snowflake.tar.gz" + $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && rm snowflake.tar.gz" + $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && rm -rf .${APP}" + $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && mv snowflake-v${RELEASE} .${APP}" + $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~/.${APP}/proxy && go build -o snowflake-proxy ." + echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_version >/dev/null" msg_ok "Updated ${APP} to v${RELEASE}" msg_info "Starting Service" diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh index bd9e7c833..4db5cb7fe 100644 --- a/install/tor-snowflake-install.sh +++ b/install/tor-snowflake-install.sh @@ -13,23 +13,23 @@ setting_up_container network_check update_os +APP="tor-snowflake" +SNOWFLAKEUSER="snowflake" + setup_go -msg_info "Creating snowflake user" -useradd -r -s /bin/false -d /opt/snowflake snowflake -msg_ok "Created snowflake user" +msg_info "Creating ${SNOWFLAKEUSER} user" +useradd -m -r -s /usr/sbin/nologin -d /home/${SNOWFLAKEUSER} ${SNOWFLAKEUSER} +msg_ok "Created ${SNOWFLAKEUSER} user" -msg_info "Building Snowflake Proxy from Source" +msg_info "Building Snowflake" RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') -cd /opt -$STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o snowflake.tar.gz -$STD tar -xzf snowflake.tar.gz -mv "snowflake-v${RELEASE}" snowflake -rm snowflake.tar.gz -chown -R snowflake:snowflake /opt/snowflake -cd /opt/snowflake/proxy -$STD sudo -u snowflake go build -o snowflake-proxy . -echo "${RELEASE}" >/opt/tor-snowflake_version.txt +$STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" +$STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tar -xzf snowflake.tar.gz" +$STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && rm snowflake.tar.gz" +$STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && mv snowflake-v${RELEASE} .${APP}" +$STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~/.${APP}/proxy && go build -o snowflake-proxy ." +echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_version >/dev/null" msg_ok "Built Snowflake Proxy v${RELEASE}" msg_info "Creating Service" @@ -42,10 +42,10 @@ Wants=network-online.target [Service] Type=simple -User=snowflake -Group=snowflake -WorkingDirectory=/opt/snowflake -ExecStart=/opt/snowflake/proxy/snowflake-proxy -verbose -unsafe-logging +User=${SNOWFLAKEUSER} +Group=${SNOWFLAKEUSER} +WorkingDirectory=/home/${SNOWFLAKEUSER}/.${APP} +ExecStart=/home/${SNOWFLAKEUSER}/.${APP}/proxy/snowflake-proxy -verbose -unsafe-logging Restart=always RestartSec=10 From 9702978d0c8a10d2597b707031b1a97627597718 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Mon, 29 Dec 2025 11:46:51 +0100 Subject: [PATCH 06/15] rename snowflake systemd service --- ct/tor-snowflake.sh | 11 ++++++----- install/tor-snowflake-install.sh | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index 5fea776e9..c27e8a3cc 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -35,8 +35,9 @@ function update_script() { RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') VERSION_FILE="/home/${SNOWFLAKEUSER}/.${APP}_version" if [[ ! -f "${VERSION_FILE}" ]] || [[ "${RELEASE}" != "$(cat "${VERSION_FILE}")" ]]; then - systemctl stop snowflake-proxy - msg_ok "Stopped Service" + msg_info "Stopping ${APP} Service" + systemctl stop ${APP} + msg_ok "Stopped ${APP} Service" setup_go @@ -50,9 +51,9 @@ function update_script() { echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_version >/dev/null" msg_ok "Updated ${APP} to v${RELEASE}" - msg_info "Starting Service" - systemctl start snowflake-proxy - msg_ok "Started Service" + msg_info "Starting ${APP} Service" + systemctl start ${APP} + msg_ok "Started ${APP} Service" msg_ok "Updated successfully!" else msg_ok "No update required. ${APP} is already at v${RELEASE}." diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh index 4db5cb7fe..f5b917ce5 100644 --- a/install/tor-snowflake-install.sh +++ b/install/tor-snowflake-install.sh @@ -33,7 +33,7 @@ echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_ver msg_ok "Built Snowflake Proxy v${RELEASE}" msg_info "Creating Service" -cat </etc/systemd/system/snowflake-proxy.service +cat </etc/systemd/system/${APP}.service [Unit] Description=Snowflake Proxy Service Documentation=https://snowflake.torproject.org/ @@ -52,7 +52,7 @@ RestartSec=10 [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now snowflake-proxy +systemctl enable -q --now ${APP} msg_ok "Created Service" motd_ssh From e22edd600a1bd821d42ed8095cdd4e767f15f822 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Mon, 29 Dec 2025 11:47:51 +0100 Subject: [PATCH 07/15] rm info notification at the end of script --- ct/tor-snowflake.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index c27e8a3cc..74ed6be57 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -66,6 +66,3 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}Tor Snowflake setup has been successfully initialized!${CL}" -echo -e "${INFO}${YW} Snowflake proxy is running as a systemd service.${CL}" -echo -e "${INFO}${YW} Check status: systemctl status snowflake-proxy${CL}" From 2e5376c4d61dfc84656390eb56f7e0d2ce7195c1 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Mon, 29 Dec 2025 18:18:02 +0100 Subject: [PATCH 08/15] Revert "rename snowflake systemd service" This reverts commit 9702978d0c8a10d2597b707031b1a97627597718. --- ct/tor-snowflake.sh | 11 +++++------ install/tor-snowflake-install.sh | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index 74ed6be57..a3d97604d 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -35,9 +35,8 @@ function update_script() { RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') VERSION_FILE="/home/${SNOWFLAKEUSER}/.${APP}_version" if [[ ! -f "${VERSION_FILE}" ]] || [[ "${RELEASE}" != "$(cat "${VERSION_FILE}")" ]]; then - msg_info "Stopping ${APP} Service" - systemctl stop ${APP} - msg_ok "Stopped ${APP} Service" + systemctl stop snowflake-proxy + msg_ok "Stopped Service" setup_go @@ -51,9 +50,9 @@ function update_script() { echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_version >/dev/null" msg_ok "Updated ${APP} to v${RELEASE}" - msg_info "Starting ${APP} Service" - systemctl start ${APP} - msg_ok "Started ${APP} Service" + msg_info "Starting Service" + systemctl start snowflake-proxy + msg_ok "Started Service" msg_ok "Updated successfully!" else msg_ok "No update required. ${APP} is already at v${RELEASE}." diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh index f5b917ce5..4db5cb7fe 100644 --- a/install/tor-snowflake-install.sh +++ b/install/tor-snowflake-install.sh @@ -33,7 +33,7 @@ echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_ver msg_ok "Built Snowflake Proxy v${RELEASE}" msg_info "Creating Service" -cat </etc/systemd/system/${APP}.service +cat </etc/systemd/system/snowflake-proxy.service [Unit] Description=Snowflake Proxy Service Documentation=https://snowflake.torproject.org/ @@ -52,7 +52,7 @@ RestartSec=10 [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now ${APP} +systemctl enable -q --now snowflake-proxy msg_ok "Created Service" motd_ssh From 9de46cae2d8b5e42181c4360189f1330f3d6f5dd Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Mon, 29 Dec 2025 18:19:11 +0100 Subject: [PATCH 09/15] hardcode username instead of var --- ct/tor-snowflake.sh | 25 +++++++++++-------------- install/tor-snowflake-install.sh | 27 +++++++++++++-------------- 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index a3d97604d..1c63c4be5 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -15,8 +15,6 @@ var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" var_nesting="${var_nesting:-0}" -SNOWFLAKEUSER="snowflake" - header_info "$APP" variables color @@ -33,29 +31,28 @@ function update_script() { msg_ok "Updated Container OS" RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') - VERSION_FILE="/home/${SNOWFLAKEUSER}/.${APP}_version" - if [[ ! -f "${VERSION_FILE}" ]] || [[ "${RELEASE}" != "$(cat "${VERSION_FILE}")" ]]; then + if [[ ! -f "/home/snowflake/.${APP}_version" ]] || [[ "${RELEASE}" != "$(cat "/home/snowflake/.${APP}_version")" ]]; then systemctl stop snowflake-proxy msg_ok "Stopped Service" setup_go - msg_info "Updating ${APP} to v${RELEASE}" - $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" - $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tar -xzf snowflake.tar.gz" - $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && rm snowflake.tar.gz" - $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && rm -rf .${APP}" - $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && mv snowflake-v${RELEASE} .${APP}" - $STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~/.${APP}/proxy && go build -o snowflake-proxy ." - echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_version >/dev/null" - msg_ok "Updated ${APP} to v${RELEASE}" + msg_info "Updating Snowflake" + $STD sudo -H -u snowflake bash -c "cd ~ && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" + $STD sudo -H -u snowflake bash -c "cd ~ && tar -xzf snowflake.tar.gz" + $STD sudo -H -u snowflake bash -c "cd ~ && rm snowflake.tar.gz" + $STD sudo -H -u snowflake bash -c "cd ~ && rm -rf .${APP}" + $STD sudo -H -u snowflake bash -c "cd ~ && mv snowflake-v${RELEASE} .${APP}" + $STD sudo -H -u snowflake bash -c "cd ~/.${APP}/proxy && go build -o snowflake-proxy ." + echo "${RELEASE}" | sudo -H -u snowflake bash -c "cd ~ && tee .${APP}_version >/dev/null" + msg_ok "Updated Snowflake to v${RELEASE}" msg_info "Starting Service" systemctl start snowflake-proxy msg_ok "Started Service" msg_ok "Updated successfully!" else - msg_ok "No update required. ${APP} is already at v${RELEASE}." + msg_ok "No update required. Snowflake is already at v${RELEASE}." fi exit } diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh index 4db5cb7fe..df2caea6b 100644 --- a/install/tor-snowflake-install.sh +++ b/install/tor-snowflake-install.sh @@ -14,22 +14,21 @@ network_check update_os APP="tor-snowflake" -SNOWFLAKEUSER="snowflake" setup_go -msg_info "Creating ${SNOWFLAKEUSER} user" -useradd -m -r -s /usr/sbin/nologin -d /home/${SNOWFLAKEUSER} ${SNOWFLAKEUSER} -msg_ok "Created ${SNOWFLAKEUSER} user" +msg_info "Creating snowflake user" +useradd -m -r -s /usr/sbin/nologin -d /home/snowflake snowflake +msg_ok "Created snowflake user" msg_info "Building Snowflake" RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') -$STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" -$STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tar -xzf snowflake.tar.gz" -$STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && rm snowflake.tar.gz" -$STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && mv snowflake-v${RELEASE} .${APP}" -$STD sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~/.${APP}/proxy && go build -o snowflake-proxy ." -echo "${RELEASE}" | sudo -H -u ${SNOWFLAKEUSER} bash -c "cd ~ && tee .${APP}_version >/dev/null" +$STD sudo -H -u snowflake bash -c "cd ~ && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" +$STD sudo -H -u snowflake bash -c "cd ~ && tar -xzf snowflake.tar.gz" +$STD sudo -H -u snowflake bash -c "cd ~ && rm snowflake.tar.gz" +$STD sudo -H -u snowflake bash -c "cd ~ && mv snowflake-v${RELEASE} .${APP}" +$STD sudo -H -u snowflake bash -c "cd ~/.${APP}/proxy && go build -o snowflake-proxy ." +echo "${RELEASE}" | sudo -H -u snowflake bash -c "cd ~ && tee .${APP}_version >/dev/null" msg_ok "Built Snowflake Proxy v${RELEASE}" msg_info "Creating Service" @@ -42,10 +41,10 @@ Wants=network-online.target [Service] Type=simple -User=${SNOWFLAKEUSER} -Group=${SNOWFLAKEUSER} -WorkingDirectory=/home/${SNOWFLAKEUSER}/.${APP} -ExecStart=/home/${SNOWFLAKEUSER}/.${APP}/proxy/snowflake-proxy -verbose -unsafe-logging +User=snowflake +Group=snowflake +WorkingDirectory=/home/snowflake/.${APP} +ExecStart=/home/snowflake/.${APP}/proxy/snowflake-proxy -verbose -unsafe-logging Restart=always RestartSec=10 From 27227e11fbcfad134ebcd9ba72f6b21861c45f44 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Mon, 29 Dec 2025 18:51:54 +0100 Subject: [PATCH 10/15] fix: incomplete message block --- ct/tor-snowflake.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index 1c63c4be5..155e2163c 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -32,6 +32,7 @@ function update_script() { RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') if [[ ! -f "/home/snowflake/.${APP}_version" ]] || [[ "${RELEASE}" != "$(cat "/home/snowflake/.${APP}_version")" ]]; then + msg_info "Stopping Service" systemctl stop snowflake-proxy msg_ok "Stopped Service" From 8a10af959c40c3424e9e770a6949116c2174aeb1 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Mon, 29 Dec 2025 19:56:08 +0100 Subject: [PATCH 11/15] move app dir back to /opt/tor-snowflake --- ct/tor-snowflake.sh | 17 +++++++++-------- install/tor-snowflake-install.sh | 19 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index 155e2163c..929704417 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -31,7 +31,7 @@ function update_script() { msg_ok "Updated Container OS" RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') - if [[ ! -f "/home/snowflake/.${APP}_version" ]] || [[ "${RELEASE}" != "$(cat "/home/snowflake/.${APP}_version")" ]]; then + if [[ ! -f "/opt/tor-snowflake/version" ]] || [[ "${RELEASE}" != "$(cat "/opt/tor-snowflake/version")" ]]; then msg_info "Stopping Service" systemctl stop snowflake-proxy msg_ok "Stopped Service" @@ -39,13 +39,14 @@ function update_script() { setup_go msg_info "Updating Snowflake" - $STD sudo -H -u snowflake bash -c "cd ~ && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" - $STD sudo -H -u snowflake bash -c "cd ~ && tar -xzf snowflake.tar.gz" - $STD sudo -H -u snowflake bash -c "cd ~ && rm snowflake.tar.gz" - $STD sudo -H -u snowflake bash -c "cd ~ && rm -rf .${APP}" - $STD sudo -H -u snowflake bash -c "cd ~ && mv snowflake-v${RELEASE} .${APP}" - $STD sudo -H -u snowflake bash -c "cd ~/.${APP}/proxy && go build -o snowflake-proxy ." - echo "${RELEASE}" | sudo -H -u snowflake bash -c "cd ~ && tee .${APP}_version >/dev/null" + $STD bash -c "cd /opt && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" + $STD bash -c "cd /opt && tar -xzf snowflake.tar.gz" + $STD rm -rf /opt/snowflake.tar.gz + $STD rm -rf /opt/tor-snowflake + $STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake + $STD chown -R snowflake:snowflake /opt/tor-snowflake + $STD sudo -H -u snowflake bash -c "cd /opt/tor-snowflake/proxy && go build -o snowflake-proxy ." + echo "${RELEASE}" >/opt/tor-snowflake/version msg_ok "Updated Snowflake to v${RELEASE}" msg_info "Starting Service" diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh index df2caea6b..97f3fab95 100644 --- a/install/tor-snowflake-install.sh +++ b/install/tor-snowflake-install.sh @@ -13,8 +13,6 @@ setting_up_container network_check update_os -APP="tor-snowflake" - setup_go msg_info "Creating snowflake user" @@ -23,12 +21,13 @@ msg_ok "Created snowflake user" msg_info "Building Snowflake" RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') -$STD sudo -H -u snowflake bash -c "cd ~ && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" -$STD sudo -H -u snowflake bash -c "cd ~ && tar -xzf snowflake.tar.gz" -$STD sudo -H -u snowflake bash -c "cd ~ && rm snowflake.tar.gz" -$STD sudo -H -u snowflake bash -c "cd ~ && mv snowflake-v${RELEASE} .${APP}" -$STD sudo -H -u snowflake bash -c "cd ~/.${APP}/proxy && go build -o snowflake-proxy ." -echo "${RELEASE}" | sudo -H -u snowflake bash -c "cd ~ && tee .${APP}_version >/dev/null" +$STD bash -c "cd /opt && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" +$STD bash -c "cd /opt && tar -xzf snowflake.tar.gz" +$STD rm -rf /opt/snowflake.tar.gz +$STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake +$STD chown -R snowflake:snowflake /opt/tor-snowflake +$STD sudo -H -u snowflake bash -c "cd /opt/tor-snowflake/proxy && go build -o snowflake-proxy ." +echo "${RELEASE}" >/opt/tor-snowflake/version msg_ok "Built Snowflake Proxy v${RELEASE}" msg_info "Creating Service" @@ -43,8 +42,8 @@ Wants=network-online.target Type=simple User=snowflake Group=snowflake -WorkingDirectory=/home/snowflake/.${APP} -ExecStart=/home/snowflake/.${APP}/proxy/snowflake-proxy -verbose -unsafe-logging +WorkingDirectory=/opt/tor-snowflake/proxy +ExecStart=/opt/tor-snowflake/proxy/snowflake-proxy -verbose -unsafe-logging Restart=always RestartSec=10 From 7b20b0fead9d955829be475635121221ff5c2533 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Tue, 30 Dec 2025 10:23:28 +0100 Subject: [PATCH 12/15] simplify download commands --- ct/tor-snowflake.sh | 4 ++-- install/tor-snowflake-install.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index 929704417..cbfa18f13 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -39,8 +39,8 @@ function update_script() { setup_go msg_info "Updating Snowflake" - $STD bash -c "cd /opt && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" - $STD bash -c "cd /opt && tar -xzf snowflake.tar.gz" + $STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o /opt/snowflake.tar.gz + $STD tar -xzf /opt/snowflake.tar.gz -C /opt $STD rm -rf /opt/snowflake.tar.gz $STD rm -rf /opt/tor-snowflake $STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh index 97f3fab95..145580e82 100644 --- a/install/tor-snowflake-install.sh +++ b/install/tor-snowflake-install.sh @@ -21,8 +21,8 @@ msg_ok "Created snowflake user" msg_info "Building Snowflake" RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') -$STD bash -c "cd /opt && curl -fsSL 'https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz' -o snowflake.tar.gz" -$STD bash -c "cd /opt && tar -xzf snowflake.tar.gz" +$STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o /opt/snowflake.tar.gz +$STD tar -xzf /opt/snowflake.tar.gz -C /opt $STD rm -rf /opt/snowflake.tar.gz $STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake $STD chown -R snowflake:snowflake /opt/tor-snowflake From c4e5ce623d7ae965e25d42388f13109b091e85b9 Mon Sep 17 00:00:00 2001 From: KernelSailor Date: Tue, 30 Dec 2025 10:33:45 +0100 Subject: [PATCH 13/15] change version file location to /opt/tor-snowflake_version.txt --- ct/tor-snowflake.sh | 4 ++-- install/tor-snowflake-install.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index cbfa18f13..ae5086ef2 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -31,7 +31,7 @@ function update_script() { msg_ok "Updated Container OS" RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') - if [[ ! -f "/opt/tor-snowflake/version" ]] || [[ "${RELEASE}" != "$(cat "/opt/tor-snowflake/version")" ]]; then + if [[ ! -f "/opt/tor-snowflake_version.txt" ]] || [[ "${RELEASE}" != "$(cat "/opt/tor-snowflake_version.txt")" ]]; then msg_info "Stopping Service" systemctl stop snowflake-proxy msg_ok "Stopped Service" @@ -46,7 +46,7 @@ function update_script() { $STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake $STD chown -R snowflake:snowflake /opt/tor-snowflake $STD sudo -H -u snowflake bash -c "cd /opt/tor-snowflake/proxy && go build -o snowflake-proxy ." - echo "${RELEASE}" >/opt/tor-snowflake/version + echo "${RELEASE}" >/opt/tor-snowflake_version.txt msg_ok "Updated Snowflake to v${RELEASE}" msg_info "Starting Service" diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh index 145580e82..8ccb7f999 100644 --- a/install/tor-snowflake-install.sh +++ b/install/tor-snowflake-install.sh @@ -27,7 +27,7 @@ $STD rm -rf /opt/snowflake.tar.gz $STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake $STD chown -R snowflake:snowflake /opt/tor-snowflake $STD sudo -H -u snowflake bash -c "cd /opt/tor-snowflake/proxy && go build -o snowflake-proxy ." -echo "${RELEASE}" >/opt/tor-snowflake/version +echo "${RELEASE}" >/opt/tor-snowflake_version.txt msg_ok "Built Snowflake Proxy v${RELEASE}" msg_info "Creating Service" From bed6e8bc983115c619593ad89a5548fa35eeda5b Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Fri, 9 Jan 2026 13:34:35 +0100 Subject: [PATCH 14/15] Update release version output location --- install/tor-snowflake-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh index 8ccb7f999..24c4a564a 100644 --- a/install/tor-snowflake-install.sh +++ b/install/tor-snowflake-install.sh @@ -27,7 +27,7 @@ $STD rm -rf /opt/snowflake.tar.gz $STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake $STD chown -R snowflake:snowflake /opt/tor-snowflake $STD sudo -H -u snowflake bash -c "cd /opt/tor-snowflake/proxy && go build -o snowflake-proxy ." -echo "${RELEASE}" >/opt/tor-snowflake_version.txt +echo "${RELEASE}" >~/.tor-snowflake msg_ok "Built Snowflake Proxy v${RELEASE}" msg_info "Creating Service" From b26566d8f93f854fe3e6b6031005557f825b68a7 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Fri, 9 Jan 2026 13:36:26 +0100 Subject: [PATCH 15/15] Update snowflake version storage location --- ct/tor-snowflake.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index ae5086ef2..2125380b5 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -31,7 +31,7 @@ function update_script() { msg_ok "Updated Container OS" RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') - if [[ ! -f "/opt/tor-snowflake_version.txt" ]] || [[ "${RELEASE}" != "$(cat "/opt/tor-snowflake_version.txt")" ]]; then + if [[ ! -f "~/.tor-snowflake" ]] || [[ "${RELEASE}" != "$(cat "~/.tor-snowflake")" ]]; then msg_info "Stopping Service" systemctl stop snowflake-proxy msg_ok "Stopped Service" @@ -46,7 +46,7 @@ function update_script() { $STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake $STD chown -R snowflake:snowflake /opt/tor-snowflake $STD sudo -H -u snowflake bash -c "cd /opt/tor-snowflake/proxy && go build -o snowflake-proxy ." - echo "${RELEASE}" >/opt/tor-snowflake_version.txt + echo "${RELEASE}" >~/.tor-snowflake msg_ok "Updated Snowflake to v${RELEASE}" msg_info "Starting Service"