[PR #1807] Support multiple comma-separated IPs per host in split tunneling #2539

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

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/1807
Author: @ilyachase
Created: 8/22/2025
Status: 🔄 Open

Base: dev ← Head: fix/1750


📝 Commits (3)

  • ac9a4fc Do not break at first IP
  • 133484d Support multiple comma-separated IPs per host
  • 1e59e51 Reduce nesting level in the new code

📊 Changes

3 files changed (+79 additions, -16 deletions)

View changed files

📝 client/settings.cpp (+14 -2)
📝 client/ui/controllers/sitesController.cpp (+51 -9)
📝 client/vpnconnection.cpp (+14 -5)

📄 Description

A bit hacky, but a minimal non-bc-breaking solution to support multiple IPs per hostname.

Changes

  • Collect all IPs from hostname resolution instead of stopping at the first IP
  • Store multiple resolved IPs as comma-separated strings when adding hostnames
  • Parse comma-separated IP strings from settings and import/export
  • Support multiple IPs per host in split tunneling

Testing

  • ✅ Tested on bbc.com IPs: 151.101.128.81,151.101.192.81,151.101.64.81,151.101.0.81
  • ✅ Non-first IPs (e.g., 151.101.64.81) accessible through VPN
  • ✅ Selective split tunneling works correctly
  • ✅ Import/Export functionality preserved

Import/Export Format

The feature supports comma-separated IPs in the import/export JSON format:

[
    {
        "hostname": "bbc.com",
        "ip": "151.101.0.81,151.101.64.81,151.101.128.81,151.101.192.81"
    }
]

UI preview

image

Fixes

Resolves #1750


🔄 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/1807 **Author:** [@ilyachase](https://github.com/ilyachase) **Created:** 8/22/2025 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix/1750` --- ### 📝 Commits (3) - [`ac9a4fc`](https://github.com/amnezia-vpn/amnezia-client/commit/ac9a4fcb0a95e3b9a506375704564b40da0c6d7f) Do not break at first IP - [`133484d`](https://github.com/amnezia-vpn/amnezia-client/commit/133484d4d5e2399edf28d35c8c4979fe1efee67b) Support multiple comma-separated IPs per host - [`1e59e51`](https://github.com/amnezia-vpn/amnezia-client/commit/1e59e51d7c5307322944066283f574e85845829b) Reduce nesting level in the new code ### 📊 Changes **3 files changed** (+79 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `client/settings.cpp` (+14 -2) 📝 `client/ui/controllers/sitesController.cpp` (+51 -9) 📝 `client/vpnconnection.cpp` (+14 -5) </details> ### 📄 Description A bit hacky, but a minimal **non-bc-breaking** solution to support multiple IPs per hostname. ## Changes - Collect all IPs from hostname resolution instead of stopping at the first IP - Store multiple resolved IPs as comma-separated strings when adding hostnames - Parse comma-separated IP strings from settings and import/export - Support multiple IPs per host in split tunneling ## Testing - ✅ Tested on bbc.com IPs: `151.101.128.81,151.101.192.81,151.101.64.81,151.101.0.81` - ✅ Non-first IPs (e.g., `151.101.64.81`) accessible through VPN - ✅ Selective split tunneling works correctly - ✅ Import/Export functionality preserved ## Import/Export Format The feature supports comma-separated IPs in the import/export JSON format: ```json [ { "hostname": "bbc.com", "ip": "151.101.0.81,151.101.64.81,151.101.128.81,151.101.192.81" } ] ``` ## UI preview <img width="382" height="712" alt="image" src="https://github.com/user-attachments/assets/984f71e9-6636-4a15-92ec-8e5c968e587a" /> ## Fixes Resolves #1750 --- <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#2539
No description provided.