[PR #2691] [MERGED] Fix Windows app split-tunnel executable path conversion #2903

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

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/2691
Author: @ULTRAVIOLENC3
Created: 6/2/2026
Status: ✅ Merged
Merged: 7/2/2026
Merged by: @vkamn

Base: dev ← Head: fix/windows-app-split-tunnel-path-conversion


📝 Commits (1)

  • 38b54a9 Fix Windows app split tunnel path conversion

📊 Changes

2 files changed (+107 additions, -23 deletions)

View changed files

📝 client/platforms/windows/daemon/windowsdaemon.cpp (+28 -3)
📝 client/platforms/windows/daemon/windowssplittunnel.cpp (+79 -20)

📄 Description

Summary

Fixes Windows application-based split tunneling when excluded app paths are stored or passed as normal Windows executable paths.

The previous path conversion code split executable paths using /, which could fail for normal Windows paths using \, produce an empty converted device path, and still serialize that invalid rule into the split-tunnel driver configuration.

Changes

  • Normalize excluded executable paths before converting them to NT device paths.
  • Support file: URLs by converting them to local filesystem paths.
  • Replace / with \ before Windows path parsing.
  • Reject failed or empty NT device path conversions instead of serializing invalid driver rules.
  • Serialize the validated converted-path count instead of the original app list count.
  • Fix QueryDosDeviceW() error handling by checking GetLastError() for ERROR_INSUFFICIENT_BUFFER.
  • Fix OpenProcess() failure handling by checking for nullptr.
  • Propagate split-tunnel startup / exclusion failures from WindowsDaemon instead of silently reporting success.

Scope

Windows-only.

No kernel driver changes.
No packaged driver changes.
No unrelated platform changes.


🔄 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/2691 **Author:** [@ULTRAVIOLENC3](https://github.com/ULTRAVIOLENC3) **Created:** 6/2/2026 **Status:** ✅ Merged **Merged:** 7/2/2026 **Merged by:** [@vkamn](https://github.com/vkamn) **Base:** `dev` ← **Head:** `fix/windows-app-split-tunnel-path-conversion` --- ### 📝 Commits (1) - [`38b54a9`](https://github.com/amnezia-vpn/amnezia-client/commit/38b54a9f7aa59afaaef2adecbec1abe4c1449426) Fix Windows app split tunnel path conversion ### 📊 Changes **2 files changed** (+107 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `client/platforms/windows/daemon/windowsdaemon.cpp` (+28 -3) 📝 `client/platforms/windows/daemon/windowssplittunnel.cpp` (+79 -20) </details> ### 📄 Description ## Summary Fixes Windows application-based split tunneling when excluded app paths are stored or passed as normal Windows executable paths. The previous path conversion code split executable paths using `/`, which could fail for normal Windows paths using `\`, produce an empty converted device path, and still serialize that invalid rule into the split-tunnel driver configuration. ## Changes - Normalize excluded executable paths before converting them to NT device paths. - Support `file:` URLs by converting them to local filesystem paths. - Replace `/` with `\` before Windows path parsing. - Reject failed or empty NT device path conversions instead of serializing invalid driver rules. - Serialize the validated converted-path count instead of the original app list count. - Fix `QueryDosDeviceW()` error handling by checking `GetLastError()` for `ERROR_INSUFFICIENT_BUFFER`. - Fix `OpenProcess()` failure handling by checking for `nullptr`. - Propagate split-tunnel startup / exclusion failures from `WindowsDaemon` instead of silently reporting success. ## Scope Windows-only. No kernel driver changes. No packaged driver changes. No unrelated platform changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 04:06:06 +07:00
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#2903
No description provided.