mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
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 intentionally 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`. |
||
|---|---|---|
| .. | ||
| assets | ||
| controller | ||
| entity | ||
| global | ||
| html | ||
| job | ||
| locale | ||
| middleware | ||
| network | ||
| service | ||
| session | ||
| translation | ||
| websocket | ||
| web.go | ||