[GH-ISSUE #7072] [Feature]: Client-side AllowedIPs templates for AmneziaWG exports and Telegram config downloads #6611

Open
opened 2026-11-07 14:33:30 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @RomanovVIII on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/7072

I use 3x-ui to create individual AmneziaWG connections for multiple users. To provide split tunneling, I currently download each client's .conf and manually edit AllowedIPs. Downloading the configuration again or using the panel-generated QR code produces the default full-tunnel configuration rather than the customized routes.

It would be useful to generate ready-to-import configurations directly in 3x-ui, without repeating this processing for every client.

Describe the solution you'd like

Please consider two possible levels of support:

1. A prepared IP/CIDR list for exported AllowedIPs

Add a field where an administrator can paste a pre-prepared list of destination IPs/CIDRs to use as AllowedIPs in the exported client configuration. The panel would not need to discover or calculate service IP addresses: validating the supplied list and using it during export would be sufficient for an initial implementation.

Allow administrators to save named templates, assign a template to multiple clients, and override it for an individual client.

This would support both selected destinations through the VPN and full tunneling with exceptions, by supplying the appropriate precomputed AllowedIPs list. This export setting should be separate from the client's tunnel address and server-side peer AllowedIPs.

2. Optional domain/hostname support

If technically feasible, it would also be convenient to specify domains/hostnames and whether they should use the VPN or the device's regular connection.

I understand that native AllowedIPs accepts IP ranges, not domain names, and that DNS results can change. This is an optional usability suggestion for maintainers to evaluate, including the appropriate implementation and its limitations, rather than a requirement to treat domain names as native AllowedIPs entries.

The selected export settings should be consistent across downloaded .conf files, connection links, QR codes, and applicable subscription formats. If a configuration is too large for a QR code, offer the file instead.

Telegram bot

Please also add an option to download a ready-to-import .conf from the Telegram bot, rather than only receiving connection links and QR codes. The flow could be: select client, select inbound if necessary, then download either the standard configuration or the configuration using an assigned routing template. Administrators should access the clients they manage; regular users should access only their own configurations.

Applying a template should be explicit. Client keys, tunnel addresses, endpoints, and AmneziaWG parameters should be preserved.

Alternatives you've considered

Manually editing each downloaded .conf works, but requires repeating the same steps for every user and after every fresh export. Maintaining a private fork solely for this workflow would also require ongoing work to keep up with upstream releases.

Concrete use case

An administrator prepares a shared route list once, creates individual clients with their own credentials and quotas, and distributes ready-to-import configurations through the panel or Telegram bot.

This is a client-side export feature, not a request to replace server-side routing or access controls. Previously imported static .conf files would still require reimporting after a template changes.

Related: #6774 discusses AmneziaWG subscription delivery formats; this request focuses on configurable client-side routes and file downloads from the Telegram bot.

Which parts of the panel would this affect?

Frontend (UI / panel pages), Backend (API endpoints, login, settings), Subscription (share links / Clash / JSON), Telegram bot.

Originally created by @RomanovVIII on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/7072 ### Is your feature request related to a problem? I use 3x-ui to create individual AmneziaWG connections for multiple users. To provide split tunneling, I currently download each client's .conf and manually edit AllowedIPs. Downloading the configuration again or using the panel-generated QR code produces the default full-tunnel configuration rather than the customized routes. It would be useful to generate ready-to-import configurations directly in 3x-ui, without repeating this processing for every client. ### Describe the solution you'd like Please consider two possible levels of support: **1. A prepared IP/CIDR list for exported AllowedIPs** Add a field where an administrator can paste a pre-prepared list of destination IPs/CIDRs to use as AllowedIPs in the exported client configuration. The panel would not need to discover or calculate service IP addresses: validating the supplied list and using it during export would be sufficient for an initial implementation. Allow administrators to save named templates, assign a template to multiple clients, and override it for an individual client. This would support both selected destinations through the VPN and full tunneling with exceptions, by supplying the appropriate precomputed AllowedIPs list. This export setting should be separate from the client's tunnel address and server-side peer AllowedIPs. **2. Optional domain/hostname support** If technically feasible, it would also be convenient to specify domains/hostnames and whether they should use the VPN or the device's regular connection. I understand that native AllowedIPs accepts IP ranges, not domain names, and that DNS results can change. This is an optional usability suggestion for maintainers to evaluate, including the appropriate implementation and its limitations, rather than a requirement to treat domain names as native AllowedIPs entries. The selected export settings should be consistent across downloaded .conf files, connection links, QR codes, and applicable subscription formats. If a configuration is too large for a QR code, offer the file instead. **Telegram bot** Please also add an option to download a ready-to-import .conf from the Telegram bot, rather than only receiving connection links and QR codes. The flow could be: select client, select inbound if necessary, then download either the standard configuration or the configuration using an assigned routing template. Administrators should access the clients they manage; regular users should access only their own configurations. Applying a template should be explicit. Client keys, tunnel addresses, endpoints, and AmneziaWG parameters should be preserved. ### Alternatives you've considered Manually editing each downloaded .conf works, but requires repeating the same steps for every user and after every fresh export. Maintaining a private fork solely for this workflow would also require ongoing work to keep up with upstream releases. ### Concrete use case An administrator prepares a shared route list once, creates individual clients with their own credentials and quotas, and distributes ready-to-import configurations through the panel or Telegram bot. This is a client-side export feature, not a request to replace server-side routing or access controls. Previously imported static .conf files would still require reimporting after a template changes. Related: #6774 discusses AmneziaWG subscription delivery formats; this request focuses on configurable client-side routes and file downloads from the Telegram bot. ### Which parts of the panel would this affect? Frontend (UI / panel pages), Backend (API endpoints, login, settings), Subscription (share links / Clash / JSON), Telegram bot.
Sign in to join this conversation.
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
MHSanaei/3x-ui#6611
No description provided.