Open-source project
mbm110/MSN-GUARD avatar
mbm110/MSN-GUARD

MSN-GUARD: a five-transport Android VPN with a Rust core, tuned for Iranian networks

High-performance Rust-powered Android VPN — Full-device tunneling via SHARD (Custom Protocol), MASQUE/HTTP-3, WireGuard, WARP-on-WARP, Psiphon, and Tor.

747 stars131 forksKotlinAGPL-3.0

At a glance

What is it?
MSN-GUARD is an AGPL-3.0 Android VPN client that routes all device traffic through MASQUE over HTTP/3, WireGuard, WARP-on-WARP, Psiphon or Tor, with a Rust networking core behind a Kotlin UI. Its protocol choices come from measurements on Iranian carriers, and the README deliberately withholds the connection strategy.
Who is it for?
Adopt MSN-GUARD if you need full-device tunneling on Android 8.0+ and want MASQUE over HTTP/3 or WireGuard rather than a browser-only proxy, and you accept that the README intentionally omits handshake parameters, gateway ranking and timing budgets. Do not adopt it if you need an audited, reproducible build today: the README does not describe a release signing process, and the only build path it names is the GitHub Actions workflow.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Kotlin, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • mbm110/MSN-GUARD747 ★ · +265
Star history
Repository2026-09-212026-11-25
mbm110/MSN-GUARD482747

265 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The problem MSN-GUARD solves, and who it is aimed at

Most Android proxy apps cover the browser and little else. MSN-GUARD works at the level of Android's own VpnService: it creates a TUN interface and pushes every TCP, UDP and QUIC packet from every installed app through the tunnel. That is the difference the README draws first, and it is the reason the app needs the VPN permission rather than a per-app proxy setting.

The README states plainly that the target is Iranian networks and that every protocol choice inside the app came out of measurements on domestic carriers rather than from documentation. Where a measurement disagreed with an official specification, the measurement won. That is an unusual thing to put in a README, and it shapes who the project is for: users on networks where standard transports are blocked or throttled, not users who want a generic commercial VPN with a server map and a subscription page.

There is no intermediary server operated by the project. The README says the phone talks directly to an upstream gateway. Tor and Psiphon are the two exceptions in structure: they run their own cores and attach to the same TUN through a local SOCKS interface.

Packet path: TUN, tun2socks, local SOCKS, Rust core

The README lays out the outbound path in six steps. A user app sends a packet. The packet enters the Android TUN interface. The tun2socks stack with lwIP terminates it in user space. It is then handed to a local SOCKS listener on loopback. The Rust core performs encryption and encapsulation. The packet goes to the upstream gateway and from there to the internet.

The code is split into three layers. Kotlin handles the VPN lifecycle and UI: MainActivity, MsnGuardVpnService, MsnGuardTileService, Tun2SocksManager, TorManager and TorSocksFront. TorSocksFront is where DNS is sent to Tor's own DNSPort, which matters because the README says DNS is forced to public resolvers and the carrier resolver is bypassed entirely. The Rust core compiles to libaether.so and contains prober.rs, account.rs, quic.rs, masque.rs, wireguard.rs and netstack.rs. The C layer is the badvpn tun2socks stack with lwIP for TCP, plus a separate datagram bridge that moves UDP and QUIC over loopback.

That datagram bridge is the part worth noting. Many Android VPN clients drop UDP or handle it badly, which breaks video, games and voice calls. The README claims real UDP and QUIC support because datagrams are bridged in user space rather than discarded.

MASQUE over HTTP/3, and why HTTP/2 is dead code here

The MASQUE transport implements CONNECT-IP over QUIC on top of the quiche library. The README's framing is that from the network's point of view this traffic is indistinguishable from an ordinary HTTPS connection, and that is the point: no protocol-specific fingerprint is left for DPI to match.

Four claims in the README are worth repeating because they describe real constraints. First, one semi-standard header value that the network edge actually accepts is not the value recorded in the standard; the standard value is rejected outright. Finding the correct variant was done by bisection against a live edge and is not documented publicly. Second, HTTP/2 cannot carry this transport at all: the h2 path never advertises the capability the transport depends on, so negotiation dies before it starts. The README is explicit that an HTTP/2 fallback here is not a degraded mode, it is dead code. Third, the initial gateway ordering is measured, not alphabetical: most published addresses refuse the handshake, only a small minority carry traffic, and the ranking is embedded in the build rather than discovered at runtime. Fourth, the gateway to use comes from a specific registration response, and a second response exists that looks equally valid and is wrong. Using the wrong one produces a clean handshake to a gateway that will never carry your packets, and the README admits this failure is genuinely hard to read from logs.

A short fixed startup budget governs the whole sequence. A gateway that answers once and then goes silent is treated as stuck, not slow, and the app reconnects instead of waiting.

Installing MSN-GUARD and making a first connection

The repository README does not contain a step-by-step install section. It points to the releases page through the version badge and the build status badge links to the GitHub Actions workflow at .github/workflows/build.yml on the master branch. So the realistic path for a user is to take an APK from the releases page, and the realistic path for a builder is to run the project's own CI steps.

The README states Android 8.0+ as the minimum. The project is a Gradle Kotlin build with build.gradle.kts, settings.gradle.kts, gradle.properties and a gradle/ wrapper directory. The repository root holds three helper scripts that mirror what CI does, and they are the only build entry points named in the repository layout:

bash
./ci-steps.sh
./ci-status.sh
./ci-artifacts.sh

The Rust core compiles to libaether.so, which means a build needs the Android NDK toolchain in addition to the JDK; the repository does not spell out the NDK version in the README, so check the Gradle files before assuming one.

Once installed, the README describes the interaction model as one button: gateway selection, negotiation and recovery are all automatic. The README says the connection is not declared successful until traffic has actually passed, so expect the status circle to stay in a connecting state until real packets flow. There is also a Quick Settings tile, MsnGuardTileService, for connecting and disconnecting without opening the app, and a split-tunnel option for choosing apps that stay outside the tunnel.

What the README deliberately does not tell you

The README contains an explicit statement that the connection strategy is withheld: handshake parameters, how gateways are selected and ranked, the ladder order, timing budgets, and the specific values that let a session survive active filtering. The reasoning given is that a working technique in this area has a useful life measured by how fast it is copied, and the ones that work are not written down. The document promises to explain what the app does and why it has this shape, not to hand over a ready-made bypass.

That is a coherent position, but it has consequences for anyone evaluating the project. You cannot audit the evasion logic from the README. You cannot reproduce the measurements that produced the embedded gateway ranking. If a transport stops working on your carrier, the README gives you no parameter to tune. The DESIGN.md and SECURITY.md files exist at the repository root and are the places to look for more, but based on the README alone, the tuning surface is closed.

A second limitation is structural. The README states that HTTP/2 fallback for MASQUE is dead code, so on a network that blocks or degrades QUIC there is no HTTP/2 escape hatch within that transport; you fall back to a different transport instead. And the WireGuard section states a rule that is expensive to get wrong: the same socket that passed validation must carry the traffic, because validating one tunnel and then rebuilding it is not equivalent.

MSN-GUARD compared with WireGuard-only Android clients

The obvious alternative for an Android user is the official WireGuard client, which is also built on VpnService and also tunnels the whole device. The difference is not the tunneling model, it is the transport count. A WireGuard-only client has one protocol with one fingerprint, and the README notes that WireGuard is tried first because where it works it is the fastest option. On a network that has closed UDP, that single transport is the whole product.

MSN-GUARD keeps WireGuard as one of five paths and adds MASQUE over HTTP/3, WARP-on-WARP, Psiphon and Tor. The MASQUE path is the interesting one for comparison purposes: it is designed to look like ordinary HTTPS, and the README says the transport implements CONNECT-IP over QUIC with quiche. A WireGuard handshake looks like a WireGuard handshake to any middlebox that recognizes it; a MASQUE session over HTTP/3 does not present that signature. The trade is complexity: five transports, a Rust core, a C packet stack and a Tor manager, against a client with one protocol and a much smaller surface.

Tor and Psiphon are a different kind of alternative again, since MSN-GUARD can run them itself. The README lists 27 exit countries for Tor and 25 for Psiphon, and a Tor-over-WARP mode for networks that block Tor directly. Those are the paths to reach for when the direct transports fail, at the cost of latency that the README does not quantify.

Licence, maintenance and upgrade cost

MSN-GUARD is licensed AGPL-3.0, per the LICENSE file and the badge in the README. The practical implication of AGPL for anyone embedding this in another product is that network use counts as distribution under that licence, so a modified version offered as a service carries source-availability obligations. That is a description of the licence, not legal advice; if you plan to redistribute or host it, read the LICENSE file and talk to someone qualified.

On maintenance, the repository is not archived and the last push was on 2026-09-16. The release cadence is visible: v1.7.0 on 2026-08-30, v1.8.0 on 2026-09-10 and v1.9.0 on 2026-09-13. That is three releases in roughly two weeks, which is a fast pace for an Android app with a native core. It also means upgrade cost is real: a Rust core plus a Kotlin layer plus a C packet stack means every upgrade can touch native artifacts, and the README does not document a rollback path or a downgrade procedure. The version badge in the README reads 1.7.18 while the latest release is v1.9.0, so treat the badge as stale and the releases page as the source of truth.

Editorial conclusion

Adopt MSN-GUARD if you need full-device tunneling on Android 8.0+ and want MASQUE over HTTP/3 or WireGuard rather than a browser-only proxy, and you accept that the README intentionally omits handshake parameters, gateway ranking and timing budgets. Do not adopt it if you need an audited, reproducible build today: the README does not describe a release signing process, and the only build path it names is the GitHub Actions workflow. Before installing, read DESIGN.md and SECURITY.md, check the release assets on the v1.9.0 page, and note that the version badge in the README reads 1.7.18 while the latest release is v1.9.0.

Frequently asked questions

What does MSN-GUARD do?

It is a native Android VPN client that tunnels all device traffic over five independent transports: MASQUE over HTTP/3, WireGuard, WARP-on-WARP, Psiphon and Tor. It works at the VpnService level, so every installed app is covered without extra configuration.

Which Android versions does MSN-GUARD support?

The README states Android 8.0+ as the minimum, shown in the Android badge at the top of the document.

Does MSN-GUARD carry UDP and QUIC traffic?

Yes. The README says datagrams are bridged in user space by a separate datagram bridge alongside the tun2socks and lwIP stack, so video, games and voice calls work rather than being dropped.

Is MSN-GUARD free to use and modify?

It is released under AGPL-3.0, per the LICENSE file and the badge in the README. That licence attaches source-availability obligations when a modified version is offered over a network.

Official sources

  1. License: AGPL-3.0
  2. mbm110/MSN-GUARD on GitHub
  3. Telegram
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/mbm110-msn-guard.svg)](https://hysenlabs.com/projects/mbm110-msn-guard)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/mbm110-msn-guard.svg)](https://hysenlabs.com/projects/mbm110-msn-guard)

Was this useful?