[PR #4192] [CLOSED] feat(wireguard): add configurable DNS to exported client configs #5622

Closed
opened 2026-10-31 20:48:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/4192
Author: @SilverPolarFox
Created: 5/8/2026
Status: ❌ Closed

Base: main ← Head: feat(wireguard)-add-configurable-DNS-to-client-config-export


📝 Commits (1)

  • 940e76c feat(wireguard): add configurable DNS to exported client configs

📊 Changes

2 files changed (+17 additions, -3 deletions)

View changed files

📝 web/assets/js/model/inbound.js (+13 -3)
📝 web/html/form/protocol/wireguard.html (+4 -0)

📄 Description

This change adds configurable DNS support for exported WireGuard client configurations.

Previously, generated WireGuard client configs always used hardcoded Cloudflare DNS values: 1.1.1.1, 1.0.0.1. With this change, the administrator can set a custom DNS server in the WireGuard inbound settings, and that value is saved as part of the inbound configuration.

The configured DNS is exported into generated .conf files under the [Interface] section as DNS = ..., and is also included in generated wireguard:// links as a dns query parameter for QR/link-based export. DNS is stored as a shared inbound-level setting.

This allows sharing ready-to-use WireGuard client configs via file, QR code, or link without requiring users to manually edit DNS settings on their devices. It is especially useful when the default Cloudflare DNS resolvers are blocked or unreliable, because the administrator can provide an alternative DNS resolver directly in the exported client configuration.

Existing WireGuard settings without a DNS field remain compatible and fall back to 1.1.1.1, 1.0.0.1.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

🔄 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/MHSanaei/3x-ui/pull/4192 **Author:** [@SilverPolarFox](https://github.com/SilverPolarFox) **Created:** 5/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat(wireguard)-add-configurable-DNS-to-client-config-export` --- ### 📝 Commits (1) - [`940e76c`](https://github.com/MHSanaei/3x-ui/commit/940e76ca43d77a4d7ab2bdf5305f529699e7a3c3) feat(wireguard): add configurable DNS to exported client configs ### 📊 Changes **2 files changed** (+17 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `web/assets/js/model/inbound.js` (+13 -3) 📝 `web/html/form/protocol/wireguard.html` (+4 -0) </details> ### 📄 Description This change adds configurable DNS support for exported WireGuard client configurations. Previously, generated WireGuard client configs always used hardcoded Cloudflare DNS values: `1.1.1.1, 1.0.0.1`. With this change, the administrator can set a custom DNS server in the WireGuard inbound settings, and that value is saved as part of the inbound configuration. The configured DNS is exported into generated `.conf` files under the `[Interface]` section as `DNS = ...`, and is also included in generated `wireguard://` links as a `dns` query parameter for QR/link-based export. DNS is stored as a shared inbound-level setting. This allows sharing ready-to-use WireGuard client configs via file, QR code, or link without requiring users to manually edit DNS settings on their devices. It is especially useful when the default Cloudflare DNS resolvers are blocked or unreliable, because the administrator can provide an alternative DNS resolver directly in the exported client configuration. Existing WireGuard settings without a `DNS` field remain compatible and fall back to `1.1.1.1, 1.0.0.1`. ## Which part of the application is affected by the change? - [x] Frontend - [x] Backend ## Type of Changes - [ ] Bug fix - [x] New feature - [ ] Refactoring - [ ] Other --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:48:13 +07:00
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#5622
No description provided.