Эти рекомендации помогут настроить автономный прокси Snowflake на сервере для помощи пользователям, ограниченным цензурой, подключаться к сети Tor.
Единственным требованием является подключение к Интернету, однако одним из основных преимуществ автономных прокси Snowflake является то, что они могут быть установлены на серверах и предлагают более высокую пропускную способность и более надежный вариант для пользователей за ограничительными NAT и брандмауэрами.
Поэтому мы особенно рекомендуем:
- подключение к Интернету 24/7
- Full cone NAT (вы можете использовать этот инструмент, чтобы проверить тип вашего NAT.
Свойства, которые вы ищете, – это независимое от адреса сопоставление и либо независимая от адреса, либо зависимая от адреса фильтрация)
- A server behind no or unrestricted NAT, with incoming UDP on the whole port range of
cat /proc/sys/net/ipv4/ip_local_port_range
open (or the range set using the optional -ephemeral-ports-range
flag).
Существует несколько способов настройки и запуска автономного прокси-сервера Snowflake.
Настройка Docker
Для начала необходимо установить Docker и docker-compose.
У нас есть Docker image, чтобы упростить настройку прокси-сервера Snowflake.
Сначала скачайте docker-compose.yml.
Затем разверните прокси-сервер, выполнив:
docker-compose up -d snowflake-proxy
После этого вы увидите следующее:
Creating snowflake-proxy ... done
ваш прокси запущен и работает!
Ansible
Теперь есть Ansible-роль для установки прокси Snowflake на Debian, Fedora, Arch Linux, FreeBSD и Ubuntu, созданная Jacobo Nájera.
Следуйте инструкциям, чтобы запустить Snowflake с Ansible.
Компиляция и запуск из исходного кода
First you will need to install and configure the Go compiler to build the standalone proxy from source code.
Please login using a user account with sudo
rights or directly with root
(in the later case omit the sudo
part in the following commands).
If you are running Ubuntu or Debian, you can install Go by executing sudo apt install golang
.
If you are using Fedora, Red Hat or Amazon Linux with sudo yum install golang
or sudo dnf install golang
.
В противном случае посетите https://golang.org/dl/.
You will need Go 1.15 or newer to run the Snowflake proxy.
You can check your installed version using the command go version
.
Second you need the git client to download the Snowflake source code.
Please login using a user account with sudo
rights or directly with root
(in the later case omit the sudo
part of the following commands).
If you are running Ubuntu or Debian, you can install git by executing sudo apt install git
.
If you are using Fedora, Red Hat or Amazon Linux with sudo yum install git
or sudo dnf install git
.
Otherwise consult the documentation for your operating system.
Please execute the following steps with the user account under which the proxy should be executed.
Don't use root
.
It's recommended to create a separate snowflake
account with restricted rights on the system.
Clone the source code.
git clone https://git.torproject.org/pluggable-transports/snowflake.git
Build the Snowflake proxy.
cd snowflake/proxy
go build
Run the Snowflake proxy.
nohup ./proxy &
If you want to save the proxy output to a logfile, you can use:
nohup ./proxy >snowflake.log 2>&1 &
Make sure the proxy is started after a reboot of the system:
crontab -e
Enter the following line (example, adapt paths to your situation)
@reboot nohup /home/snowflake/snowflake/proxy/proxy > /home/snowflake/snowflake/proxy/snowflake.log 2>&1 &
Please verify if this is working by rebooting the system and checking the log.
On some Linux installations this might not work.
To keep your snowflake proxy updated, execute the following commands every few weeks (login with the user account you used during installing the proxy):
kill -9 $(pidof proxy)
cd snowflake/
git pull
cd proxy
go build
nohup ./proxy >snowflake.log 2>&1 &