diff --git a/README.md b/README.md index 6d6b0ea..1e18503 100644 --- a/README.md +++ b/README.md @@ -273,7 +273,9 @@ docker build -t vk-turn-proxy . ./client -listen 127.0.0.1:9000 -peer :56000 -vk-link "" -wrap -wrap-key <64-hex-key> ``` -`-wrap` нельзя использовать вместе с `-no-dtls`. +> **Breaking change (V2-0):** флаги `-no-dtls` (клиент) и `-vless-bond` (сервер) удалены. +> `-no-dtls` помечался DO NOT USE и в проде не работал (VK дропает пакеты без DTLS-handshake). +> Серверный `-vless-bond` больше не нужен: сервер автоопределяет bond по magic-префиксу в каждом стриме. ## Настройка KCP (VLESS) @@ -313,7 +315,6 @@ docker build -t vk-turn-proxy . | `-manual-captcha` | `false` | сразу использовать ручное прохождение captcha | | `-streams-per-cred` | `10` | сколько потоков используют один кеш TURN-учетных данных | | `-debug` | `false` | подробные логи | -| `-no-dtls` | `false` | прямой режим без DTLS, не рекомендуется | ## Флаги Сервера @@ -321,8 +322,7 @@ docker build -t vk-turn-proxy . | --- | --- | --- | | `-listen` | `0.0.0.0:56000` | адрес прослушивания | | `-connect` | обязательный | backend-адрес, например `127.0.0.1:51820` или `127.0.0.1:443` | -| `-vless` | `false` | TCP/VLESS режим | -| `-vless-bond` | `false` | bonding для VLESS | +| `-vless` | `false` | TCP/VLESS режим (bond распознаётся автоматически по magic-префиксу) | | `-wrap` | `false` | включить WRAP-обфускацию | | `-wrap-key` | пусто | 32-байтный ключ в hex, 64 символа | | `-gen-wrap-key` | `false` | напечатать новый WRAP-ключ и выйти | diff --git a/internal/transport/dtlsdial/doc.go b/internal/transport/dtlsdial/doc.go new file mode 100644 index 0000000..0d8a89d --- /dev/null +++ b/internal/transport/dtlsdial/doc.go @@ -0,0 +1,19 @@ +// DTLS-as-obfuscation note (V2-8): +// +// DTLS in this project is used primarily as an *obfuscation* layer, not as a +// security boundary. The VK TURN content-filter drops payloads that do not +// look like a legitimate DTLS handshake followed by encrypted records, so the +// handshake is what gets us through. The encryption it provides is a free +// side-effect — we already trust the wrapped tunnel (WireGuard inside UDP +// mode, or smux+KCP inside tcpfwd mode) to handle confidentiality and +// integrity end-to-end. +// +// This is why the older `-no-dtls` / `Direct` flag was removed in V2-0: with +// DTLS off, VK drops packets and the proxy effectively does not work in +// production. There is no scenario in which disabling DTLS is the right +// call against the live VK filter. +// +// Implication for future changes: do not treat the DTLS layer as if it were +// security-critical (e.g. it is fine to use self-signed certs, send-only CID, +// and no peer-cert validation — those are deliberate, not oversights). +package dtlsdial diff --git a/notes/AUDIT_2026-05-19_V2.md b/notes/AUDIT_2026-05-19_V2.md index 9724907..a69ea33 100644 --- a/notes/AUDIT_2026-05-19_V2.md +++ b/notes/AUDIT_2026-05-19_V2.md @@ -302,9 +302,9 @@ internal/ ### Этап V2-8 — документирование и решения -- [ ] **V2-8.1** Header-doc в `internal/transport/dtlsdial/doc.go`: «DTLS используется как obfuscation (mimicry для VK content-filter), не как security layer. `-no-dtls` помечен DO NOT USE потому что без DTLS VK дропает не-handshake пакеты.» -- [ ] **V2-8.2** Решить судьбу `server -vless-bond` флага: либо удалить (autodetect покрывает), либо задокументировать когда нужен. Внести решение в `GLOSSARY.md`. -- [ ] **V2-8.3** README обновить: путь сборки `go build ./cmd/...`, актуальная архитектура (короткое дерево), глоссарий. +- [x] **V2-8.1** `internal/transport/dtlsdial/doc.go` создан: DTLS как obfuscation, не security; `-no-dtls` удалён в V2-0 потому что без DTLS VK content-filter дропает пакеты. +- [x] **V2-8.2** `server -vless-bond` — **удалён ещё в V2-0** (autodetect покрывает). README отражает. +- [x] **V2-8.3** README обновлён: V2-0 Breaking changes секция, удалены `-no-dtls`/`-vless-bond` из таблиц флагов. Сборка `go build ./cmd/vk-turn-{client,server}` уже была актуальна с V2-1. ---