[GH-ISSUE #3368] Cannot edit XRay settings on server B while connected to server A [Bug][macOS] #3230

Open
opened 2026-11-07 17:57:58 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @sergeopopov on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3368

[Bug][macOS] Cannot edit XRay settings on server B while connected to server A

Describe the bug

AmneziaVPN prevents changing XRay protocol settings on one server while an unrelated VPN connection to another server is active.

This makes it impossible to manage a server that is only reachable through an existing VPN connection.

Interestingly, AmneziaVPN allows installing a new protocol on the second server under the same conditions, but refuses to modify its existing XRay settings.

Steps to reproduce

  1. Configure two independent servers, A and B, in AmneziaVPN.
  2. Connect to server A.
  3. Open server B → Protocols → XRay → Settings.
  4. Change the TLS Fingerprint from chrome to firefox.
  5. Attempt to save the settings.

Actual behavior

AmneziaVPN refuses the operation, displaying an error approximately equivalent to:

"Unable change settings while there is an active connection."

The active connection belongs to server A, not server B.

Installing a new protocol on server B while connected to server A works correctly.

Expected behavior

Settings on server B should remain editable while connected to server A.

If editing requires reinstalling XRay or regenerating credentials, the existing confirmation warning is sufficient.

Restrictions intended to protect an active connection should apply only when modifying the server currently providing that connection.

Why this matters

In some networks, a remote server cannot be accessed directly due to network filtering.

An existing VPN connection is required to reach that server via SSH.

Consequently, the user faces a deadlock:

  • Disconnect the working VPN → server B becomes unreachable.
  • Keep the working VPN connected → AmneziaVPN refuses to change server B's XRay settings.

This prevents recovery of an otherwise accessible server.

Possible root cause — specific code location

The relevant check is in client/ui/qml/Pages2/PageProtocolXraySettings.qml:

The condition is:

if (ConnectionController.isConnected &&
    ServersUiController.serverDefaultContainer(ServersUiController.defaultServerId) === ServersUiController.processedContainerIndex)

The code checks whether a VPN connection is active and compares container indices, but does not explicitly compare the active server ID with processedServerId.

If container indices are local to each server, the condition can incorrectly match identical indices belonging to different servers.

The subsequent call to InstallController.updateServerConfig() already uses processedServerId, so the edited server is identifiable at this point.

Suggested fix: Include a server identity comparison in the guard, so an active connection blocks modifications only to the relevant server/container.

This is a suspected root cause based on the source code and observed behavior, not yet a confirmed diagnosis.

Environment

  • Platform: macOS (Intel)
  • Application: AmneziaVPN 5.0.3.0
  • Protocol being edited: XRay VLESS Reality
  • Requested change: TLS Fingerprint chrome → firefox
  • Two independently configured self-hosted servers
  • Application version: to be provided

No server IP addresses or access credentials are required to reproduce this issue.

Originally created by @sergeopopov on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3368 # [Bug][macOS] Cannot edit XRay settings on server B while connected to server A ## Describe the bug AmneziaVPN prevents changing XRay protocol settings on one server while an unrelated VPN connection to another server is active. This makes it impossible to manage a server that is only reachable through an existing VPN connection. Interestingly, AmneziaVPN allows installing a new protocol on the second server under the same conditions, but refuses to modify its existing XRay settings. ## Steps to reproduce 1. Configure two independent servers, A and B, in AmneziaVPN. 2. Connect to server A. 3. Open server B → Protocols → XRay → Settings. 4. Change the TLS Fingerprint from `chrome` to `firefox`. 5. Attempt to save the settings. ## Actual behavior AmneziaVPN refuses the operation, displaying an error approximately equivalent to: "Unable change settings while there is an active connection." The active connection belongs to server A, not server B. Installing a new protocol on server B while connected to server A works correctly. ## Expected behavior Settings on server B should remain editable while connected to server A. If editing requires reinstalling XRay or regenerating credentials, the existing confirmation warning is sufficient. Restrictions intended to protect an active connection should apply only when modifying the server currently providing that connection. ## Why this matters In some networks, a remote server cannot be accessed directly due to network filtering. An existing VPN connection is required to reach that server via SSH. Consequently, the user faces a deadlock: - Disconnect the working VPN → server B becomes unreachable. - Keep the working VPN connected → AmneziaVPN refuses to change server B's XRay settings. This prevents recovery of an otherwise accessible server. ## Possible root cause — specific code location The relevant check is in `client/ui/qml/Pages2/PageProtocolXraySettings.qml`: - [[master, lines 222–225](https://github.com/amnezia-vpn/amnezia-client/blob/master/client/ui/qml/Pages2/PageProtocolXraySettings.qml#L222-L225)](https://github.com/amnezia-vpn/amnezia-client/blob/master/client/ui/qml/Pages2/PageProtocolXraySettings.qml#L222-L225) - [[dev, lines 36–39](https://github.com/amnezia-vpn/amnezia-client/blob/dev/client/ui/qml/Pages2/PageProtocolXraySettings.qml#L36-L39)](https://github.com/amnezia-vpn/amnezia-client/blob/dev/client/ui/qml/Pages2/PageProtocolXraySettings.qml#L36-L39) The condition is: ```javascript if (ConnectionController.isConnected && ServersUiController.serverDefaultContainer(ServersUiController.defaultServerId) === ServersUiController.processedContainerIndex) ``` The code checks whether a VPN connection is active and compares container indices, **but does not explicitly compare the active server ID with `processedServerId`**. If container indices are local to each server, the condition can incorrectly match identical indices belonging to different servers. The subsequent call to `InstallController.updateServerConfig()` already uses `processedServerId`, so the edited server is identifiable at this point. **Suggested fix:** Include a server identity comparison in the guard, so an active connection blocks modifications only to the relevant server/container. This is a suspected root cause based on the source code and observed behavior, not yet a confirmed diagnosis. ## Environment - Platform: macOS (Intel) - Application: AmneziaVPN 5.0.3.0 - Protocol being edited: XRay VLESS Reality - Requested change: TLS Fingerprint `chrome` → `firefox` - Two independently configured self-hosted servers - Application version: to be provided No server IP addresses or access credentials are required to reproduce this issue.
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#3230
No description provided.