[PR #3173] fix(windows): install split default routes for Wintun #3120

Open
opened 2026-10-15 04:07:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/3173
Author: @QDwEFaC
Created: 9/14/2026
Status: 🔄 Open

Base: dev ← Head: fix/windows-split-default-route


📝 Commits (1)

  • e371630 fix(windows): install split default routes for Wintun

📊 Changes

1 file changed (+54 additions, -35 deletions)

View changed files

📝 client/platforms/windows/daemon/wireguardutilswindows.cpp (+54 -35)

📄 Description

Summary

  • On Windows, AmneziaWG brings the Wintun adapter up and completes the handshake, but CreateIpForwardEntry2() for 0.0.0.0/0 (empty next-hop on a /32 adapter) fails.
  • Daemon::activate then returns false, so the GUI stays on “not connected” while keepalives already flow.
  • Install split defaults instead: 0.0.0.0/1 + 128.0.0.0/1, and ::/1 + 8000::/1 for IPv6 (same approach as wg-quick). Observed on 5.0.1.5 / Win10 after a reboot: handshake OK, default route still on Wi-Fi until these two prefixes were added.

Test plan

  • Windows 10/11: connect AmneziaWG full-tunnel, confirm route print has 0.0.0.0/1 and 128.0.0.0/1 on the AmneziaVPN adapter
  • Handshake + internet through the tunnel after connect (no manual route add)
  • Disconnect removes the split defaults
  • IPv6 disabled: IPv4 split defaults still apply; IPv6 ERROR_NOT_FOUND stays non-fatal

Made with Cursor


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amnezia-client/pull/3173 **Author:** [@QDwEFaC](https://github.com/QDwEFaC) **Created:** 9/14/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix/windows-split-default-route` --- ### 📝 Commits (1) - [`e371630`](https://github.com/amnezia-vpn/amnezia-client/commit/e371630a4814ce2b7c21c32fa4e0b664ee4257d4) fix(windows): install split default routes for Wintun ### 📊 Changes **1 file changed** (+54 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `client/platforms/windows/daemon/wireguardutilswindows.cpp` (+54 -35) </details> ### 📄 Description ## Summary - On Windows, AmneziaWG brings the Wintun adapter up and completes the handshake, but `CreateIpForwardEntry2()` for `0.0.0.0/0` (empty next-hop on a `/32` adapter) fails. - `Daemon::activate` then returns false, so the GUI stays on “not connected” while keepalives already flow. - Install split defaults instead: `0.0.0.0/1` + `128.0.0.0/1`, and `::/1` + `8000::/1` for IPv6 (same approach as wg-quick). Observed on 5.0.1.5 / Win10 after a reboot: handshake OK, default route still on Wi-Fi until these two prefixes were added. ## Test plan - [ ] Windows 10/11: connect AmneziaWG full-tunnel, confirm `route print` has `0.0.0.0/1` and `128.0.0.0/1` on the AmneziaVPN adapter - [ ] Handshake + internet through the tunnel after connect (no manual `route add`) - [ ] Disconnect removes the split defaults - [ ] IPv6 disabled: IPv4 split defaults still apply; IPv6 `ERROR_NOT_FOUND` stays non-fatal Made with [Cursor](https://cursor.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#3120
No description provided.