diff --git a/CHANGELOG.md b/CHANGELOG.md index 8eeece3..4f4497e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,14 @@ Versions after 2.17 are `MAJOR.MINOR.PATCH` (2.17 is followed by 2.17.1 or 2.18. `docs/testing.md`, "Versions and releases"); the headings below keep the numbers as they were released. +## 2.28.0 — 2026-11-22 + +- camex 5.2.1 in the tunnel (#298). Settings has a new **Network name** field (hidden, with + **Show the key**): with a network name the server's public key and the pre-shared key may + stay empty, the server is checked by the name. An empty MTU is now 1420 over UDP and 1500 + over TCP (an explicit MTU and the server's still win). The library is camex's client + profile, without the server. The protocol stays compatible with camex 4.x servers. + ## 2.27.4 — 2026-11-21 - camex 4.4.1 in the tunnel (#296): Decoder no longer takes the device's one VPN from another diff --git a/README.md b/README.md index 91a3880..2011f94 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Every item, the remote, sharing a URL from another app and **Reset**: [Usage](do ## Network (a tunnel to the cameras) -Decoder has a tunnel built in, [OpenIPC camex](https://github.com/OpenIPC/camex) 4.4.1: cameras that are clients of the same camex server are watched from anywhere, without a separate VPN app. **Network** in the menu (a row under the grid) opens the **Settings** dialog. Its **Decoder** section holds **Allow remote access** (the debug page; off, the app opens no port at all), the page's port and its password. Its **Camex** section holds **Join a camex server** (connect now and at every start; off by default) and the tunnel's state, then the server (`host:port`), the client name (the box's ID on the server; by default `decoder-` and the last four characters of the device's Android ID), **Proto** (UDP or TCP), the server's public key, the pre-shared key (hidden, with **Show the key** under it), MTU, keepalive and the server timeout, as the camex library lists them. The server gives the address, MTU and routes; only the tunnel network and the server's routes (none wider than a /8) go through it, the local network is reached as before. The state is shown in the dialog (Connecting, Connected with the address, VPN consent needed, Failed, Waiting for the VPN) and in a notification. Android holds one VPN: when another app (vectis, the camex app) holds it, Decoder does not take it at its start but waits and connects when that VPN ends; Save with Join on takes it now. A camera reached through the tunnel plays over TCP with Auto. The debug page is on port 8085 unless Network sets another; when that port is taken (another app on the device serves its page there), Decoder takes the next free one (8086, 8087, …) and shows the real address. Decoder tells the server the port its page really is on (for nginx there; a camex server 3.19.0 or later), and the tunnel lets in only that port of Decoder's own page: another app's page is not reached through it. The password, when set, guards that page from the local network and through the tunnel alike; empty (the default), the page is open. +Decoder has a tunnel built in, [OpenIPC camex](https://github.com/OpenIPC/camex) 5.2.1: cameras that are clients of the same camex server are watched from anywhere, without a separate VPN app. **Network** in the menu (a row under the grid) opens the **Settings** dialog. Its **Decoder** section holds **Allow remote access** (the debug page; off, the app opens no port at all), the page's port and its password. Its **Camex** section holds **Join a camex server** (connect now and at every start; off by default) and the tunnel's state, then the server (`host:port`), the client name (the box's ID on the server; by default `decoder-` and the last four characters of the device's Android ID), **Proto** (UDP or TCP), the network name (hidden; with it the server's key and the psk may stay empty), the server's public key, the pre-shared key (each key hidden, with **Show the key** under it), MTU (empty: 1420 over UDP, 1500 over TCP, or the server's), keepalive and the server timeout, as the camex library lists them. The server gives the address, MTU and routes; only the tunnel network and the server's routes (none wider than a /8) go through it, the local network is reached as before. The state is shown in the dialog (Connecting, Connected with the address, VPN consent needed, Failed, Waiting for the VPN) and in a notification. Android holds one VPN: when another app (vectis, the camex app) holds it, Decoder does not take it at its start but waits and connects when that VPN ends; Save with Join on takes it now. A camera reached through the tunnel plays over TCP with Auto. The debug page is on port 8085 unless Network sets another; when that port is taken (another app on the device serves its page there), Decoder takes the next free one (8086, 8087, …) and shows the real address. Decoder tells the server the port its page really is on (for nginx there; a camex server 3.19.0 or later), and the tunnel lets in only that port of Decoder's own page: another app's page is not reached through it. The password, when set, guards that page from the local network and through the tunnel alike; empty (the default), the page is open.
diff --git a/README.ru.md b/README.ru.md
index eac28dc..ae130a8 100644
--- a/README.ru.md
+++ b/README.ru.md
@@ -89,7 +89,7 @@
## Network (туннель к камерам)
-В Decoder встроен туннель [OpenIPC camex](https://github.com/OpenIPC/camex) 4.4.1: камеры, подключённые клиентами к тому же серверу camex, видны откуда угодно, без отдельного VPN-приложения. Пункт **Network** в меню (ряд под сеткой) открывает окно **Settings**. Раздел **Decoder**: **Allow remote access** (отладочная страница; выключено — у приложения нет ни одного сетевого порта), порт и пароль страницы. Раздел **Camex**: **Join a camex server** (подключиться сейчас и при каждом запуске; по умолчанию выключено) и состояние туннеля, затем сервер (`host:port`), имя клиента (идентификатор приставки на сервере; по умолчанию `decoder-` и четыре последних знака Android ID устройства), **Proto** (UDP или TCP), открытый ключ сервера, общий ключ (psk; скрыт, под ним **Show the key**), MTU, keepalive и таймаут сервера — как их перечисляет библиотека camex. Адрес, MTU и маршруты выдаёт сервер; через туннель идут только его сеть и маршруты сервера (не шире /8), локальная сеть доступна как прежде. Состояние видно в окне (Connecting, Connected с адресом, VPN consent needed, Failed, Waiting for the VPN) и в уведомлении. VPN в Android один: если его держит другое приложение (vectis, приложение camex), Decoder при запуске его не забирает, а ждёт и подключается, когда тот VPN закончится; Save с включённым Join забирает его сразу. Камера за туннелем в режиме Auto идёт по TCP. Отладочная страница — на порту 8085, если в Network не задан другой; если порт занят (на устройстве его держит страница другого приложения), Decoder берёт следующий свободный (8086, 8087, …) и показывает настоящий адрес. Серверу Decoder сообщает порт, на котором страница на самом деле (для nginx на сервере; нужен сервер camex 3.19.0 или новее), а туннель пропускает только этот порт собственной страницы Decoder: страница другого приложения через него недоступна. Пароль, если задан, закрывает эту страницу одинаково из локальной сети и через туннель; пустой (по умолчанию) — страница открыта.
+В Decoder встроен туннель [OpenIPC camex](https://github.com/OpenIPC/camex) 5.2.1: камеры, подключённые клиентами к тому же серверу camex, видны откуда угодно, без отдельного VPN-приложения. Пункт **Network** в меню (ряд под сеткой) открывает окно **Settings**. Раздел **Decoder**: **Allow remote access** (отладочная страница; выключено — у приложения нет ни одного сетевого порта), порт и пароль страницы. Раздел **Camex**: **Join a camex server** (подключиться сейчас и при каждом запуске; по умолчанию выключено) и состояние туннеля, затем сервер (`host:port`), имя клиента (идентификатор приставки на сервере; по умолчанию `decoder-` и четыре последних знака Android ID устройства), **Proto** (UDP или TCP), имя сети (скрыто; с ним ключ сервера и psk можно не заполнять), открытый ключ сервера, общий ключ (psk; ключи скрыты, под каждым **Show the key**), MTU (пусто: 1420 по UDP, 1500 по TCP или MTU сервера), keepalive и таймаут сервера — как их перечисляет библиотека camex. Адрес, MTU и маршруты выдаёт сервер; через туннель идут только его сеть и маршруты сервера (не шире /8), локальная сеть доступна как прежде. Состояние видно в окне (Connecting, Connected с адресом, VPN consent needed, Failed, Waiting for the VPN) и в уведомлении. VPN в Android один: если его держит другое приложение (vectis, приложение camex), Decoder при запуске его не забирает, а ждёт и подключается, когда тот VPN закончится; Save с включённым Join забирает его сразу. Камера за туннелем в режиме Auto идёт по TCP. Отладочная страница — на порту 8085, если в Network не задан другой; если порт занят (на устройстве его держит страница другого приложения), Decoder берёт следующий свободный (8086, 8087, …) и показывает настоящий адрес. Серверу Decoder сообщает порт, на котором страница на самом деле (для nginx на сервере; нужен сервер camex 3.19.0 или новее), а туннель пропускает только этот порт собственной страницы Decoder: страница другого приложения через него недоступна. Пароль, если задан, закрывает эту страницу одинаково из локальной сети и через туннель; пустой (по умолчанию) — страница открыта.
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 94339ef..653ea99 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -89,7 +89,7 @@
## Network(通往摄像头的隧道)
-Decoder 内置 [OpenIPC camex](https://github.com/OpenIPC/camex) 4.4.1 隧道:作为客户端接入同一台 camex 服务器的摄像头,可以在任何地方观看,无需另装 VPN 应用。菜单中的 **Network**(网格下方一行)打开 **Settings** 对话框。**Decoder** 部分包含 **Allow remote access**(调试页面;关闭时应用不打开任何端口)、页面端口和密码。**Camex** 部分包含 **Join a camex server**(立即连接并在每次启动时连接;默认关闭)和隧道状态,然后是服务器(`host:port`)、客户端名称(设备在服务器上的 ID;默认为 `decoder-` 加设备 Android ID 的后四位)、**Proto**(UDP 或 TCP)、服务器公钥、预共享密钥(隐藏,下方有 **Show the key**)、MTU、keepalive 和服务器超时,均按 camex 库列出。地址、MTU 和路由由服务器下发;只有隧道网络和服务器的路由(不宽于 /8)经过隧道,本地网络照常访问。状态显示在对话框(Connecting、Connected 及地址、VPN consent needed、Failed、Waiting for the VPN)和通知中。Android 只有一个 VPN:若另一个应用(vectis、camex 应用)正占用它,Decoder 启动时不会抢占,而是等待,待该 VPN 结束后再连接;在 Join 开启时按 Save 会立即占用。经隧道访问的摄像头在 Auto 模式下走 TCP。调试页面默认位于 8085 端口,可在 Network 中更改;若该端口被占用(设备上另一个应用的页面在用),Decoder 会使用下一个空闲端口(8086、8087……)并显示实际地址。Decoder 告知服务器页面实际所在的端口(供服务器上的 nginx 使用;需 camex 服务器 3.19.0 或更新版本),隧道只放行 Decoder 自身页面的这个端口:无法经隧道访问其他应用的页面。设置密码后,无论从本地网络还是经隧道访问,该页面都需要密码;为空(默认)时页面开放。
+Decoder 内置 [OpenIPC camex](https://github.com/OpenIPC/camex) 5.2.1 隧道:作为客户端接入同一台 camex 服务器的摄像头,可以在任何地方观看,无需另装 VPN 应用。菜单中的 **Network**(网格下方一行)打开 **Settings** 对话框。**Decoder** 部分包含 **Allow remote access**(调试页面;关闭时应用不打开任何端口)、页面端口和密码。**Camex** 部分包含 **Join a camex server**(立即连接并在每次启动时连接;默认关闭)和隧道状态,然后是服务器(`host:port`)、客户端名称(设备在服务器上的 ID;默认为 `decoder-` 加设备 Android ID 的后四位)、**Proto**(UDP 或 TCP)、网络名称(隐藏;填写后服务器公钥和预共享密钥可以留空)、服务器公钥、预共享密钥(各密钥均隐藏,下方有 **Show the key**)、MTU(留空:UDP 为 1420,TCP 为 1500,或使用服务器的值)、keepalive 和服务器超时,均按 camex 库列出。地址、MTU 和路由由服务器下发;只有隧道网络和服务器的路由(不宽于 /8)经过隧道,本地网络照常访问。状态显示在对话框(Connecting、Connected 及地址、VPN consent needed、Failed、Waiting for the VPN)和通知中。Android 只有一个 VPN:若另一个应用(vectis、camex 应用)正占用它,Decoder 启动时不会抢占,而是等待,待该 VPN 结束后再连接;在 Join 开启时按 Save 会立即占用。经隧道访问的摄像头在 Auto 模式下走 TCP。调试页面默认位于 8085 端口,可在 Network 中更改;若该端口被占用(设备上另一个应用的页面在用),Decoder 会使用下一个空闲端口(8086、8087……)并显示实际地址。Decoder 告知服务器页面实际所在的端口(供服务器上的 nginx 使用;需 camex 服务器 3.19.0 或更新版本),隧道只放行 Decoder 自身页面的这个端口:无法经隧道访问其他应用的页面。设置密码后,无论从本地网络还是经隧道访问,该页面都需要密码;为空(默认)时页面开放。
diff --git a/android/app/build.gradle b/android/app/build.gradle
index f091643..4aa4cb0 100755
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -26,8 +26,8 @@ android {
applicationId "com.openipc.decoder"
minSdk 21
targetSdk 36
- versionCode 67
- versionName "2.27.4"
+ versionCode 68
+ versionName "2.28.0"
// Keep only these locales of the libraries' resources, as in the other OpenIPC apps
resourceConfigurations += ['en', 'ru', 'zh-rCN']
diff --git a/android/app/src/main/java/com/openipc/decoder/TunnelPath.java b/android/app/src/main/java/com/openipc/decoder/TunnelPath.java
index e06ee43..c39d859 100644
--- a/android/app/src/main/java/com/openipc/decoder/TunnelPath.java
+++ b/android/app/src/main/java/com/openipc/decoder/TunnelPath.java
@@ -19,8 +19,9 @@
import java.util.List;
/**
- * A camera reached through a VPN tunnel (camex or any other): Auto then plays it over TCP. The
- * tunnel's MTU is below a camera's RTP packets (about 1440 bytes), so over UDP
+ * A camera reached through a VPN tunnel (camex or any other): Auto then plays it over TCP. A
+ * tunnel's MTU is often below a camera's RTP packets (about 1440 bytes; camex over UDP has 1420
+ * by default), so over UDP
* each packet travels in two IP fragments and a lost fragment loses it; over TCP the stream fits
* the MTU, and a path too slow for the stream costs whole frames, not broken ones.
*/
diff --git a/bundles/camex b/bundles/camex
index 7a8834e..9b1c7a3 160000
--- a/bundles/camex
+++ b/bundles/camex
@@ -1 +1 @@
-Subproject commit 7a8834e3a37823798c066e5168af0209868cbcad
+Subproject commit 9b1c7a3bd14818f7dce4827dd862099c4f93cfab
diff --git a/tests/e2e.sh b/tests/e2e.sh
index e5ca4fe..2a10607 100755
--- a/tests/e2e.sh
+++ b/tests/e2e.sh
@@ -61,7 +61,7 @@ DELAY_MS=${DELAY_MS:-30}
NETEM_IMAGE=${NETEM_IMAGE:-decoder-netem}
case $TRANSPORT in UDP|TCP) ;; *) echo "TRANSPORT must be UDP or TCP"; exit 2 ;; esac
TUNNEL=camex
-RESTART_MARK="Tunnel initialized" # camex's log line of each new run (bundles/camex/src/camex.c)
+RESTART_MARK="Tunnel up:" # camex's log line of each new run (bundles/camex/src/camex.c; "Tunnel initialized" before camex 5)
NAME=decoder-e2e-$$
PEER=$NAME-edge
HUB=$NAME-hub