[GH-ISSUE #1954] Kill Switch allows Chrome traffic after normal Disconnect and after forced termination (IP leak) #849

Open
opened 2026-10-13 20:29:50 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @wisecompile on GitHub (Oct 25, 2025).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1954

Description:
The current implementation of the Kill Switch in AmneziaVPN for Windows fails to block outgoing connections from Chrome when the VPN connection is terminated outside the app’s normal Disconnect procedure (for example, when the process is killed or the system restarts).

Steps to reproduce:

  1. Connect AmneziaVPN (tested with both WireGuard and X-Ray protocols).
  2. Launch Chrome and open several sites (e.g., youtube.com, gazeta.ru).
  3. Terminate AmneziaVPN using one of the following methods:
    • Task Manager → End Task on AmneziaVPN process
    • Forced system reboot without autostarting AmneziaVPN
    • Click the large orange “Connected” button to manually Disconnect

Observe that Chrome remains online and successfully loads gazeta.ru (and other non-blocked domains).

Expected behavior:
Chrome should immediately lose Internet connectivity in all three cases above. The system should not allow any direct connections via the physical network interface once the VPN tunnel is down. Traffic must be allowed only through the secure tunnel.

Actual behavior:
After AmneziaVPN is stopped or crashes, Chrome continues to send traffic through the physical adapter. This causes an IP address leak and fully compromises user privacy.

Environment:
OS: Windows 11 Pro 25H2
AmneziaVPN versions tested: 4.8.2.3, 4.8.10.0, 4.8.11.0
Protocols: WireGuard and X-Ray (both affected)
Browser: Chrome 130.0.6723.70 (latest)

Additional notes:
Custom PowerShell rules show that Windows Firewall can reliably enforce a persistent Kill Switch by blocking Chrome on all interfaces except AmneziaVPN and local 127.0.0.1:XRayPort. This proves the leak is due to the absence of an internal persistent block within AmneziaVPN itself, rather than OS limitations.

Proposed fix:
Implement a persistent system-level rule (for example, via Windows Filtering Platform) that blocks all traffic except through the active tunnel interface — even if the AmneziaVPN GUI or background service terminates unexpectedly.

Appendix: minimal PowerShell proof-of-concept

# Allow Chrome only through: (1) X-Ray local proxy, (2) WG interface; block on Ethernet.
$chrome = "C:\Program Files\Google\Chrome\Application\chrome.exe"
if (-not (Test-Path $chrome)) { $chrome = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" }

Get-NetFirewallRule -Group "Chrome KillSwitch" -ErrorAction SilentlyContinue | Remove-NetFirewallRule

New-NetFirewallRule -Group "Chrome KillSwitch" -DisplayName "Chrome KillSwitch X-Ray" `
  -Direction Outbound -Program $chrome -Action Allow -Profile Any -Protocol TCP `
  -RemoteAddress 127.0.0.1 -RemotePort <PortNum>

New-NetFirewallRule -Group "Chrome KillSwitch" -DisplayName "Chrome KillSwitch AmneziaWG" `
  -Direction Outbound -Program $chrome -Action Allow -Profile Any -InterfaceAlias "AmneziaVPN"

New-NetFirewallRule -Group "Chrome KillSwitch" -DisplayName "Chrome block on Ethernet" `
  -Direction Outbound -Program $chrome -Action Block -Profile Any -InterfaceAlias "Ethernet"

New-NetFirewallRule -Group "Chrome KillSwitch" -DisplayName "Chrome block UDP443 on Ethernet" `
  -Direction Outbound -Program $chrome -Action Block -Profile Any -Protocol UDP -RemotePort 443 -InterfaceAlias "Ethernet"
Originally created by @wisecompile on GitHub (Oct 25, 2025). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1954 **Description:** The current implementation of the Kill Switch in AmneziaVPN for Windows fails to block outgoing connections from Chrome when the VPN connection is terminated outside the app’s normal Disconnect procedure (for example, when the process is killed or the system restarts). **Steps to reproduce:** 1. Connect AmneziaVPN (tested with both WireGuard and X-Ray protocols). 2. Launch Chrome and open several sites (e.g., youtube.com, gazeta.ru). 3. Terminate AmneziaVPN using one of the following methods: - Task Manager → End Task on AmneziaVPN process - Forced system reboot without autostarting AmneziaVPN - Click the large orange “Connected” button to manually Disconnect Observe that Chrome remains online and successfully loads gazeta.ru (and other non-blocked domains). **Expected behavior:** Chrome should immediately lose Internet connectivity in all three cases above. The system should not allow any direct connections via the physical network interface once the VPN tunnel is down. Traffic must be allowed only through the secure tunnel. **Actual behavior:** After AmneziaVPN is stopped or crashes, Chrome continues to send traffic through the physical adapter. This causes an IP address leak and fully compromises user privacy. **Environment:** OS: Windows 11 Pro 25H2 AmneziaVPN versions tested: 4.8.2.3, 4.8.10.0, 4.8.11.0 Protocols: WireGuard and X-Ray (both affected) Browser: Chrome 130.0.6723.70 (latest) **Additional notes:** Custom PowerShell rules show that Windows Firewall can reliably enforce a persistent Kill Switch by blocking Chrome on all interfaces except AmneziaVPN and local 127.0.0.1:XRayPort. This proves the leak is due to the absence of an internal persistent block within AmneziaVPN itself, rather than OS limitations. **Proposed fix:** Implement a persistent system-level rule (for example, via Windows Filtering Platform) that blocks all traffic except through the active tunnel interface — even if the AmneziaVPN GUI or background service terminates unexpectedly. **Appendix: minimal PowerShell proof-of-concept** ```powershell # Allow Chrome only through: (1) X-Ray local proxy, (2) WG interface; block on Ethernet. $chrome = "C:\Program Files\Google\Chrome\Application\chrome.exe" if (-not (Test-Path $chrome)) { $chrome = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" } Get-NetFirewallRule -Group "Chrome KillSwitch" -ErrorAction SilentlyContinue | Remove-NetFirewallRule New-NetFirewallRule -Group "Chrome KillSwitch" -DisplayName "Chrome KillSwitch X-Ray" ` -Direction Outbound -Program $chrome -Action Allow -Profile Any -Protocol TCP ` -RemoteAddress 127.0.0.1 -RemotePort <PortNum> New-NetFirewallRule -Group "Chrome KillSwitch" -DisplayName "Chrome KillSwitch AmneziaWG" ` -Direction Outbound -Program $chrome -Action Allow -Profile Any -InterfaceAlias "AmneziaVPN" New-NetFirewallRule -Group "Chrome KillSwitch" -DisplayName "Chrome block on Ethernet" ` -Direction Outbound -Program $chrome -Action Block -Profile Any -InterfaceAlias "Ethernet" New-NetFirewallRule -Group "Chrome KillSwitch" -DisplayName "Chrome block UDP443 on Ethernet" ` -Direction Outbound -Program $chrome -Action Block -Profile Any -Protocol UDP -RemotePort 443 -InterfaceAlias "Ethernet" ```
Author
Owner

@Maykros commented on GitHub (May 21, 2026):

So currently kill switch is not truly fail-closed? If the app/service crashes or Windows reboots before reconnect, traffic can still go through the physical interface instead of remaining blocked.

<!-- gh-comment-id:4506425885 --> @Maykros commented on GitHub (May 21, 2026): So currently kill switch is not truly fail-closed? If the app/service crashes or Windows reboots before reconnect, traffic can still go through the physical interface instead of remaining blocked.
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#849
No description provided.