This guide will walk you through the installation, operation, and maintenance of Snowflake proxy on Linux-based systems. Running a Snowflake proxy is an easy way to contribute to the Tor Project's anti-censorship efforts.

1. Install Go

First you will need to install and configure the Go compiler to build the standalone proxy from source code. Пожалуйста, войдите в систему, используя учетную запись пользователя с правами sudo или напрямую с root (в последнем случае опустите часть sudo в следующих командах).

Если вы работаете на Ubuntu или Debian, вы можете установить Go при помощи команды sudo apt install golang. Если вы используете Fedora, Red Hat или Amazon Linux, используйте sudo yum install golang или sudo dnf install golang.

You will need Go 1.21 or newer to run the Snowflake proxy. Please check your Go version by using the command go version. Otherwise download Go binary from the official website and follow its installation instructions.

2. Install git and clone Snowflake repository

Second you need the git client to download the Snowflake source code.

Если вы работаете на Ubuntu или Debian, вы можете установить git при помощи команды sudo apt install git. Если вы используете Fedora, Red Hat или Amazon Linux, используйте sudo yum install git или sudo dnf install git. В случае использования другого дистрибутива обратитесь к документации по используемому пакетному менеджеру.

Please execute the following steps with the user account under which the proxy should be executed. Не используйте root.

Мы рекомендуем создать отдельного пользователя snowflake с ограниченными правами.

Open your terminal and clone the source code:

git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git

3. Build Snowflake proxy

After you cloned the repository, you can build Snowflake proxy binary by running the command:

cd snowflake/proxy
go build

4. Run the Snowflake proxy

After your proxy finished to compile, you can run it with the command:

nohup ./proxy &

Note: The command nohup allows the program to run in the background even after the terminal is closed, and & puts the command in the background immediately.

If you want to save the proxy output to a logfile, for example, to see your proxy usage, you can use:

nohup ./proxy >snowflake.log 2>&1 &

5. Make sure the proxy is started after a reboot of the system

Edit your crontab by running the command:

crontab -e

Введите следующую строку (пример, измените путь в соответствии с настройкам вашей системы)

@reboot nohup /home/snowflake/snowflake/proxy/proxy > /home/snowflake/snowflake/proxy/snowflake.log 2>&1 &

Пожалуйста, проверьте, что это сработало: перезагрузите систему и проверьте логи. Note: On some Linux installations this might not work.

6. Keep your Snowflake proxy updated

Для поддержания актуальности прокси snowflake, периодически выполняйте предложенные команды раз в несколько недель под аккаунтом, использованным во время установки прокси:

kill -9 $(pidof proxy)
cd snowflake/
git pull
cd proxy
go build
nohup ./proxy >snowflake.log 2>&1 &