Amnezia + Go = Amnezigo
A CLI tool and Go library for generating AmneziaWG v2.0 configurations from a declarative manifest.
- Declarative manifests — describe the full network topology in
amnezigo.jsonor.amnezigo.jsonnet - One-shot generation —
amnezigo generatebuilds the server plus every client config in a single atomic run - Credential reuse — keys are recovered from existing output, so re-running
generatekeeps peers stable - AmneziaWG obfuscation — S1–S4 size prefixes, H1–H4 header ranges, junk packets, and per-client I1–I5 custom packet strings
- Protocol templates — QUIC, DNS, DTLS, STUN, SIP, and RTP handshake shapes
- Built-in presets — tuned parameter sets for LAN, home, mobile, and CI environments
- iptables rules — PostUp/PostDown NAT and forwarding generated when
main_ifaceis set - Validation —
amnezigo validatechecks configs against AWG 2.0 invariants - Heuristic analysis —
amnezigo analyzeinspects obfuscation strength - IPv4 & IPv6 endpoint auto-detection
- Usable as a Go library
Install the CLI:
go install github.com/Arsolitt/amnezigo/cmd/amnezigo@latestOr build with Docker:
docker build -t amnezigo .Declare your network in amnezigo.json — one server peer (sets both endpoint and listen_port) plus any number of client peers:
{
"version": 1,
"network": { "mtu": 1280 },
"obfuscation": { "protocol": "quic" },
"peers": {
"server": {
"address": "10.0.0.1/24",
"endpoint": "vpn.example.com:51820",
"listen_port": 51820
},
"phone": { "address": "10.0.0.2/32" }
}
}Generate the server and client configs:
# Writes output/server/awg0.conf and output/<peer>/awg0.conf
amnezigo generate
# Check a generated config against AWG 2.0 invariants
amnezigo validate output/server/awg0.conf
# Inspect obfuscation strength
amnezigo analyzeSee llms-full.txt for the full manifest field reference.
Built-in presets provide tuned obfuscation parameters for common network environments. There is no preset field — copy a preset's values into the obfuscation block of your manifest (or a Jsonnet library):
| Preset | Description |
|---|---|
lan-conservative |
Small S values, narrow junk range for corporate LANs with minimal DPI |
home-balanced |
Moderate parameters for home internet connections (default) |
mobile-aggressive |
Large S/junk for carrier networks with heavy DPI (MTS, Beeline) |
stealth-paranoid |
Max S4 + wide junk/headers for hostile DPI (GFW, Iran); ~3% per-packet cost |
standard-1420 |
Balanced profile at the classic WG MTU 1420 — more I-packet headroom |
low-overhead |
Minimal overhead for bandwidth-constrained links (satellite, metered) |
test-minimal |
Smallest valid set for integration testing and CI |
Use amnezigo.GetPreset(name) from Go code, or copy the values from the Presets reference.
Human-readable reference docs live under docs/:
| Section | Pages |
|---|---|
| Getting started | Overview · Installation · Quick Start |
| Reference | Manifest · Examples · CLI · Library · Output Format · Obfuscation · Presets |
| Guides | Jsonnet · Credentials · Validation · Gotchas |
The AI-friendly single-file documentation is at docs/llms-full.txt.
It is recommended to copy the following prompt and send it to an AI assistant — this can significantly improve the quality of generated AmneziaWG configurations:
https://raw.githubusercontent.com/Arsolitt/amnezigo/refs/heads/main/docs/llms-full.txt This link is the full documentation of Amnezigo.
【Role Setting】
You are an expert proficient in network protocols and AmneziaWG configuration.
【Task Requirements】
1. Knowledge Base: Please read and deeply understand the content of this link, and use it as the sole basis for answering questions and writing configurations.
2. No Hallucinations: Absolutely do not fabricate fields that do not exist in the documentation. If the documentation does not mention it, please tell me directly "Documentation does not mention".
3. Default Format: Output INI format configuration by default (unless I explicitly request a different format), and add key comments.
4. Exception Handling: If you cannot access this link, please inform me clearly and prompt me to manually download the documentation and upload it to you.
