Repository navigation
AmneziaWG 3.1 по умолчанию: какие клиенты нужны и что с уже работающим сервером (v6.0.0) / AmneziaWG 3.1 by default #359
bivlked
announced in
Announcements
Replies: 1 comment 1 reply
а почему надо переустанавливать полностью, а не просто профили перегенироровать? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
English version below
Вышел v6.0.0. Теперь новая установка сразу ставит AmneziaWG 3.1. Команда та же, флаги не нужны:
Главное в 3.1 - шифрование заголовков (
HeaderProtectionKey, у каждой установки свой ключ). Раньше по заголовку было видно, что это за пакет, теперь нет. Ещё к пакетам данных добавляется паддинг (ContentPaddingAddition), аJc,S1-S4иI1остаются. В документации Amnezia теперь прямо советуют переходить на 3.1, потому что «AmneziaWG 2.0, как и AmneziaWG 1.5, стал уязвим к блокировкам» (docs.amnezia.org). Одна оговорка: если мобильный оператор блокирует сам адрес сервера, новое поколение от этого не спасёт.RandomTrailersиDisableCookiesя в профиль не включал. Первый вместе с остальной обфускацией в моём замере срезал скорость примерно в сто раз, второй убирает защиту от флуда рукопожатиями. Из чего состоит профиль и почему: ADVANCED.Если сервер уже стоит
Сам на 3.1 он не перейдёт: обновление скриптов поколение не меняет. Перейти можно только переустановкой, то есть
--uninstallи установка заново, а всем клиентам придётся выдать новые профили. Бэкап перед этим лучше скачать к себе. Какое поколение стоит сейчас, покажетsudo bash /root/awg/manage_amneziawg.sh check.Какие клиенты понимают 3.1
имя.png;vpn://.Остальные клиенты, роутеры и сторонние приложения есть в таблице.
13 октября я проверял сервер с профилем 3.1 с телефона на Android (AmneziaWG и WG Tunnel) и с Windows (AmneziaWG). На Android оба клиента переподключались меньше чем за секунду, когда телефон уходил с Wi-Fi на мобильную сеть. iPhone и Mac в ту проверку не попали.
Когда нужен 2.0
Клиент без поддержки 3.1 к такому серверу не подключится, причём ошибку может и не показать. Это роутеры на стоковой прошивке (стабильный KeeneticOS, OpenWrt со старым пакетом amneziawg), Hiddify и приложения, которые понимают только 2.0. Если у вас есть такие, ставьте сервер сразу с
--protocol=2.0: потом поколение меняется только переустановкой.На ARM и на ядрах до 6.7 (например, штатный Debian 12) установщик пока сам ставит 2.0, потому что с 3.1 эти платформы ещё не проверены. Причину он пишет в итоговом отчёте. Подробнее.
Что ещё в v6.0.0
awg-quick) в режимах маршрутизации 2 и 3: адрес сервера больше не попадает в AllowedIPs, если вEndpointуказан IPv4-адрес. Симптом был такой: рукопожатие есть, а трафика нет. Уже выданные профили исправитmanage regenна обновлённых скриптах, после этого их нужно заново импортировать на устройствах.checkиdiagnoseподскажут, касается ли это его и что сделать.checkиdiagnoseпредупреждают, если на машине без ограничений разрешены пространства имён пользователей (в Debian так по умолчанию): через них параметры модулю ядра может передать обычный пользователь. В предупреждении есть и командаsysctl, которая это закрывает. Подробнее.Если пропустили v5.37.1 (4 октября): на ядрах 7.0.0-38 (Ubuntu 26.04 и HWE-ядро Ubuntu 24.04) установщик сам накладывает правку на исходник модуля и собирает его, а для уже стоящего сервера есть
--repair-module.Подробнее о 3.1 в README, полный список изменений в release notes.
v6.0.0 is out. A fresh install now sets up AmneziaWG 3.1 right away. The command is the same, no flags needed:
The main thing in 3.1 is header encryption (
HeaderProtectionKey, a separate key for every install). Before, the header showed what kind of packet it was. Now it does not. Data packets also get extra padding (ContentPaddingAddition), andJc,S1-S4andI1stay. The Amnezia docs now recommend moving to 3.1 outright, because "AmneziaWG 2.0, like AmneziaWG 1.5, has become vulnerable to blocking" (docs.amnezia.org). One caveat: if a mobile carrier blocks the server's address itself, a new protocol generation will not help with that.I left
RandomTrailersandDisableCookiesout of the profile. Combined with the rest of the obfuscation, the first one cut throughput roughly a hundredfold in my measurement. The second removes the protection against handshake floods. What the profile contains and why: ADVANCED.If your server is already running
It will not move to 3.1 by itself: updating the scripts does not change the generation. The only way over is a reinstall, meaning
--uninstalland a fresh install, and every client then needs a new profile. Download a backup to your own machine first.sudo bash /root/awg/manage_amneziawg.sh checkshows which generation the server runs now.Which clients understand 3.1
name.pngQR code;vpn://.Other clients, routers and third-party apps are in the table.
On 13 October I tested a server with the 3.1 profile from an Android phone (AmneziaWG and WG Tunnel) and from Windows (AmneziaWG). On Android both clients reconnected in under a second when the phone moved from Wi-Fi to mobile data. iPhone and Mac were not part of that check.
When you need 2.0
A client without 3.1 support will not connect to such a server, and it may not even show an error. That means routers on stock firmware (stable KeeneticOS, OpenWrt with an old amneziawg package), Hiddify and apps that only understand 2.0. If you have any of these, install the server with
--protocol=2.0from the start: later the generation changes only through a reinstall.On ARM and on kernels older than 6.7 (a stock Debian 12, for example) the installer picks 2.0 by itself for now, because these platforms have not been checked with 3.1 yet. It gives the reason in the final report. Details.
Also in v6.0.0
awg-quick) in routing modes 2 and 3: the server's address no longer ends up in AllowedIPs whenEndpointis an IPv4 address. The symptom was a handshake with no traffic. Profiles issued earlier are fixed bymanage regenon the updated scripts; after that, import them on the devices again.checkanddiagnosetell you whether it is affected and what to do.checkanddiagnosewarn when the host allows unrestricted user namespaces (the Debian default): through them an ordinary user can pass parameters to the kernel module. The warning includes thesysctlcommand that closes this off. Details.If you missed v5.37.1 (4 October): on 7.0.0-38 kernels (Ubuntu 26.04 and the Ubuntu 24.04 HWE kernel) the installer patches the module source and builds it by itself, and a server that is already installed has
--repair-module.More on 3.1 in the README, the full list of changes in the release notes.
All reactions