[PR #3113] [MERGED] fix(import): preserve MTU from vpn:// configurations #3084

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

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/3113
Author: @makkoar
Created: 9/1/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @vkamn

Base: dev ← Head: fix/preserve-imported-mtu


📝 Commits (1)

  • 5e2ad64 fix: preserve imported MTU

📊 Changes

1 file changed (+5 additions, -3 deletions)

View changed files

📝 client/core/controllers/selfhosted/importController.cpp (+5 -3)

📄 Description

Summary

Preserve an explicitly configured non-empty MTU when importing an Amnezia vpn:// configuration. The WireGuard or AmneziaWG protocol default is now applied only when the imported MTU is missing or empty.

Problem

ImportController::processAmneziaConfig() unconditionally replaced the MTU contained in imported WireGuard and AmneziaWG configurations with the protocol default. As a result, profiles that intentionally specified a custom MTU silently changed during import.

Changes

  • Keep a non-empty imported MTU unchanged.
  • Treat whitespace-only MTU values as empty.
  • Preserve the existing WireGuard/AmneziaWG default fallback for missing or empty values.

Backward compatibility

Profiles without an MTU continue to receive the same protocol default. The change only affects profiles that already provide an explicit value.

Verification

  • Built the Windows x64 client and service in Release mode against dev at 94b51df2 (5.0.3.1) with this change included.
  • Confirmed with git range-diff that the rebase preserves the patch without changing its contents.
  • Before this rebase, imported a real vpn:// profile on Windows and verified that its non-default MTU survives import. The MTU-handling implementation is unchanged.
  • This is complementary to #3065, which changes the AmneziaWG default MTU value. This PR only changes when the default is applied.

🔄 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/3113 **Author:** [@makkoar](https://github.com/makkoar) **Created:** 9/1/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@vkamn](https://github.com/vkamn) **Base:** `dev` ← **Head:** `fix/preserve-imported-mtu` --- ### 📝 Commits (1) - [`5e2ad64`](https://github.com/amnezia-vpn/amnezia-client/commit/5e2ad64f73c3533a03b0a702ecb136540f2a0fb0) fix: preserve imported MTU ### 📊 Changes **1 file changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `client/core/controllers/selfhosted/importController.cpp` (+5 -3) </details> ### 📄 Description ## Summary Preserve an explicitly configured non-empty MTU when importing an Amnezia `vpn://` configuration. The WireGuard or AmneziaWG protocol default is now applied only when the imported MTU is missing or empty. ## Problem `ImportController::processAmneziaConfig()` unconditionally replaced the MTU contained in imported WireGuard and AmneziaWG configurations with the protocol default. As a result, profiles that intentionally specified a custom MTU silently changed during import. ## Changes - Keep a non-empty imported MTU unchanged. - Treat whitespace-only MTU values as empty. - Preserve the existing WireGuard/AmneziaWG default fallback for missing or empty values. ## Backward compatibility Profiles without an MTU continue to receive the same protocol default. The change only affects profiles that already provide an explicit value. ## Verification - Built the Windows x64 client and service in Release mode against `dev` at [`94b51df2`](https://github.com/amnezia-vpn/amnezia-client/commit/94b51df24790bf52427afe82d81c87a95460bdfd) (`5.0.3.1`) with this change included. - Confirmed with `git range-diff` that the rebase preserves the patch without changing its contents. - Before this rebase, imported a real `vpn://` profile on Windows and verified that its non-default MTU survives import. The MTU-handling implementation is unchanged. ## Related pull requests - This is complementary to #3065, which changes the AmneziaWG default MTU value. This PR only changes when the default is applied. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi changed title from [PR #3113] fix(import): preserve MTU from vpn:// configurations to [PR #3113] [MERGED] fix(import): preserve MTU from vpn:// configurations 2026-10-27 06:18:53 +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#3084
No description provided.