[–] [S] 1 point 1 day ago (1 child)

True, if every device can do the split itself, you don't need a second box for that. With plain AmneziaWG apps, though, a client-side split means a long AllowedIPs list in every config, and redoing it on every phone when the list changes. On the entry it's one ipset: the phones keep a short config, and I update the list in one place.

And yeah, mobile whitelists are the other big reason to put the entry inside Russia. I didn't lead with that because getting an entry IP that's actually on those lists is mostly luck now, like you said.

  • source
  • parent
  • context
  • [–] [S] 3 points 2 days ago (1 child)

    Thanks! If you try it, start with the plain single-server install and make sure it works on its own, then add the second VPS. If you get stuck anywhere, leave a comment here or in the GitHub discussions and I'll take a look.

  • source
  • parent
  • context
  •  

    If you run a VPN for people in Russia, a plain full tunnel to a foreign VPS breaks things like banking apps: they see a foreign hosting address and refuse it. The setup I keep running for a few friends fixes that with two VPS.

    Devices connect to an entry server in Russia. Traffic to Russian IP ranges leaves from there directly, and everything else goes through an AmneziaWG tunnel to a second server abroad. AmneziaWG is a WireGuard fork with obfuscation; plain WireGuard gets blocked there.

    The split lives entirely on the entry: an ipset with the Russian ranges, a firewall mark and a separate routing table. Clients keep one ordinary config, and when the exit's address gets blocked, I replace the exit without touching anyone's phone.

    Caveats: IPv4 only, and the entry sees all client traffic, so it has to be a box you trust. The write-up has the setup on Debian or Ubuntu, how to check both paths, and which commands are safe to post when you ask for help. The installer and the routing script are plain bash under MIT: https://github.com/bivlked/amneziawg-installer

    I went with ipset and fwmark because it keeps the clients dumb. If you split traffic like this some other way, I'd like to hear how.

    [–] [S] 1 point 7 months ago

    Blocking has to happen real-time on every packet — a DPI box needs a fixed pattern to match. AWG shifts its headers per install, so there's no stable rule to write. Statistical detection (what litchralee described above) is possible but too slow and expensive to run inline at ISP scale - you'd need to collect and analyze flow data over hours before making a call. By then the connection is long gone.

  • source
  • parent
  • context
  • [–] [S] 1 point 7 months ago

    Referenced your comment in my top-level reply - you got the mechanism right. One thing worth adding on the statistical angle: building a baseline requires known AWG traffic to train on first. CPS (I1-I5) randomizes packet timing and cadence on top of headers, which makes even gathering that training data harder. Per-target surveillance is real but it's a different threat model from what the tool addresses.

  • source
  • parent
  • context
  • [–] [S] 1 point 7 months ago (1 child)

    Hey, saw your PR #43 - the QEMU build matrix is a solid start. Left a comment there about two things: the /output mount path issue in the CI workflow, and the awg-tools version question (the PPA arm64 build might still be 1.x). Are you working on those, or would it help if I tested on my end?

  • source
  • parent
  • context
  • [–] [S] 2 points 7 months ago (2 children)

    Fair question. When the H1-H4 thing happened, my first thought was "why didn't the tests catch this?" - because there wasn't a test for it. Now there is.

    I use bats - 85 tests in 10 files. The H1-H4 fix got its own test_h_ranges.bats with 10 cases, including an INT32_MAX boundary check that runs 20 iterations. All scripts also pass shellcheck with zero warnings.

    Every release gets tested on a fresh VPS - Ubuntu 24.04 and Debian 13, full install through both reboots, then every manage command. For bigger changes I get a second pair of eyes on the code - that's how we caught a restore function not enforcing 600 perms on key files before it shipped.

    No CI yet though - tests run locally and on the VPS, not on every push. GitHub Actions is next. The ARM PR (#43) is already adding CI for the ARM builds, so it's a good time to wire up x86_64 too.

  • source
  • parent
  • context
  • [–] [S] 3 points 7 months ago

    Fair call - the client-driven install is a legit option if you want a GUI. The script is the other angle: read it before running, watch it work over SSH, no background magic. Same protocol, different workflow.

    Also thanks for the "it works from Russia" confirmation further up - means more than any testing I could run myself.

  • source
  • parent
  • context
  • [–] [S] 2 points 7 months ago (7 children)

    Author here. Didn't expect this post to blow up like this — thanks for all the questions.

    A bug came up right after I posted, and I just pushed out v5.8.0 for it. A user couldn't get the tunnel up on a mobile connection in Russia, and I traced it back to the H1-H4 hash ranges: turns out I was hardcoding the same four ranges into every install, so every server running this script had an identical static fingerprint. The TSPU apparently learned those defaults - my bad.

    The fix: H1-H4 now get randomized per install from /dev/urandom - different values every time, no shared defaults. Each server speaks its own dialect.

    On the detection-vs-blocking point (possiblylinux127, WhyJiffie): you're right that shape-shifting headers don't make traffic invisible, just unmatchable to a simple rule. litchralee nailed it further up - statistical analysis over time could still fingerprint this, but that's a per-target attack, not something a national DPI box runs on everyone. For the ISP-level blocking that's actually happening in Russia and Iran right now, per-install randomization is what matters.

  • source
  •  

    WireGuard is blocked by DPI in 10+ countries now. AmneziaWG 2.0 is a fork that makes the traffic look like random noise - DPI can't tell it apart from normal UDP. Same crypto under the hood, negligible speed overhead.

    I wrote an installer that handles the whole setup in one command on a clean Ubuntu/Debian VPS - kernel module, firewall, hardening, client configs with QR codes. Pure bash, no dependencies, runs on any $3/month box. MIT license.

    Been running it from Russia where stock WireGuard stopped working mid-2025.

    Update, November 2026: the installer now sets up AmneziaWG 3.1 by default, which encrypts the packet headers with a per-server key; 2.0 is still there with --protocol=2.0 for routers and older apps. Supported: Ubuntu 24.04 / 26.04, Debian 12 / 13.