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.

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 2 days ago (2 children)

You can do this routing on the client. The point of the cascade is to bypass whitelists on mobile internet, since whitelists are not yet enabled on the wired internet. You run a proxy on Russian vps that's whitelisted (probably nearly impossible to get these days) and it routes the traffic to awg/vless/etc VPN server on a foreign vps.

  • source
  • hideshow 2 child comments
  • [–] [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
  • hideshow 1 child comment