Skip to content

LxBox v2.20.12

Choose a tag to compare

@github-actions github-actions released this 18 Aug 01:49
· 2179 commits to main since this release

L×Box v2.20.12

A field check of the new rule exchange found a bad one: the "Traffic
processing" preset could be exported, and after import it appeared twice —
with no way to delete the copy. Presets are now out of the exchange entirely,
name duplicates are refused instead of being renamed, and DNS can be exported
on its own.

Полевая проверка нового обмена правилами нашла неприятность: пресет
«Обработка трафика» можно было экспортировать, а после импорта он
задваивался — и удалить копию не получалось. Теперь пресеты в обмене не
участвуют вовсе, дубли по имени отклоняются вместо переименования, а DNS
можно выгрузить отдельно.

🇬🇧 English

🐛 The duplicate that would not die

Exporting a rule file could include a preset — "Traffic processing",
"Block ads" and the like. On import a second copy was added, and from there it
could not be removed: deleting one left the other, deleting both brought one
straight back.

That was the app defending an invariant. "Traffic processing" carries sniff
and hijack-dns, which have to be the first entry in route.rules — otherwise
the domain is never extracted before routing matches. So the app re-creates the
preset whenever it is missing, and it checks by preset id: with two copies
present the check was satisfied, and with none it seeded one back.

The bug was not the invariant. It was that the import allowed a second copy at
all.

Presets are out of the exchange now — no export, no import. A preset is a
reference into the app's own template, so every recipient already has it;
transferring it moves nothing. This mirrors the decision already made for
preset-backed DNS servers, which never appeared in the DNS step either.

An already-duplicated list repairs itself: open the Routing screen once and the
extra copy is gone. The one that survives is the last of the pair — the one
that arrived from the file, i.e. the more recent intent. Nothing else in the
list is touched, and a preset you delete on purpose still comes back only if it
was the only one, exactly as before.

🔁 No more name duplicates

Importing a rule whose visible name was already taken used to add it as
"My rule (2)". Two rules with near-identical names are hard to tell apart and
harder to clean up, so the suffix is gone.

A name clash is now refused, the same way DNS entries already behaved: the row
is greyed out as "Already on this device" and its checkbox cannot be
ticked. This also covers a file that carries two rules of the same name — the
first is accepted, the second is refused.

📤 Export DNS on its own

The Continue button on the first export step no longer requires a rule
selection. Leave everything unticked, go to Include DNS, pick the servers
and DNS rules you want, and the file carries just those. An empty file is
never produced: with nothing selected anywhere, the export button stays
disabled.

🧪 Tests

flutter analyze, 3051 tests and all six checkers pass. The fixes were checked
on an emulator against the storage that produced the report: the duplicated
preset collapsed to one on the first screen open, presets no longer appear in
the export picker, and Continue is active with nothing selected.

🇷🇺 Русский

🐛 Дубль, который не удалялся

В файл экспорта мог попасть пресет — «Обработка трафика», «Блокировка
рекламы» и подобные. При импорте добавлялась вторая копия, и убрать её не
получалось: удаляешь одну — остаётся вторая, удаляешь обе — одна тут же
появляется снова.

Так приложение защищало инвариант. «Обработка трафика» несёт sniff и
hijack-dns, которые обязаны быть первым элементом route.rules — иначе
домен не извлечётся до матчинга роутинга. Поэтому приложение пересоздаёт
пресет, если его нет, а проверяет по идентификатору пресета: при двух копиях
проверка была довольна, при нуле — засевала одну обратно.

Баг был не в инварианте. Баг в том, что импорт вообще позволил создать вторую
копию.

Теперь пресеты вне обмена — ни экспорта, ни импорта. Пресет это ссылка на
шаблон самого приложения, у любого получателя он уже есть; переносить нечего.
Это то же решение, что уже действовало для DNS-серверов из пресетов — они и
раньше не показывались на шаге DNS.

Уже задвоенный список чинится сам: достаточно открыть экран «Маршрутизация»,
и лишняя копия исчезнет. Останется последняя из пары — та, что приехала из
файла, то есть более свежее намерение. Остального списка это не касается, а
намеренно удалённый пресет по-прежнему возвращается только если он был
единственным — ровно как раньше.

🔁 Больше никаких дублей по имени

Правило, чьё видимое имя уже занято, при импорте добавлялось как «Моё правило
(2)». Два правила с почти одинаковыми именами трудно различать и ещё труднее
разгребать, поэтому суффикс убран.

Совпадение имени теперь отклоняется — так же, как это давно делали DNS-записи:
строка серая, с подписью «Уже есть на этом устройстве», галочку поставить
нельзя. Это же покрывает файл с двумя одноимёнными правилами внутри: первое
принимается, второе отклоняется.

📤 Экспорт одного только DNS

Кнопка «Продолжить» на первом шаге экспорта больше не требует выбранных
правил. Оставьте всё снятым, перейдите на шаг «Добавить DNS», отметьте
нужные серверы и DNS-правила — и в файле будут только они. Пустой файл при
этом не создаётся: если не выбрано вообще ничего, кнопка экспорта серая.

🧪 Тесты

flutter analyze, 3051 тест и все шесть чекеров проходят. Фиксы проверены на
эмуляторе на том самом storage, из-за которого пришла жалоба: задвоенный
пресет схлопнулся в один при первом открытии экрана, пресеты пропали из списка
экспорта, «Продолжить» активна при пустом выборе.


Install / Установка

adb install -r LxBox-v2.20.12-arm64-v8a.apk

Без uninstall! Поверх существующей установки. Настройки и подписки сохранятся.

No uninstall needed — install over the existing one. Settings and
subscriptions are preserved.


Previous release / Предыдущий релиз: v2.20.11.