Repository navigation
Как задать свой I1 в AmneziaWG: флаг --i1 (v6.1.0, v6.1.1) / How to set your own I1 in AmneziaWG: the --i1 flag (v6.1.0, v6.1.1) #370
bivlked
announced in
Announcements
Replies: 0 comments
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.1.0 и v6.1.1 установщика AmneziaWG. Главная новость - флаг
--i1. С ним маскирующий пакетI1(клиент отправляет его перед рукопожатием, чтобы начало соединения было похоже на другой протокол) можно задать своим значением прямо при установке. Раньше для этого приходилось руками правитьawg0.confи перевыпускать профили. Просил об этом @sasha3003 ещё в #196.Как это выглядит
По умолчанию установщик кладёт в
I1пакет в форме ответа DNS. Если нужна другая форма, например QUIC:sudo bash ./install_amneziawg.sh --i1='<строка I1>'Строку под QUIC удобно взять из Mini QUIC Generator: впишите SNI и скопируйте поле «AmneziaWG 1.5+ (I1 = )». Я прогнал генератор с несколькими SNI: строки выходят на 53-99 байт и проходят проверку флага без правок. Где форма QUIC помогала, а где нет, я записал по своему полевому тесту в ADVANCED.
Что важно знать:
<b 0xHEX>,<r N>,<rc N>,<rd N>и<t>, записанные вплотную, без пробелов, длины от 1 до 1000, весь пакет не больше 1024 байт. Эти теги понимают и модуль ядра, и amneziawg-go;<c>не пройдёт: amneziawg-go, на котором работают приложения для Android, iPhone, Mac и Windows, такой профиль не загрузит;--no-cps,--preset,--mobile,--jc,--jminи--jmax, об этом установщик предупредит;--force --i1='...'меняет толькоI1, остальные параметры остаются прежними. Клиентам после этого нужны новые профили:sudo bash /root/awg/manage_amneziawg.sh regen, потом заново импортировать их на устройствах.Что ещё изменилось
install_amneziawg.logпопадают последние 40 строк вывода apt и код ошибки, спасибо @dev1010111 за #368. Если на сервере сломан DNS, установщик так и скажет, а не спишет всё на недоступный Launchpad. Сборка модуля 2.0 из исходника больше не ждёт логина от git.--jcтеперь не больше 122 (v6.0.1). Клиенты на amneziawg-go отправляют junk-пакеты,I1-I5и рукопожатие одной пачкой на 128 пакетов, и при большемJcпервое рукопожатие у них не проходит. Если на вашем сервереJc127 или больше,checkэто покажет и подскажет, как его снизить, не трогая остальное.y: Enter её отменяет.RandomTrailers(v6.1.0). При широких диапазонахH1-H3часть пакетов данных может приниматься за рукопожатие и теряться. В профиле 3.1, который ставит установщик, таких потерь почти нет.Установка как раньше:
Полные списки изменений: v6.1.1, v6.1.0, v6.0.1.
v6.1.0 and v6.1.1 of the AmneziaWG installer are out. The headline is the
--i1flag. It lets you set theI1concealment packet (the client sends it before the handshake so the start of the connection looks like some other protocol) to your own value right at install time. Before, that meant editingawg0.confby hand and reissuing profiles. @sasha3003 asked for this back in #196.What it looks like
By default the installer puts a DNS-response-shaped packet into
I1. If you want a different shape, QUIC for example:sudo bash ./install_amneziawg_en.sh --i1='<your I1 string>'An easy source for a QUIC string is Mini QUIC Generator: type in an SNI and copy the "AmneziaWG 1.5+ (I1 = )" field. I ran the generator with several SNIs: the strings come out at 53-99 bytes and pass the flag's check as they are. Where the QUIC shape helped and where it did not is in my field test in ADVANCED.
Good to know:
<b 0xHEX>,<r N>,<rc N>,<rd N>and<t>, written back to back with no spaces, lengths 1 to 1000, the whole packet at most 1024 bytes. Both the kernel module and amneziawg-go understand these;<c>is refused: amneziawg-go, which the Android, iPhone, Mac and Windows apps run on, will not load such a profile;--no-cps,--preset,--mobile,--jc,--jminand--jmaxreset it, and the installer warns you when that happens;--force --i1='...'changes onlyI1and leaves the other parameters alone. Clients then need new profiles:sudo bash /root/awg/manage_amneziawg.sh regen, then import them on the devices again.What else changed
install_amneziawg.log. Thanks to @dev1010111 for #368. If DNS is broken on the server itself, the installer says so instead of blaming an unreachable Launchpad. Building the 2.0 module from source no longer sits waiting for a git login.--jcis now capped at 122 (v6.0.1). Clients on amneziawg-go send the junk packets,I1-I5and the handshake in one batch of 128 packets, and with a largerJctheir first handshake fails. If your server hasJcof 127 or more,checkshows it and tells you how to lower it without touching anything else.y: Enter cancels it.RandomTrailersoff (v6.1.0). With wideH1-H3ranges, some data packets can be mistaken for handshake packets and dropped. The 3.1 profile the installer sets up has almost none of these losses.Installing is the same as before:
Full lists of changes: v6.1.1, v6.1.0, v6.0.1.
All reactions