A fast, custom encrypted transport protocol written in Rust.
Go to file
ospab 5c2b5a06dd Refactor CLI to subcommands, fix UAC elevation, and add multi-channel release 2026-07-08 00:38:40 +03:00
.github/workflows Refactor CLI to subcommands, fix UAC elevation, and add multi-channel release 2026-07-08 00:38:40 +03:00
dnstt@0c5c52a57d feat: integrate DNS Transport (DNS Proxy) as last resort transport 2026-06-19 01:44:08 +03:00
docs Fix Closing state, replace sent_history VecDeque with BTreeMap, clean up dead code 2026-06-21 22:09:56 +03:00
icons feat: implement l4_protocol for server outbound, fix gui metrics and tunnel startup 2026-06-23 00:05:04 +03:00
netstack-smoltcp Fix memory leaks, hang issues, gui helper token vulns, and log spam 2026-06-16 14:11:37 +03:00
ostp Refactor CLI to subcommands, fix UAC elevation, and add multi-channel release 2026-07-08 00:38:40 +03:00
ostp-client Fix settings GUI scrolling: force screen height and block layout for scrollable 2026-07-07 17:35:08 +03:00
ostp-control/dist feat: make panel open source, remove license check, and restore rust-embed 2026-06-18 22:54:31 +03:00
ostp-core feat: implement l4_protocol for server outbound, fix gui metrics and tunnel startup 2026-06-23 00:05:04 +03:00
ostp-flutter Fix settings GUI scrolling: force screen height and block layout for scrollable 2026-07-07 17:35:08 +03:00
ostp-gui Refactor CLI to subcommands, fix UAC elevation, and add multi-channel release 2026-07-08 00:38:40 +03:00
ostp-jni docs: remove useless ostp-wiki folder from root 2026-06-19 14:42:45 +03:00
ostp-server Downgrade UoT and unauthorized probe logs to debug 2026-06-25 21:24:29 +03:00
ostp-tun Fix client stability, metrics, and compiler warnings 2026-06-25 20:54:13 +03:00
ostp-tun-helper Release v0.3.18 2026-06-25 16:55:14 +03:00
ostp.wiki@99e1c6ff54 fix(client): enable TUN inbound compilation on Android 2026-06-23 01:24:43 +03:00
scripts Refactor CLI to subcommands, fix UAC elevation, and add multi-channel release 2026-07-08 00:38:40 +03:00
.gitattributes chore: enforce LF line endings on bash scripts via gitattributes to fix 'bad interpreter' on Linux 2026-05-15 19:08:03 +03:00
.gitignore Integrate dnstt into ostp-core and update build dependencies 2026-06-21 22:08:59 +03:00
CONTRIBUTING.md Integrate dnstt into ostp-core and update build dependencies 2026-06-21 22:08:59 +03:00
CONTRIBUTING.ru.md Integrate dnstt into ostp-core and update build dependencies 2026-06-21 22:08:59 +03:00
Cargo.lock CI/CD: release version v0.3.21 2026-06-25 23:32:47 +03:00
Cargo.toml CI/CD: release version v0.3.21 2026-06-25 23:32:47 +03:00
Cross.toml CI/CD: Resolve MIPS Tier-3 compilation by instructing Cross to dynamically build-std library from source 2026-05-14 23:57:19 +03:00
LICENSE chore: change repository license from BSL 1.1 to AGPLv3 2026-06-18 02:14:16 +03:00
README.md Fix client stability, metrics, and compiler warnings 2026-06-25 20:54:13 +03:00
README.ru.md Fix client stability, metrics, and compiler warnings 2026-06-25 20:54:13 +03:00
app-icon.svg Refactor: Phase 1 and 2 - Async architecture, JNI fixes, SmolTCP data races, and Tunnel optimizations 2026-06-03 02:06:06 +03:00

README.md

OSTP — Ospab Stealth Transport Protocol

Русский язык · Wiki · Contributing · Releases · Migration Guide

GitHub Release License: AGPL v3 Platform: Windows | Linux | macOS | Android Crypto Transport

OSTP (Ospab Stealth Transport Protocol) is an encrypted transport protocol written in Rust. It implements a custom ARQ transport over UDP and a UDP-over-TCP (UoT) mode. The protocol uses cryptographic masking for all packet headers and payloads to resist traffic classification by Deep Packet Inspection (DPI) systems.

[!IMPORTANT] Upgrading from v0.2.x? Please read the v0.3.1 Configuration Migration Guide.


Technical Capabilities

Capability Description
Traffic Masking Header and payload encryption using per-packet HMAC-derived keys. Indistinguishable from random noise.
Noise Protocol Noise_NNpsk0_25519_ChaChaPoly_BLAKE2s — PSK-authenticated, forward-secret key exchange.
Reliable UDP (ARQ) Selective ACK/NACK with rate-limited retransmission, configurable reorder buffer, and exponential backoff.
Multiplexed Streams Multiple logical TCP streams over a single encrypted UDP session with per-stream flow control.
Session Roaming Connection persistence across IP changes via session ID tracking.
UoT Mode UDP-over-TCP encapsulation with length-prefixing to bypass UDP blocking.
TCP Fragmentation (Zapret-style) Bypasses Deep Packet Inspection (DPI) by chunking the initial TLS/Noise handshakes.
Junk Packets Sends randomized dummy UDP packets prior to the handshake to confuse DPI flow analyzers.
Adaptive Padding Dynamically pads handshake and data frames up to 1024 bytes to prevent packet size fingerprinting.
TUN Mode Native network stack integration (smoltcp) for full-system routing without external dependencies.
Management API Built-in REST API for server administration, metrics, and key generation.
TURN Relay RFC 5766 TURN support for NAT traversal.

Architecture

flowchart LR
    Apps[Local Apps] -->|SOCKS5 / TUN| CoreC

    subgraph Client [Client Node]
        CoreC[OSTP Client] -.->|Encrypt, Pad & Chunk| NetC[Transport Layer]
    end

    NetC <==>|Encrypted UDP / UoT| NetS

    subgraph Server [Server Node]
        NetS[Transport Layer] -.->|Decrypt & Auth| CoreS[OSTP Server]
    end

    CoreS -->|Relay| WWW((Internet))

Quick Start

1. Installation

Linux:

bash <(curl -Ls https://raw.githubusercontent.com/ospab/ostp/master/scripts/install.sh)

Windows (PowerShell as Administrator):

irm https://raw.githubusercontent.com/ospab/ostp/master/scripts/install.ps1 | iex

2. Configuration

Initialize the configuration files for the server and client:

# On the server:
./ostp --init server

# On the client:
./ostp --init client

Server Example (config.json):

{
  "mode": "server",
  "listen": "0.0.0.0:50000",
  "access_keys": ["YOUR_SECRET_KEY"]
}

Client Example (config.json):

{
  "mode": "client",
  "version": "0.3.1",
  "inbounds": [
    { "type": "local_proxy", "tag": "socks-in", "protocol": "socks", "listen": "127.0.0.1", "port": 1088 }
  ],
  "outbounds": [
    {
      "type": "ostp",
      "tag": "proxy",
      "server": "YOUR_SERVER_IP",
      "port": 50000,
      "access_key": "YOUR_SECRET_KEY",
      "transport": { "type": "udp" }
    }
  ]
}

3. Execution

# Run with default config.json
./ostp

# Run with a specific config path
./ostp --config /path/to/config.json

Or connect via a one-line share link on the client:

./ostp "ostp://YOUR_SECRET_KEY@YOUR_SERVER_IP:50000?transport=udp"

Protocol Specification

Layer Mechanism
Key Exchange Noise NNpsk0 (X25519 + ChaChaPoly + BLAKE2s) zero-RTT
Encryption ChaCha20-Poly1305 AEAD per-packet
Header Masking HMAC-SHA256 derived per-packet mask
Reliability Selective ACK with cumulative + SACK ranges
Retransmission Rate-limited NACK + exponential backoff RTO
Keepalive Ping/Pong with RTT measurement every 5s

Building from Source

# Requires Rust 1.75+
cargo build --release

# Cross-compile for Linux
cross build --release --target x86_64-unknown-linux-gnu

Documentation


License

GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE for more details.


Contacts