Skip to content

Repository files navigation

Y Transport

Encrypted delay-tolerant operation transport over unreliable append-only provider logs.

What is Y Transport?

Y Transport (YTP) is a protocol and desktop application that turns any message/chat API into an encrypted transport. It treats Telegram, VK, OK, Discord, email — any API where you can send and receive messages — as an unreliable mailbox, and builds reliable, encrypted, multiplexed communication on top.

It is NOT:

  • A VPN
  • A proxy bypass tool
  • A way to circumvent access controls
  • A tool for spam or abuse

It IS:

  • A delay-tolerant encrypted stream transport
  • A protocol that respects provider rate limits and ToS
  • A multiplexer that can use multiple providers simultaneously
  • A research/experimental project

How It Works

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│   Local Proxy   │     │   YTP Protocol   │     │    Provider     │
│   SOCKS5/HTTP   │────>│   Bundles + Ops  │────>│   Telegram/VK   │
│   127.0.0.1     │<────│   Encrypted      │<────│   OK/Y.Disk/... │
└─────────────────┘     └──────────────────┘     └─────────────────┘
  1. Your application connects to the local SOCKS5/HTTP proxy
  2. YTP parses the request into typed Operations (OpenStream, StreamData, ResolveDns, etc.)
  3. Operations are batched into Bundles, compressed, and encrypted
  4. Bundles are sent as messages via a Provider (Telegram, VK, OK, Yandex Disk, etc.)
  5. The remote node receives, decrypts, and executes the operations
  6. Data flows back through the same path

Quick Start (macOS)

# Option 1: One-line install
curl -sL https://raw.githubusercontent.com//anYTransportProxy/main/start_node_mac.sh | bash

# Option 2: Manual
git clone https://github.com//anYTransportProxy.git
cd anYTransportProxy
chmod +x start_node_mac.sh
./start_node_mac.sh

The script will:

  1. Check/install Node.js
  2. Clone the repository
  3. Install dependencies
  4. Build TypeScript
  5. Create .env config template (edit with your tokens!)
  6. Start the Y Transport node

Manual Setup

git clone https://github.com//anYTransportProxy.git
cd anYTransportProxy
npm install
npm run build

# Configure your providers
cp .env.example .env
nano .env

# Run demo
npm run demo

# Run benchmarks
npm run benchmark

# Start bridge server (for VK Browser Bridge)
npm run bridge

Providers

Provider Max Message Rate Limit Mode Status
Telegram 4096 chars 1 msg/1.5s Long Poll ✅ Ready
VK (server) 4096 chars 3 req/s per token Long Poll + History ✅ Ready
VK (multi-token) 4096 chars 6 req/s (2 tokens) Parallel ✅ Ready
VK (browser bridge) 4096 chars 3 req/s (extra token) JSONP + WS ✅ Ready
OK 4000 chars 5 req/s Long Poll + History ✅ Ready
Yandex Disk 4KB files 30 req/s File upload/download ✅ Ready
Memory Unlimited Unlimited In-process ✅ Ready
File Unlimited Unlimited Append-only log ✅ Ready

VK Browser Bridge

The VK Browser Bridge allows using VK from a browser tab as an additional transport channel, independent of server-side VK API access. This effectively doubles VK throughput by using two different authentication methods simultaneously.

Setup:

  1. Start the bridge server: npm run bridge
  2. Open docs/vk-browser-bridge.html in your browser
  3. Login with Kate Mobile OAuth
  4. Connect the bridge WebSocket
  5. The browser tab now acts as an additional VK provider
Node.js YTP <──WebSocket──> Bridge Page <──JSONP──> VK API
    (3 req/s)                              (3 req/s)
                                Combined: 6 req/s

Yandex Disk Provider

Uses Yandex Disk as a file-based transport channel. Each message chunk is uploaded as a small file, and the remote side downloads it. This provides high bandwidth with generous rate limits.

Setup:

  1. Get OAuth token at https://oauth.yandex.ru/
  2. Add YDISK_TOKEN=your_token to .env
  3. The provider creates /ytp/inbox/ and /ytp/outbox/ folders on Disk

Speed Benchmarks

Run real speed tests with your actual tokens:

# All providers
npm run benchmark

# Specific providers
PROVIDERS=vk,tg npm run benchmark

# Parallel mode only
MODE=parallel npm run benchmark

# Custom message count
MSG_COUNT=20 npm run benchmark

Expected throughput estimates (per provider):

  • Telegram: ~1.3 KB/s (1 msg/1.5s × 2048 bytes)
  • VK single token: ~5.7 KB/s (3 req/s × 2048 bytes)
  • VK multi-token (2×): ~11.4 KB/s (6 req/s × 2048 bytes)
  • VK + browser bridge: ~17 KB/s (9 req/s × 2048 bytes)
  • OK: ~7.5 KB/s (5 req/s × 1500 bytes)
  • Yandex Disk: ~40 KB/s (10 req/s × 4096 bytes)
  • All parallel (VK×2+TG+OK+YD): ~65 KB/s aggregate

Project Structure

y-transport-electron/
├── packages/
│   ├── core/          # Node, Session, Peer, StreamExecutor
│   ├── protocol/      # Envelope, Bundle, Operation types
│   ├── crypto/        # Identity, Handshake, Encryption, Key Rotation
│   ├── providers/     # Provider interface + Memory/File/Telegram/VK/OK/YandexDisk/Bridge
│   ├── scheduler/     # Budget, Priority Queue, Retransmit, Provider Selection, Failover
│   ├── proxy/         # SOCKS5, HTTP CONNECT, DNS Cache
│   ├── storage/       # SQLite schema, FrameStore interface
│   └── desktop/       # Electron main, preload, renderer
├── scripts/
│   ├── benchmark.ts   # Real speed benchmarks
│   ├── full-demo.ts   # All-providers demo
│   └── bridge-server.ts # WebSocket bridge for VK Browser
├── docs/
│   └── vk-browser-bridge.html  # Companion web page
├── start_node_mac.sh  # macOS quick start script
└── .env               # Provider tokens configuration

Milestone Status

Milestone Description Status
M1 Local loopback (MemoryProvider + SOCKS5) ✅ Done
M2 FileProvider (append-only log) ✅ Done
M3 Telegram text provider ✅ Done
M4 Persistent sessions (SQLite) ✅ Done
M5 OK / VK adapters ✅ Done
M6 Multi-provider failover ✅ Done
M7 VK Browser Bridge ✅ Done
M8 Yandex Disk provider ✅ Done
M9 Speed benchmarks & optimization ✅ Done

Security

  • All payloads are end-to-end encrypted (XChaCha20-Poly1305 / AES-256-GCM)
  • Provider tokens are stored in .env file (should be in OS vault for production)
  • Built-in budget and rate limiting to respect provider ToS
  • Key rotation every 10,000 bundles or 24 hours
  • Replay protection via seq + epoch + nonce

License

MIT

Unified edition

This branch combines the mature protocol, crypto, storage, recovery, flow-control, desktop, webhook, and integration-test work with the composable provider stack, cloud channels, binary encoders, audio transport, and FSK voice-message modem from whitetransport-dev. The transport project now lives at the repository root.

About

Clean public history of anYTransportProxy with related main and whitetransport-dev branches

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages