You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa17485
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,11 +89,11 @@ Every item, the remote, sharing a URL from another app and **Reset**: [Usage](do
89
89
90
90
## Network (a tunnel to the cameras)
91
91
92
-
Decoder has a tunnel built in, [OpenIPC camex](https://github.com/OpenIPC/camex) 3.19.0: 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) holds the server (`host:port`), the client name (the box's ID on the server), UDP or TCP, the server's public key, the pre-shared key, the server timeout, the web port for nginx on the server (a camex server 3.19.0 or later) and **On**: connect now and at every start. Off by default. 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) and in a notification. A camera reached through the tunnel plays over TCP with Auto.
92
+
Decoder has a tunnel built in, [OpenIPC camex](https://github.com/OpenIPC/camex) 3.19.0: 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) holds the server (`host:port`), the client name (the box's ID on the server), UDP or TCP, the server's public key, the pre-shared key, the server timeout, the password of the debug page and **On**: connect now and at every start. Off by default. 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) and in a notification. A camera reached through the tunnel plays over TCP with Auto. Decoder tells the server its web page is on port 8085 (for nginx there; a camex server 3.19.0 or later). The password, when set, guards that page from the local network and through the tunnel alike; empty (the default), the page is open.
93
93
94
94
<palign="center">
95
95
<imgsrc="screenshots/network.jpg"alt="The Network dialog on a TV box: connected, the server and the client name"width="400">
96
-
<imgsrc="screenshots/network_more.jpg"alt="The end of the dialog: keepalive, server timeout, web port and On"width="400">
96
+
<imgsrc="screenshots/network_more.jpg"alt="The end of the dialog: keepalive, server timeout, web port and On (2.23.0)"width="400">
97
97
</p>
98
98
99
99
The first connection asks Android for the VPN consent once (a system dialog). A device without a person at it gets the consent over adb while it is set up, with no dialog ever, and it survives reboots (no root needed):
Copy file name to clipboardExpand all lines: README.ru.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,11 +89,11 @@
89
89
90
90
## Network (туннель к камерам)
91
91
92
-
В Decoder встроен туннель [OpenIPC camex](https://github.com/OpenIPC/camex) 3.19.0: камеры, подключённые клиентами к тому же серверу camex, видны откуда угодно, без отдельного VPN-приложения. Пункт **Network** в меню (ряд под сеткой): сервер (`host:port`), имя клиента (идентификатор приставки на сервере), UDP или TCP, открытый ключ сервера, общий ключ (psk), таймаут сервера, веб-порт для nginx на сервере (сервер camex 3.19.0 или новее) и **On** — подключиться сейчас и при каждом запуске. По умолчанию выключено. Адрес, MTU и маршруты выдаёт сервер; через туннель идут только его сеть и маршруты сервера (не шире /8), локальная сеть доступна как прежде. Состояние видно в окне (Connecting, Connected с адресом, VPN consent needed, Failed) и в уведомлении. Камера за туннелем в режиме Auto идёт по TCP.
92
+
В Decoder встроен туннель [OpenIPC camex](https://github.com/OpenIPC/camex) 3.19.0: камеры, подключённые клиентами к тому же серверу camex, видны откуда угодно, без отдельного VPN-приложения. Пункт **Network** в меню (ряд под сеткой): сервер (`host:port`), имя клиента (идентификатор приставки на сервере), UDP или TCP, открытый ключ сервера, общий ключ (psk), таймаут сервера, пароль отладочной страницы и **On** — подключиться сейчас и при каждом запуске. По умолчанию выключено. Адрес, MTU и маршруты выдаёт сервер; через туннель идут только его сеть и маршруты сервера (не шире /8), локальная сеть доступна как прежде. Состояние видно в окне (Connecting, Connected с адресом, VPN consent needed, Failed) и в уведомлении. Камера за туннелем в режиме Auto идёт по TCP. Decoder сообщает серверу, что его веб-страница на порту 8085 (для nginx на сервере; нужен сервер camex 3.19.0 или новее). Пароль, если задан, закрывает эту страницу одинаково из локальной сети и через туннель; пустой (по умолчанию) — страница открыта.
93
93
94
94
<palign="center">
95
95
<imgsrc="screenshots/network.jpg"alt="Окно Network на ТВ-приставке: подключено, сервер и имя клиента"width="400">
96
-
<imgsrc="screenshots/network_more.jpg"alt="Конец окна: keepalive, таймаут сервера, веб-порт и On"width="400">
96
+
<imgsrc="screenshots/network_more.jpg"alt="Конец окна: keepalive, таймаут сервера, веб-порт и On (2.23.0)"width="400">
97
97
</p>
98
98
99
99
При первом подключении Android один раз спрашивает согласие на VPN (системное окно). Устройству без человека рядом согласие дают через adb при настройке, без окна; оно сохраняется после перезагрузки (root не нужен):
Copy file name to clipboardExpand all lines: android/app/src/main/java/com/openipc/decoder/DebugServer.java
+103-2Lines changed: 103 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,9 @@
32
32
/**
33
33
* Serves what the decoder knows about itself on port 8085, for a browser or curl:
34
34
* {@code /} a page refreshing itself, {@code /stats.json} the same as JSON, {@code /log} the
35
-
* app's recent log, {@code /report.txt} both in one file to download (#207). Always on; a client outside the local network gets 403. GET only, one
35
+
* app's recent log, {@code /report.txt} both in one file to download (#207). Always on; a client outside the local network gets 403. With a password set in
36
+
* Network, every request needs it (HTTP Basic, any user name), from the local network and the
37
+
* tunnel alike; without one the pages are open, as before. GET only, one
36
38
* request per connection, short timeouts and a few workers: it must never get in the way of
37
39
* decoding. Logins and passwords never leave the device (redacted like the log, #55).
38
40
*/
@@ -52,6 +54,8 @@ final class DebugServer {
52
54
privatestaticfinallongREBIND_DELAY_MS = 10_000;
53
55
/** A snapshot this young is served again: several viewers cost one capture (#98). */
54
56
privatestaticfinallongSNAPSHOT_REUSE_MS = 1000;
57
+
/** The answer to a wrong password waits this long: about two guesses a second at most. */
0 commit comments