From 72e0ac5cf72723fa6ca30560f49515410ae5a4e7 Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 09:07:32 +0200 Subject: [PATCH] tor-snowflake (#15684) * Add tor-snowflake (ct) * Change default var_arm64 value from 'no' to 'yes' * Remove empty line in tor-snowflake.sh * Change to helper function * Update tor-snowflake-install.sh * Update tor-snowflake.sh * license --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com> Co-authored-by: michel.roegl-brunner@htl-braunau.at --- ct/headers/tor-snowflake | 6 +++ ct/tor-snowflake.sh | 64 ++++++++++++++++++++++++++++++++ install/tor-snowflake-install.sh | 47 +++++++++++++++++++++++ 3 files changed, 117 insertions(+) create mode 100644 ct/headers/tor-snowflake create mode 100644 ct/tor-snowflake.sh create mode 100644 install/tor-snowflake-install.sh diff --git a/ct/headers/tor-snowflake b/ct/headers/tor-snowflake new file mode 100644 index 000000000..22dc480c3 --- /dev/null +++ b/ct/headers/tor-snowflake @@ -0,0 +1,6 @@ + __ ______ __ + / /_____ _____ _________ ____ _ __/ __/ /___ _/ /_____ + / __/ __ \/ ___/_____/ ___/ __ \/ __ \ | /| / / /_/ / __ `/ //_/ _ \ +/ /_/ /_/ / / /_____(__ ) / / / /_/ / |/ |/ / __/ / /_/ / ,< / __/ +\__/\____/_/ /____/_/ /_/\____/|__/|__/_/ /_/\__,_/_/|_|\___/ + diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh new file mode 100644 index 000000000..ada23afeb --- /dev/null +++ b/ct/tor-snowflake.sh @@ -0,0 +1,64 @@ +#!/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="${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_arm64="${var_arm64:-yes}" +var_unprivileged="${var_unprivileged:-1}" +var_nesting="${var_nesting:-0}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + msg_info "Updating Container OS" + $STD apt update + $STD apt upgrade -y + msg_ok "Updated Container OS" + + if [[ ! -d /opt/tor-snowflake ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if GITLAB_URL="https://gitlab.torproject.org" check_for_gl_release "tor-snowflake" "tpo/anti-censorship/pluggable-transports/snowflake"; then + msg_info "Stopping Service" + systemctl stop snowflake-proxy + msg_ok "Stopped Service" + + CLEAN_INSTALL=1 GITLAB_URL="https://gitlab.torproject.org" fetch_and_deploy_gl_release "tor-snowflake" "tpo/anti-censorship/pluggable-transports/snowflake" "tarball" + + msg_info "Building Snowflake" + cd /opt/tor-snowflake/proxy + $STD go build -o snowflake-proxy . + msg_ok "Built Snowflake" + + msg_info "Starting Service" + systemctl start snowflake-proxy + msg_ok "Started Service" + msg_ok "Updated successfully!" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" + diff --git a/install/tor-snowflake-install.sh b/install/tor-snowflake-install.sh new file mode 100644 index 000000000..2e540648b --- /dev/null +++ b/install/tor-snowflake-install.sh @@ -0,0 +1,47 @@ +#!/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 + +setup_go + +msg_info "Building Snowflake" +GITLAB_URL="https://gitlab.torproject.org" fetch_and_deploy_gl_release "tor-snowflake" "tpo/anti-censorship/pluggable-transports/snowflake" "tarball" +cd /opt/tor-snowflake/proxy +$STD go build -o snowflake-proxy . +msg_ok "Built Snowflake Proxy" + +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 +WorkingDirectory=/opt/tor-snowflake/proxy +ExecStart=/opt/tor-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