AmneziaWG Container for Mikrotik Routers Achieves Major Performance and Feature Upgrades Six Months On

A developer released an initial AmneziaWG container for Mikrotik devices at the start of the year and has since iterated extensively on the project. The container now stands as the smallest and fastest implementation available, weighing only 94.7 KB while delivering up to 300 Mbit/s on Hap Ax3 hardware and 200 Mbit/s on Hap Ax2 models. It leverages Mikrotik's native Wireguard implementation for cryptographic acceleration and adds AmneziaWG obfuscation features entirely in software. Subsequent updates introduced support for protocol versions up to 3.1, dynamic port randomization, IPv6 in dual-stack mode, improved MTU handling, and a privileged mode buffer increase in RouterOS 7.24 that removed previous throughput bottlenecks. The project also gained a server mode for interconnecting multiple Mikrotik devices, an offline configurator, and automatic recovery features for WARP-style clients. Despite an early GitHub ban caused by test code that triggered external connections during CI builds, the repository has grown to over 370 stars and remains actively maintained.

HabrTranslated from Russian

Read at source

AmneziaWG container development for Mikrotik routers has progressed substantially since its initial release earlier this year. The project began as a lightweight solution to bring the full AmneziaWG protocol stack to devices that already possess an efficient native Wireguard implementation.

How the Container Works

The AmneziaWG protocol consists of roughly 80 percent standard Wireguard and 20 percent additional obfuscation mechanisms that insert random junk packets and padding. By offloading the cryptographic operations to Mikrotik's hardware-accelerated Wireguard engine and implementing only the obfuscation layer in software, the container achieves high throughput while remaining extremely compact at 94.7 KB.

Current measured performance reaches nearly 300 Mbit/s on Mikrotik Hap Ax3 devices and 200 Mbit/s on Hap Ax2 models. The container also functions in server mode, enabling direct AmneziaWG connections between multiple Mikrotik routers.

Protocol Evolution and Technical Improvements

Support was added for AmneziaWG versions 1.0 through 3.1, including random packet-size padding introduced in version 2.0 and protocol-mimicry patterns added in version 3.0. The container was later rewritten from Go to C, reducing image size from 5 MB to approximately 80-90 KB and increasing throughput by roughly 50 percent.

Additional features include DNS hostname resolution with automatic failover between IPv4 and IPv6, selective routing for Russian IP ranges, automatic port randomization within configurable ranges, and dynamic MTU adjustment based on the S4 padding parameter. A privileged mode introduced in RouterOS 7.24 allows the container to increase interface buffer size to 32 MB, eliminating packet drops that previously limited sustained speeds.

Project Challenges and Community Response

Shortly after the first public article, the original GitHub repository was banned because CI tests performed external network connections. The author recreated the project under a new account, removed the problematic tests, and the repository has since accumulated more than 370 stars without further incidents.

An offline configurator generates the necessary Mikrotik commands without any external requests, and a Telegram bot was developed to produce configuration strings and QR codes for both AmneziaVPN and native AmneziaWG servers.

Independent testing and feedback from community members helped refine PPPoE compatibility, IPv6 dual-stack operation, and automatic reconnection logic for users running the container as a WARP client.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in Privacy & Surveillance

Samsung Bixby Sends Data to Cloud Despite Galaxy AI On-Device Processing Setting
Maximizing iPhone Privacy: Essential Settings to Enable, Disable, and Verify Immediately
Top 10 Secure DNS Servers for Privacy, Threat Blocking and Ad Filtering in 2026