Commit Graph
12 Commits
Author SHA1 Message Date
annel0 72e9cda9d5 Make RTP obfuscation hot path allocation-free
The per-packet wrap/unwrap path allocated a fresh output buffer, a key
string for the AEAD cache lookup, and a nonce slice on every datagram
(~1.3 KB / 3 allocs per packet). Under load this produced steady GC
pressure on the server.

Cache the cipher.AEAD on the wrapPacketConn at key-selection time and
reuse per-conn rx/tx buffers, with the nonce built on the stack. The
wire format is unchanged (verified by round-trip and old<->new
cross-compat tests), so existing clients keep working without updates.

Result: 1328 B/3 allocs -> 16 B/1 alloc per packet (the residual 16 B is
the nonce escaping through the cipher.AEAD interface, payload-independent).

Adds obfs_test.go covering nonce equivalence, round-trip across sizes,
old/new wire compatibility, wrong-key rejection, key-store selection, an
end-to-end wrapPacketConn exchange, and an allocation-bound regression
guard (skipped under -race, which distorts alloc counts).
2026-06-28 11:33:49 +03:00
amurcanov fe9f9d3d47 Merge pull request #190 from andbul/main
Чиню падение туннеля при подключении и пару связанных багов
2026-06-15 01:43:43 +03:00
amurcanov 7fa7394b45 Add link to improved Android fork of qWDTT 2026-06-15 00:40:44 +03:00
andbul0103andClaude Opus 4.8 6bf043d4d1 Make client DNS configurable via -dns flag end to end
Previously the deploy UI had DNS fields but server.go hardcoded
DNS=1.1.1.1 and defined no -dns flag, so passing -dns crash-looped the
service. Add a real -dns flag to the server (overrides the default,
comma-separated list supported) and feed the value into the client
WireGuard config; re-enable -dns in the app deploy, sending the trimmed
non-empty DNS fields (falling back to the server default when blank).

Requires a server-asset rebuild so the deployed binary accepts -dns.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 21:49:58 +04:00
andbul0103andClaude Opus 4.8 130a5841f5 Stop deploy passing unsupported -dns flag that crash-looped server
DeployTab always appended `-dns <dns1>,<dns2>` to the server ExecStart,
but wdtt-server (server.go) defines no -dns flag (DNS is hardcoded to
1.1.1.1). Go's flag parser aborts on unknown flags, so every deploy from
the app produced a unit that died with "flag provided but not defined:
-dns" / status=2/INVALIDARGUMENT and systemd restart-looped it.

Drop -dns from the deploy args so the unit matches what the binary
accepts. The DNS fields in the deploy UI are now cosmetic (server uses
its built-in 1.1.1.1); honoring them requires adding -dns support to
server.go and rebuilding the server asset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 21:46:19 +04:00
andbul0103andClaude Opus 4.8 e3b294bf69 Fix tunnel killed during connect by VPN-interface watchdog
The stats updater treated "WireGuard interface not up within 6s of the
Go client process start" as a lost/replaced VPN interface and emergency-
stopped the tunnel. But the interface only comes up after the client
finishes captcha -> VK creds -> WRAP -> TURN/DTLS -> WireGuard config,
which takes far longer than 6s (especially with manual captcha mode), so
the tunnel was killed ~7s into every connect before it could establish.

Watch for an interface that was actually up and then disappeared instead
of a fixed startup window: only emergency-stop once the tunnel has been
observed UP at least once. The connect phase of any duration is no longer
policed, while a real tun loss/replacement is still caught.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 19:54:15 +04:00
andbul0103 2d8fa61db3 Fix Android client binary build mode 2026-06-14 18:21:56 +04:00
amurcanov 3c59ab01f7 Merge pull request #178 from frenzydrive/fix-landscape-vk-hashes-dialog
Fix VK hashes dialog on landscape screens
2026-06-11 08:36:29 +03:00
a.pustovalov e3dc7057cb Fix VK hashes dialog on landscape screens 2026-06-09 15:42:50 +03:00
amurcanov 12c3e585d5 Update README.md 2026-06-04 01:47:31 +03:00
amurcanov 451b1dcd9c Update README.md 2026-06-04 01:44:32 +03:00
amurcanov 44361b2e5e Initial commit 2026-06-02 21:40:31 +03:00