Skip to content

LxBox v2.20.11

Choose a tag to compare

@github-actions github-actions released this 17 Aug 02:02
· 2184 commits to main since this release

L×Box v2.20.11

Routing rules now travel between devices as a file: pick the rules, optionally
bundle the DNS servers and DNS rules they depend on, save or share. On the
receiving side a preview shows what will be added and what was healed. The
diagnostic dump also grew teeth — OOM snapshots now carry their full bodies, so
one upload is enough to open a heap profile.

Правила роутинга теперь переносятся между устройствами файлом: выбираете
правила, при желании вкладываете DNS-серверы и DNS-правила, от которых они
зависят, — сохраняете или отправляете. На принимающей стороне превью
показывает, что добавится и что было подлечено. Диагностический дамп заодно
поумнел: OOM-снимки уезжают в него целиком, и одной выгрузки хватает, чтобы
открыть heap-профиль.

🇬🇧 English

✨ Export and import routing rules

Until now a single rule could not leave the device. A full backup carried
everything at once and restored whole categories — useful for moving to a new
phone, useless for "here, take my Gemini rule".

The Routing screen's app bar grew a ⋮ menu, visible on the Rules tab:

Item What it does
Export rules... full-screen picker → save or share one JSON file
Import rules... pick a file → preview with checkboxes → add the chosen ones

Export starts with nothing selected — one tap on Select all if you mean all
of them. Saving reuses the sheet you know from backup: Save to file (system
save dialog), Save to Downloads, or Share.

The second step: DNS

A rule is often useless on its own. "Gemini via my own DNS" points at a DNS
server the recipient has never heard of. So after picking the rules there is a
second screen, Include DNS, with two sections — your DNS servers and your
DNS rules. Servers referenced by the selected rules that are not part of the
app's template are pre-checked: those are exactly the ones the recipient
would be missing. Everything else is off by default.

Preset-backed servers are deliberately absent from that list. The app creates
and removes them itself when a preset is enabled, so they arrive with the
preset, not with the file.

What happens on import

The file is data from another device, so nothing is trusted blindly. The
preview names every repair before you confirm:

In the file On import
Channel that does not exist here switched to vpn-1, rule arrives disabled, warning shown
DNS server that does not exist here DNS option turned off (Force IPv4 survives), warning shown
Resolver that does not exist here reset to auto
.srs rule arrives disabled — tap ☁ to download, then enable
Preset unknown to this version rejected with a reason, the rest still imports
An entry of an unknown kind skipped, the rest still imports
DNS server/rule you already have greyed out as "Already on this device" — your settings are never overwritten

Identity is regenerated on arrival, so importing the same file twice makes
copies ( (2) in the name) instead of colliding. A rule and the DNS server it
needs, travelling in one file, are linked without any healing at all.

A backup file offered to the rule importer (or a rules file offered to backup
restore) is rejected with a message that says where it actually belongs.

🔧 Under the hood

Core updated to sing-box-lx v1.14.0-lx.27-rc.2. The fix that matters:
a dead detour node no longer freezes the network machinery (SPEC 070/071). Also
an upstream sync to beta.15 and Go 1.26.6.

This is the first lx.2x bump that is not API-neutral — PlatformInterface
gained a cancelNotification method, so the Android side now implements it:
cancelling addresses the same notification id that sendNotification posts.
Everything else the core added is new surface (Taildrop bindings from upstream,
an interface gateway field); a javap sweep over the 228 pre-existing classes
shows zero removals, so nothing existing changed shape.

OOM snapshots now carry their bodies. A field dump showed 514–552 MB RSS
against a 136–178 MB Go heap — three quarters of the memory lived outside the
heap, and the dump had nothing to say about where. The answer was sitting on
the device the whole time, in files that only a per-snapshot manual share could
reach. Asking a non-technical reporter for one more round-trip per snapshot
does not work in practice.

The five freshest snapshots now travel whole: metadata.json,
connections.json and configuration.json verbatim, the tail of go.log
capped at 64 KB (the OOM moment is at the end), and the pprof profiles as
gzip + base64. Older snapshots keep the summary they always had.

Reading a profile back from a dump:

jq -r '.oom_reports[0].files["heap.pb"].data' dump.json | base64 -d | gunzip > heap.pb
go tool pprof heap.pb

The cost is about 1–1.3 MB of base64 on top of a ~2 MB dump. Files this version
does not recognise are carried through binary-safe rather than dropped, so a
future core bump cannot silently lose evidence.

🧪 Tests

flutter analyze, 3050 tests and all six checkers (four l10n + docs parity)
pass. The export/import flow was exercised on an emulator end to end: export
with DNS bundled, the file inspected on disk, then re-imported — including the
"already on this device" path. The core bump was verified on the same
emulator: the tunnel comes up, traffic flows through it, and the stop is
clean.

🇷🇺 Русский

✨ Экспорт и импорт правил роутинга

До сих пор отдельное правило не могло покинуть устройство. Полный бэкап тащил
всё сразу и восстанавливал целыми категориями — годится для переезда на новый
телефон, но не для «на, забери моё правило для Gemini».

В шапке экрана «Маршрутизация» появилось меню ⋮, видимое на вкладке
«Правила»:

Пункт Что делает
Экспортировать правила… полноэкранный выбор → сохранение или отправка одного JSON-файла
Импортировать правила… выбор файла → превью с галочками → добавление выбранного

Экспорт стартует с пустым выбором — один тап по «Выбрать все», если нужны
все. Сохранение переиспользует знакомый по бэкапу шит: «Сохранить в файл»
(системный диалог), «В Загрузки» или «Поделиться».

Второй шаг: DNS

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

Серверов, которые создают пресеты, в этом списке намеренно нет. Приложение
заводит и убирает их само при включении пресета — они приедут вместе с
пресетом, а не с файлом.

Что происходит при импорте

Файл — данные с чужого устройства, поэтому на слово никому не верим. Превью
называет каждую правку до подтверждения:

В файле При импорте
Канал, которого здесь нет заменяется на vpn-1, правило приезжает выключенным, показано предупреждение
DNS-сервер, которого здесь нет DNS-опция выключается (Force IPv4 переживает), показано предупреждение
Резолвер, которого здесь нет сбрасывается в авто
Правило с .srs приезжает выключенным — нажмите ☁, чтобы скачать, затем включите
Пресет, неизвестный этой версии отклоняется с причиной, остальное импортируется
Запись неизвестного вида пропускается, остальное импортируется
DNS-сервер или правило, которые уже есть серые, «Уже есть на этом устройстве» — ваши настройки не перезаписываются

Идентификатор при импорте выдаётся новый, поэтому повторный импорт того же
файла создаёт копии (« (2)» в имени), а не конфликтует. Правило и нужный ему
DNS-сервер, приехавшие одним файлом, связываются вообще без лечения.

Файл бэкапа, скормленный импорту правил (и наоборот, файл правил —
восстановлению бэкапа), отклоняется с сообщением, куда его нести на самом
деле.

🔧 Под капотом

Ядро обновлено до sing-box-lx v1.14.0-lx.27-rc.2. Главное в нём: мёртвый
detour-узел больше не замораживает сетевую машинерию (SPEC 070/071). Плюс
синхронизация с апстримом beta.15 и Go 1.26.6.

Это первый бамп в линейке lx.2x, который не нейтрален к API: в
PlatformInterface появился метод cancelNotification, и Android-сторона его
теперь реализует — отмена адресуется тому же id уведомления, который ставит
sendNotification. Остальное, что принесло ядро, — новая поверхность
(Taildrop-биндинги из апстрима, поле шлюза у сетевого интерфейса); обход
javap по 228 прежним классам показывает ноль удалений, так что ничего
существующего не поменяло форму.

OOM-снимки уезжают в дамп целиком. Присланный дамп показывал 514–552 МБ
RSS против 136–178 МБ Go-кучи — три четверти памяти жили вне кучи, и сказать,
где именно, дампу было нечем. Ответ всё это время лежал на устройстве, в
файлах, до которых можно было добраться только выгрузкой каждого снимка
вручную. Просить нетехнического человека сделать ещё один заход на каждый
снимок на практике не работает.

Теперь пять свежайших снимков едут полностью: metadata.json,
connections.json и configuration.json целиком, хвост go.log до
64 КБ (момент OOM — в конце) и pprof-профили как gzip + base64. У более
старых снимков остаётся прежняя сводка.

Как прочитать профиль обратно:

jq -r '.oom_reports[0].files["heap.pb"].data' dump.json | base64 -d | gunzip > heap.pb
go tool pprof heap.pb

Цена — около 1–1,3 МБ base64 поверх дампа в ~2 МБ. Файлы, которых эта версия
не знает, переносятся бинарно, а не отбрасываются: бамп ядра не должен молча
терять улики.

🧪 Тесты

flutter analyze, 3050 тестов и все шесть чекеров (четыре l10n + parity
документации) проходят. Экспорт-импорт прогнан на эмуляторе от начала до
конца: экспорт с вложенным DNS, осмотр файла на диске, обратный импорт —
включая ветку «уже есть на этом устройстве». Бамп ядра проверен там же:
туннель поднимается, трафик через него идёт, стоп чистый.


Install / Установка

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

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

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


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