mirror of
https://github.com/hackdiaz-dev/free-turn-proxy.git
synced 2026-10-12 09:41:53 +02:00
8b2e028f99
Критичное: - go.mod: версия 1.25.5→1.25.0 (go mod tidy); Dockerfile: тег 1.25 - release.yml: go-version 1.25.5 → stable - удалён temp-файл types.go.tmp.18500.1c9f4278a15a - udprelay/loop.go: defer conn1/conn2.Close() при сбое Dial; лог write-error Безопасность/код: - browserprofile: пермиссии 0644→0600 - bondserver: once.Do перед go readLane (ordering fix) - cmd/server: err= → err:= (shadow fix в AfterFunc) - vkauth/client: vkDelayRandom ctx-aware (возвращает error) - captcha/manual: whitelist хостов в /generic_proxy (SSRF mitigation) Инфра: - .dockerignore: исключить .git/.github/notes/dist из build context - docker-compose.yml: env_file .env для OBF_KEY - entrypoint.sh: позиционные аргументы вместо unquoted vars; валидация host:port CI: - ci.yml: исправлен путь go module cache (~/go/pkg/mod); добавлен -race - .gitignore: добавлены /dist/, *.test, coverage.out, .env, *.tmp - .golangci.yml: добавлены gosec и staticcheck - routes-macos.sh: set -eu вместо set -u Код: - bondclient/bondserver: errors.Is(err, io.EOF) вместо err != io.EOF - cmd/client: константа dtlsHandshakeConcurrency для HandshakeSem Доки: - quickstart.md: добавлен Intel Mac (darwin-amd64) - build.md: версия Go, Windows/macOS cross-compile инструкции - flags.md: уточнено описание -bond
64 lines
2.7 KiB
Markdown
64 lines
2.7 KiB
Markdown
# Быстрый Старт (WireGuard)
|
|
|
|
## Что Нужно
|
|
|
|
- VPS с публичным IP, WireGuard слушает `127.0.0.1:51820/udp`.
|
|
- Активная ссылка VK Calls: `https://vk.com/call/join/...` — создайте сами, не завершайте звонок для всех.
|
|
- WireGuard на клиенте: `Endpoint = 127.0.0.1:9000`, `MTU = 1280`.
|
|
|
|
## 1. Сервер На VPS
|
|
|
|
```bash
|
|
curl -L -o server https://github.com/samosvalishe/btp/releases/latest/download/server-linux-amd64
|
|
chmod +x server
|
|
./server -listen 0.0.0.0:56000 -connect 127.0.0.1:51820
|
|
```
|
|
|
|
Порт `56000/udp` открыт снаружи.
|
|
|
|
## 2. Маршруты (Split Tunneling)
|
|
|
|
WireGuard забирает весь трафик, включая трафик к TURN-реле — туннель замыкается сам на себя. Скрипт маршрутов добавляет исключение: трафик к TURN идёт напрямую через шлюз ISP.
|
|
|
|
Флаг `-debug` включает debug-логи, из которых скрипт читает IP TURN-сервера. `2>&1` перенаправляет их в пайп.
|
|
|
|
> **Android:** маршруты не нужны — добавьте Termux в исключения WireGuard.
|
|
|
|
## 3. Клиент
|
|
|
|
**Linux:**
|
|
|
|
```bash
|
|
curl -L -o client https://github.com/samosvalishe/btp/releases/latest/download/client-linux-amd64
|
|
chmod +x client
|
|
./client -listen 127.0.0.1:9000 -peer <vps>:56000 -link "<vk-link>" -debug 2>&1 | ./scripts/routes.sh
|
|
```
|
|
|
|
**Windows (PowerShell от администратора):**
|
|
|
|
```powershell
|
|
Invoke-WebRequest -Uri https://github.com/samosvalishe/btp/releases/latest/download/client-windows-amd64.exe -OutFile client.exe
|
|
.\client.exe -listen 127.0.0.1:9000 -peer <vps>:56000 -link "<vk-link>" -debug 2>&1 | .\scripts\routes.ps1
|
|
```
|
|
|
|
**macOS (Apple Silicon / ARM):**
|
|
|
|
```bash
|
|
curl -L -o client https://github.com/samosvalishe/btp/releases/latest/download/client-darwin-arm64
|
|
chmod +x client
|
|
./client -listen 127.0.0.1:9000 -peer <vps>:56000 -link "<vk-link>" -debug 2>&1 | ./scripts/routes-macos.sh
|
|
```
|
|
|
|
**macOS (Intel / amd64):**
|
|
|
|
```bash
|
|
curl -L -o client https://github.com/samosvalishe/btp/releases/latest/download/client-darwin-amd64
|
|
chmod +x client
|
|
./client -listen 127.0.0.1:9000 -peer <vps>:56000 -link "<vk-link>" -debug 2>&1 | ./scripts/routes-macos.sh
|
|
```
|
|
|
|
Когда скрипт напечатает `Ensuring route to ...` — включайте WireGuard.
|
|
|
|
> Скачали только бинарник без репо? Возьмите скрипты отдельно:
|
|
> [`scripts/routes.sh`](../scripts/routes.sh) · [`scripts/routes.ps1`](../scripts/routes.ps1) · [`scripts/routes-macos.sh`](../scripts/routes-macos.sh)
|