e0e53665f1
Adds a way to make the outer-TLS SNI rotate among popular Russian-language
domains so that Russian carriers — who may start metering "foreign traffic"
separately — see the user's first hop as a domestic CDN/site request, not
as an exotic foreign destination.
- aura-crypto::masks:
- SNI_PALETTE_RUSSIAN (15 real domains: mail.yandex.ru, vk.com, www.ozon.ru,
dzen.ru, ya.ru, www.gosuslugi.ru, www.wildberries.ru, rutube.ru,
news.rambler.ru, hh.ru, www.tinkoff.ru, lenta.ru, www.kinopoisk.ru,
afisha.yandex.ru, music.yandex.ru).
- enum SniPalette { Default, Russian, Mixed } (Default = v2 behavior).
- derive_mask_for_msk_date_with_palette(...): pick from chosen palette,
Mixed flips ~50/50 by HKDF okm[8]&1. Old derive_mask_for_msk_date kept
as a thin wrapper -> byte-for-byte unchanged Default.
- aura-cli::masks::MaskRotator gains new_with_palette(...); the spawn loop
uses the stored palette. Old new() preserves Default.
- aura-cli config: [transport.masks] palette = "default"|"russian"|"mixed"
(serde rename_all = "lowercase", default Default).
- server.rs/client.rs read cfg.transport.masks.palette and pass it to the
rotator at startup; logged at INFO so the operator sees the choice.
- docs/deployment.md: new §7 "Сервер в РФ против тарификации иностранного
трафика" — context, ASCII topology, recommended RF providers, full
server.toml + client.toml examples wiring [server.relay] + russian
palette + LE outer cert + multi-hop, plus an honest list of what this
does and does not give.
- config/{server,client}.toml.example updated with palette = "default".
Workspace: 284 tests passed (+8 new = 4 crypto + 2 cli masks + 2 config),
clippy -D warnings clean, fmt clean. 276 baseline tests untouched.
Backward-compatible: configs without palette default to Default, identical
to v2 wire behavior.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
181 lines
8.5 KiB
TOML
181 lines
8.5 KiB
TOML
# Aura VPN client configuration (project §9).
|
|
# Copy to client.toml and adjust. Paths may begin with `~` (expands to your home directory).
|
|
|
|
[client]
|
|
# Human-readable client name / id.
|
|
name = "laptop"
|
|
# Server UDP socket address.
|
|
server_addr = "203.0.113.10:443"
|
|
# Outer-TLS SNI (camouflage hostname) presented to the server. Also the name verified
|
|
# inside the Aura handshake against the server certificate's SAN.
|
|
sni = "cdn.example.com"
|
|
# Optional: drop privileges to this non-root user AFTER the TUN device has been brought up.
|
|
# Recommended when `aura client` is launched via sudo so the long-running router loop runs
|
|
# as an ordinary user. Linux uses setresuid/setresgid; macOS uses setgid/setuid; Windows is a
|
|
# no-op (use a service account instead). When omitted (or already running as non-root) no
|
|
# privilege change happens.
|
|
# run_as = "nobody"
|
|
# Suppress identifier fields (peer_id, client_ip, source_addr, ...) from log output. The events
|
|
# still fire; only the identifying fields are dropped before formatting. Default: false. Set to
|
|
# true to keep the local log file from accumulating per-session identifiers.
|
|
no_logs = false
|
|
# Optional fallback server addresses (IP or IP:port). When the primary `server_addr` cannot be
|
|
# reached on any transport, the client retries the bridges in a process-randomised order, using
|
|
# the same per-transport ports from [transport]. The bridge `:port` part is parsed but ignored.
|
|
# bridges = ["203.0.113.11", "203.0.113.12"]
|
|
|
|
[pki]
|
|
# Trust anchor (the Aura CA) and this client's leaf cert/key, all PEM.
|
|
# Issue with: aura pki issue-client --id laptop --out ~/.aura --ca ~/.aura
|
|
ca_cert = "~/.aura/ca.crt"
|
|
cert = "~/.aura/client.crt"
|
|
key = "~/.aura/client.key"
|
|
|
|
[tunnel]
|
|
# Requested TUN interface name (advisory on macOS, where the kernel assigns utunN).
|
|
tun_name = "aura0"
|
|
# Local address assigned to the TUN device, and its prefix length.
|
|
local_ip = "10.7.0.2"
|
|
prefix = 24
|
|
# TUN MTU.
|
|
mtu = 1420
|
|
# Tunnel resolver DNS (informational; the system resolver is used in v1).
|
|
dns = "10.7.0.1"
|
|
|
|
# Split-tunnel routing: the default action plus per-destination overrides.
|
|
[tunnel.split]
|
|
# Default for destinations matching no rule below: "VPN" or "DIRECT".
|
|
default = "VPN"
|
|
|
|
# Send these directly (bypass the tunnel): RFC1918 ranges stay on the LAN...
|
|
[[tunnel.split.direct]]
|
|
cidr = "192.168.0.0/16"
|
|
|
|
[[tunnel.split.direct]]
|
|
cidr = "10.0.0.0/8"
|
|
|
|
# ...and a corporate domain egresses directly (resolved to host routes at startup).
|
|
[[tunnel.split.direct]]
|
|
domain = "intranet.example.com"
|
|
|
|
# Force a more-specific range back through the VPN (longest-prefix wins over 10.0.0.0/8).
|
|
[[tunnel.split.vpn]]
|
|
cidr = "10.7.0.0/24"
|
|
|
|
# v2: OS-level split-tunnel routing. With `enabled = true` (the default) the client programs the
|
|
# system routing table at startup so DIRECT destinations bypass the TUN entirely — they continue
|
|
# to use the host's original default gateway, while only VPN-classified traffic reaches the
|
|
# tunnel. This eliminates the v1 user-space `send_direct` stub, where DIRECT packets were merely
|
|
# logged and dropped. The guard is RAII: the routes are rolled back when `aura client` exits.
|
|
#
|
|
# Linux: uses `ip route add ... via <gw> dev <egress>` for bypasses and `ip route add ... dev <tun>`
|
|
# for the VPN default; the VPN default carries metric 50 so it wins over DHCP-installed defaults.
|
|
# macOS: uses `route add -net <cidr> <gw>` for bypasses and `route add -net <cidr> -interface <tun>`
|
|
# for VPN routes.
|
|
# Windows: not implemented in v1 (the section is parsed but the install is a logged no-op).
|
|
[tunnel.os_routes]
|
|
# Master switch. `false` falls back to the v1 user-space router (the `send_direct` path drops
|
|
# DIRECT packets; kept intentionally as a fallback). Default: true.
|
|
enabled = true
|
|
# When `true`, every routing command is only logged (`would run: ...`) and not executed —
|
|
# useful for testing the plan without root. Default: false.
|
|
dry_run = false
|
|
# Optional explicit IPv4 default gateway. When omitted, auto-detected (Linux:
|
|
# `ip route show default`; macOS: `route -n get default`).
|
|
# gateway = "192.168.1.1"
|
|
# Optional explicit egress interface name (e.g. "eth0" on Linux, "en0" on macOS). When omitted,
|
|
# auto-detected alongside the gateway.
|
|
# egress_iface = "en0"
|
|
|
|
[mimicry]
|
|
# Enable traffic padding to blend packet sizes into HTTPS buckets.
|
|
padding = false
|
|
|
|
[transport]
|
|
# Fallback order tried left-to-right ("handover"): the first transport that connects wins. Aura's
|
|
# own UDP transport is primary; TCP/443 and QUIC (HTTP/3 mimicry) are fallbacks for networks that
|
|
# throttle or block plain UDP. Omitting this whole section uses ["udp","tcp","quic"] on 443/443/444.
|
|
order = ["udp", "tcp", "quic"]
|
|
# Per-transport server ports. The server IP comes from [client] server_addr above (its port there is
|
|
# ignored). The UDP transport and QUIC both ride UDP, so udp_port and quic_port MUST differ; TCP may
|
|
# reuse the UDP port number.
|
|
udp_port = 443
|
|
tcp_port = 443
|
|
quic_port = 444
|
|
# UDP: pad datagrams up to HTTPS size buckets to blur the on-wire size distribution.
|
|
obfuscate = true
|
|
# TCP: prepend a minimal HTTP/1.1 preamble (Host = [client] sni) so the open resembles plain HTTP.
|
|
masquerade = true
|
|
|
|
[transport.masks]
|
|
# Daily protocol-mask rotation. When `true`, every day at 05:00 MSK (= 02:00 UTC) the client
|
|
# derives a new (SNI, User-Agent, Server-header, padding-profile) tuple from
|
|
# HKDF-SHA256(CA-fingerprint, MSK-date) and uses it for any subsequent connect — the server derives
|
|
# the same tuple independently from the same CA fingerprint, so no wire coordination is needed.
|
|
# Existing connections keep the mask they connected with. Default: true.
|
|
# When `false`, the static values above ([client] sni, [transport] obfuscate, ...) are used as-is.
|
|
enabled = true
|
|
# v3.2: which SNI palette the daily rotator picks from. Must generally match the server's
|
|
# [transport.masks] palette so the daily SNI looks consistent across both sides' logs.
|
|
# "default" (back-compat) — global CDN-like names. Use against any foreign-hosted server.
|
|
# "russian" — top Russian domains (vk.com / ozon.ru / mail.yandex.ru / ...).
|
|
# Use when the entry-relay is a Russian VPS so the outer SNI looks
|
|
# like ordinary HTTPS to a domestic site (see docs/deployment.md § 7).
|
|
# "mixed" — HKDF flips between Default and Russian per day for variety.
|
|
palette = "default"
|
|
|
|
[transport.knock]
|
|
# UDP port-knocking. Must match the server's setting. Default: false.
|
|
enabled = false
|
|
knock_secret_source = "ca_fingerprint"
|
|
|
|
[transport.cover]
|
|
# Idle-time cover traffic. Must match the server's setting. Default: false.
|
|
enabled = false
|
|
mean_interval_ms = 500
|
|
jitter = 0.5
|
|
|
|
# v3.1 / v3.2 multi-hop / onion routing: dial through 1 or 2 intermediate hops before reaching
|
|
# the exit-server. When `enabled = true`, the client opens an OUTER Aura UDP connection to
|
|
# `hops[0]` (the entry-relay), sends one ExtendBridge envelope describing the next hop, waits for
|
|
# CircuitReady, then either dials the exit directly (2-hop) or repeats the ExtendBridge dance
|
|
# through a middle relay (3-hop). The innermost handshake authenticates the EXIT's cert opaquely
|
|
# — every relay sees only the next-hop address and AEAD ciphertext.
|
|
#
|
|
# v3.2 adds:
|
|
# * per-hop client certificates (the entry-relay and the exit see DIFFERENT CNs — they cannot
|
|
# link the two handshakes by identity), and
|
|
# * cell padding (every packet is padded to a constant `cell_size` bytes before sending — the
|
|
# exit MUST also enable `[server] cell_padding_for_circuit_clients = true` to decode), and
|
|
# * 3-hop support (just add a third [[client.circuit.hops]] table).
|
|
#
|
|
# Omitting the section (or `enabled = false`) keeps the v2 single-hop dial path intact.
|
|
#
|
|
# --- v3.1 FLAT FORM (back-compat) — every hop uses the [pki] cert/key above (NOT unlinkable):
|
|
# [client.circuit]
|
|
# enabled = true
|
|
# hops = ["198.51.100.5:443", "203.0.113.10:443"]
|
|
#
|
|
# --- v3.2 PER-HOP FORM — each hop has its own cert/key (identity-unlinkable):
|
|
# [client.circuit]
|
|
# enabled = true
|
|
# cell_padding = true
|
|
# cell_size = 1280
|
|
#
|
|
# [[client.circuit.hops]]
|
|
# addr = "198.51.100.5:443"
|
|
# cert_path = "~/.config/aura/circuit/entry.crt"
|
|
# key_path = "~/.config/aura/circuit/entry.key"
|
|
#
|
|
# [[client.circuit.hops]] # OPTIONAL middle hop for a 3-hop circuit
|
|
# addr = "198.51.100.99:443"
|
|
# cert_path = "~/.config/aura/circuit/middle.crt"
|
|
# key_path = "~/.config/aura/circuit/middle.key"
|
|
#
|
|
# [[client.circuit.hops]]
|
|
# addr = "203.0.113.10:443"
|
|
# cert_path = "~/.config/aura/circuit/exit.crt"
|
|
# key_path = "~/.config/aura/circuit/exit.key"
|
|
#
|
|
# Generate per-hop certs in one command: `aura provision-client --circuit-hops 3 ...`
|