[PR #4106] [CLOSED] feat: Set WireGuard DNS for Inbounds and Peers in UI #5601

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/4106
Author: @SilverPolarFox
Created: 4/25/2026
Status: ❌ Closed

Base: main ← Head: Feat-WireGuard-inbound-DNS


📝 Commits (6)

  • 48ad787 WG inbound set DNS
  • 1083902 modified: web/assets/js/model/inbound.js
  • 431fdb2 Merge branch 'MHSanaei:main' into Feat-WireGuard-inbound-DNS
  • 3fe912f Merge branch 'MHSanaei:main' into Feat-WireGuard-inbound-DNS
  • 4b92228 Merge branch 'MHSanaei:main' into Feat-WireGuard-inbound-DNS
  • b03693d Merge branch 'MHSanaei:main' into Feat-WireGuard-inbound-DNS

📊 Changes

2 files changed (+25 additions, -5 deletions)

View changed files

📝 web/assets/js/model/inbound.js (+17 -5)
📝 web/html/form/protocol/wireguard.html (+8 -0)

📄 Description

What is the pull request?

This pull request adds configurable DNS support for WireGuard inbound client configurations.

Previously, WireGuard client configs generated by the web panel and QR code used a hardcoded DNS value. This change allows DNS to be configured from the WireGuard inbound settings and from individual peer settings.

Changes included:

  • Added a default WireGuard client DNS setting in the inbound configuration.
  • Added per-peer DNS support for WireGuard peers.
  • Added a DNS input field to the WireGuard web form.
  • Added a Peer DNS input field inside each WireGuard peer configuration block.
  • Updated WireGuard config / QR generation to use the peer DNS value first, then fall back to the inbound default DNS, then fall back to 1.1.1.1, 1.0.0.1.
  • Preserved backward compatibility for existing WireGuard inbounds that do not yet have DNS fields saved.

The affected files are in the frontend WireGuard form and inbound model: web/html/form/protocol/wireguard.html and web/assets/js/model/inbound.js. The current upstream WireGuard form contains MTU, No Kernel Tun, and peer settings, but does not include DNS fields by default.

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/4106 **Author:** [@SilverPolarFox](https://github.com/SilverPolarFox) **Created:** 4/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `Feat-WireGuard-inbound-DNS` --- ### 📝 Commits (6) - [`48ad787`](https://github.com/MHSanaei/3x-ui/commit/48ad787f45636a67dfbcedcb2637a321fc85e668) WG inbound set DNS - [`1083902`](https://github.com/MHSanaei/3x-ui/commit/10839023d1046bf8bccebab24f9345569970d04a) modified: web/assets/js/model/inbound.js - [`431fdb2`](https://github.com/MHSanaei/3x-ui/commit/431fdb2b1cf8287b5057a528458f946d4a136cf0) Merge branch 'MHSanaei:main' into Feat-WireGuard-inbound-DNS - [`3fe912f`](https://github.com/MHSanaei/3x-ui/commit/3fe912fcea8f40b8b1963ee4482649109155bd78) Merge branch 'MHSanaei:main' into Feat-WireGuard-inbound-DNS - [`4b92228`](https://github.com/MHSanaei/3x-ui/commit/4b92228c28cfb0db6a94d97224210c2ed575d881) Merge branch 'MHSanaei:main' into Feat-WireGuard-inbound-DNS - [`b03693d`](https://github.com/MHSanaei/3x-ui/commit/b03693db6d7ff5ed6ff8ac12c5e6b8c5a0aa2dd2) Merge branch 'MHSanaei:main' into Feat-WireGuard-inbound-DNS ### 📊 Changes **2 files changed** (+25 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `web/assets/js/model/inbound.js` (+17 -5) 📝 `web/html/form/protocol/wireguard.html` (+8 -0) </details> ### 📄 Description ## What is the pull request? This pull request adds configurable DNS support for WireGuard inbound client configurations. Previously, WireGuard client configs generated by the web panel and QR code used a hardcoded DNS value. This change allows DNS to be configured from the WireGuard inbound settings and from individual peer settings. Changes included: - Added a default WireGuard client DNS setting in the inbound configuration. - Added per-peer DNS support for WireGuard peers. - Added a DNS input field to the WireGuard web form. - Added a Peer DNS input field inside each WireGuard peer configuration block. - Updated WireGuard config / QR generation to use the peer DNS value first, then fall back to the inbound default DNS, then fall back to `1.1.1.1, 1.0.0.1`. - Preserved backward compatibility for existing WireGuard inbounds that do not yet have DNS fields saved. The affected files are in the frontend WireGuard form and inbound model: `web/html/form/protocol/wireguard.html` and `web/assets/js/model/inbound.js`. The current upstream WireGuard form contains MTU, No Kernel Tun, and peer settings, but does not include DNS fields by default. ## 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:05 +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#5601
No description provided.