mirror of
https://github.com/hackdiaz-dev/free-turn-proxy.git
synced 2026-10-12 09:41:53 +02:00
docs: заметка DTLS-как-обфускация + breaking changes в README
- internal/transport/dtlsdial/doc.go: объяснить, что DTLS используется как слой обфускации под content-фильтр VK TURN, а не как граница безопасности; задокументировать, почему -no-dtls был убран и почему решения вроде self-signed сертификатов / send-only CID намеренны. - README: добавить врезку breaking-changes под "Защита от блокировок"; убрать строки -no-dtls и server -vless-bond из таблиц флагов; отметить, что bond автоопределяется по magic-префиксу на сервере. Завершает рефакторинг. Все этапы зелёные: go build / go vet / go test / gofmt. CLI и wire-форматы бит-в-бит кроме двух удалений (-no-dtls на клиенте, -vless-bond на сервере).
This commit is contained in:
@@ -273,7 +273,9 @@ docker build -t vk-turn-proxy .
|
||||
./client -listen 127.0.0.1:9000 -peer <ip-vps>:56000 -vk-link "<vk-call-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-ключ и выйти |
|
||||
|
||||
@@ -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
|
||||
@@ -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.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user