TrustTunnel: AdGuard's VPN protocol over HTTP/2 and HTTP/3

TrustTunnel is a VPN protocol made by AdGuard VPN and published as open source in January 2026 under the Apache-2.0 license. It carries TCP, UDP and ICMP through ordinary HTTP/2 or HTTP/3 connections and leaves all encryption to TLS, so on the network it looks like HTTPS to a website. A server runs the TrustTunnel endpoint, and a client gets its settings as a tt:// link.

Updated

On this page

Facts

What it is

VPN protocol: TCP, UDP and ICMP over HTTP/2 or HTTP/3

Since, by

AdGuard VPN; open source since January 2026

Transport

HTTP/2 over TLS (TCP) or HTTP/3 over QUIC (UDP)

Encryption

TLS 1.2+ or QUIC's TLS 1.3; no cipher of its own

To the network it looks like

HTTPS or HTTP/3 to a website; Chrome-like ClientHello by default

Usual port

443 on TCP and UDP (endpoint default)

Comes as

tt://? link (TLV in base64url), TOML or subscription

License

Apache-2.0; endpoint in Rust, client in C++

In Veli

Not supported

Versions and history

  1. 2022–2025

    Inside AdGuard VPN

    The endpoint's changelog goes back to November 2022. AdGuard says the same protocol runs in all AdGuard VPN apps.

  2. Dec 2025

    Specification 1.0

    The protocol document is marked version 1.0, dated 24 December 2025: HTTP/2 and HTTP/3 transport, CONNECT streams, UDP and ICMP multiplexing.

  3. Jan 2026

    Open source

    On 21 January 2026 AdGuard publishes the specification, the endpoint and the clients under Apache-2.0.

  4. Feb–Mar 2026

    1.0 and tt:// links

    1.0.1 adds the tt:// link library, 1.0.6 the X25519MLKEM768 post-quantum key exchange, and 1.0.13 changes links to the tt://? form.

  5. Oct 2026

    Subscriptions

    The 1.3.0 betas add subscription URLs with link format version 2, and client_random_auth_key, a key-derived mark in the TLS client random.

  6. Nov 2026

    1.3.1

    Links get a numeric tls_profile (Chrome, Safari, Firefox and others), and the setup wizard moves into the endpoint binary.

How TrustTunnel works

The client opens one session to the endpoint: HTTP/2 over TLS 1.2 or newer with ALPN h2, or HTTP/3 over QUIC version 1 with ALPN h3. A client may try HTTP/3 first and fall back to HTTP/2 after a delay, one second by default. The HTTP/2 stream window is 131072 bytes, the value Chrome uses.

Every TCP connection the user makes becomes its own stream: a CONNECT request whose :authority is the real target, for example example.com:443, with the login in a proxy-authorization: Basic header. A 200 answer turns the stream into a plain byte pipe, and the endpoint opens the TCP connection to the target itself. This is how an authenticated HTTPS proxy works.

UDP and ICMP use reserved pseudo-hosts. A single stream to _udp2 carries all UDP flows as frames: a length, source and destination addresses (16 bytes each, IPv4 padded with zeros), ports, the app name and the payload. A stream to _icmp carries echo requests and replies, so ping works through the tunnel. A CONNECT to _check is the health check, sent when no data has arrived for 7 seconds.

So TrustTunnel does not move raw IP packets like WireGuard: the client splits traffic into connections and sends each through HTTP. On the server side the endpoint can pass traffic on to a SOCKS5 proxy instead of going out directly.

The tt:// link field by field

The endpoint exports a user's settings as a tt://? link by default, or as TOML with --format toml:

Terminal
./trusttunnel_endpoint vpn.toml hosts.toml -c alice -a 203.0.113.10

After tt://? comes base64url without padding. Inside is binary TLV: a tag, a length and a value, the tag and length written as QUIC variable-length integers. Clients skip tags they don't know, so new fields do not break old apps. Here is a link with made-up values: version 2, server vpn.example.com at 203.0.113.10:443, user alice, HTTP/3 and the name Home server.

Example
tt://?AAECAQ92cG4uZXhhbXBsZS5jb20CEDIwMy4wLjExMy4xMDo0NDMFBWFsaWNlBg93Ny1yaXZlci1jYW5kbGUJAQIMC0hvbWUgc2VydmVy
  • 0x00

    Fieldversion

    MeaningLink format version; encoders write 2

  • 0x01

    Fieldhostname

    MeaningServer name for TLS and the certificate check

  • 0x02

    Fieldaddresses

    MeaningIP:port or domain:port; may repeat

  • 0x03

    Fieldcustom_sni

    MeaningA different SNI to send

  • 0x05, 0x06

    Fieldusername, password

    MeaningThe login, sent in proxy-authorization

  • 0x07, 0x08

    Fieldskip_verification, certificate

    MeaningSkip the certificate check, or pin a DER chain

  • 0x09

    Fieldupstream_protocol

    Meaning1 is HTTP/2 (default), 2 is HTTP/3

  • 0x0A

    Fieldanti_dpi

    MeaningThe client's anti-DPI measures; off by default, not described

  • 0x0B, 0x0F

    Fieldclient_random_prefix, client_random_auth_key

    MeaningA mark in the TLS client random that server rules check

  • 0x0C, 0x0D

    Fieldname, dns_upstreams

    MeaningName in the app; DNS servers used through the tunnel

  • 0x0E

    Fieldsubscription_url

    MeaningHTTPS address the client fetches its settings from

  • 0x10

    Fieldtls_profile

    MeaningClientHello to copy: Chrome (default), Safari, Firefox, OkHttp and others

  • Treat the link like a password: after decoding, the username and password are plain text.
  • Subscription-only links hold just version and subscription_url; the client must fetch the rest before it connects.

Server and clients

The endpoint is written in Rust and runs on Linux and macOS; there are packages for x86_64 and aarch64 Linux and universal macOS, a Docker setup, and Nix and OpenWrt packages in the same GitHub organisation. trusttunnel_endpoint --setup-wizard writes the configuration and can get a Let's Encrypt certificate over ACME, or make a self-signed one that goes into the client link.

The configuration is four TOML files. vpn.toml holds the listen address, 0.0.0.0:443 by default, and the HTTP/1.1, HTTP/2 and QUIC listeners; hosts.toml the certificates per host name; credentials.toml the users and passwords; rules.toml allow and deny rules by client IP range or TLS client random.

On the client side AdGuard's command-line client, written in C++, runs on Linux, macOS and Windows as a system-wide TUN tunnel or a SOCKS5 proxy, and TrustTunnel apps exist for iOS, Android, macOS and Windows. Among third-party apps Shadowrocket supports the protocol, Surge has experimental support, and mihomo has a trusttunnel proxy type.

What a censor sees

Passively, TrustTunnel is a TLS connection on TCP 443 or a QUIC connection on UDP 443 to the server's domain, with ALPN h2 or h3. The ClientHello copies a browser, Chrome by default, and the HTTP/2 stream window is Chrome's too. Everything after the handshake is encrypted: the CONNECT targets, the _udp2 frames and the password do not show on the wire. AdGuard says this makes it hard to tell from regular HTTPS; that is the design goal, not a measured result.

Actively, a prober that sends a request without valid credentials gets 407 Proxy Authentication Required by default, which is how a proxy answers, not a website. Since 1.0.41 requests other than CONNECT can get 403, 404 or 405 instead, and a separate host name can be passed to a real web server through [reverse_proxy]. Rules on the TLS client random let the server turn away clients without the right mark: a fixed prefix repeats the same bytes in every handshake, while the key-derived form from 1.3.0 changes them each time.

We found no published study of TrustTunnel itself as of December 2026. General results still apply. Xue et al. (USENIX Security 2024) detected obfuscated proxies by the TLS handshakes nested inside the tunnel, and every HTTPS site opened through a TrustTunnel CONNECT stream is such a nested handshake. In HTTP/3 mode it is ordinary QUIC, so QUIC filtering, such as the Great Firewall's blocking by server name since April 2024 described by Zohaib et al. (USENIX Security 2025), hits it like any HTTP/3 site.

Strengths and weaknesses

Strengths

  • Open specification and Apache-2.0 code for the server and the clients
  • Plain HTTP/2 or HTTP/3 with TLS, no home-made cryptography
  • Carries TCP, UDP and ICMP, so ping works through it
  • One tt:// link or a subscription URL holds the whole setup
  • Setup wizard with Let's Encrypt and a Chrome-like ClientHello by default

Weaknesses

  • Public only since January 2026, and the link format has already changed several times
  • Few clients outside AdGuard's own: Shadowrocket, Surge (experimental), mihomo
  • No independent research yet on how it can be detected
  • By default a prober without a password gets a proxy's 407 reply
  • Over HTTP/2 all UDP flows share one TCP stream, so one loss holds them all up

Sources

How we write and check

In Veli

TrustTunnel in Veli

Veli does not connect TrustTunnel and does not open tt:// links.

Veli opens VLESS, VMess, Trojan, Shadowsocks, Hysteria2, TUIC, WireGuard, AmneziaWG and OpenVPN; OpenVPN on Windows and Linux.

Questions

What is TrustTunnel?

A VPN protocol from AdGuard that carries TCP, UDP and ICMP through HTTP/2 or HTTP/3, so it looks like HTTPS. AdGuard published it as open source in January 2026.

Is TrustTunnel open source?

Yes. The specification, the endpoint in Rust and the client in C++ are on GitHub under the Apache-2.0 license.

What is a tt:// link?

A TrustTunnel client profile: binary fields with the server, addresses, login and options, encoded in base64url. It holds the password in plain text, so keep it private.

Can I use TrustTunnel without AdGuard VPN?

Yes. You can run your own endpoint on a Linux or macOS server and connect with the open TrustTunnel clients, or with Shadowrocket or mihomo.

Can TrustTunnel be detected?

No study has been published yet. It looks like HTTPS or HTTP/3, but by default a probe without a password gets a proxy's 407 reply, and nested TLS handshakes are a known way to spot tunnels.

Hysteria2 or TrustTunnel?

Different protocols: Hysteria2 is a QUIC proxy with its own speed control, TrustTunnel is AdGuard's VPN over HTTP/2 or HTTP/3. A link of one does not open in a client that knows only the other.