aboutsummaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-08 23:38:54 +0530
committerBobby <[email protected]>2026-03-08 23:38:54 +0530
commit94d5561e7cc39eb2909bdc36d4ef4972cd21e56d (patch)
tree98d9792dda80f76f185ab2eb37c1de005be9ea0f /controllers
parent1136af49815be77a0aca151f3b8ec7348bf4b4c8 (diff)
downloaddove-94d5561e7cc39eb2909bdc36d4ef4972cd21e56d.tar.xz
dove-94d5561e7cc39eb2909bdc36d4ef4972cd21e56d.zip
Refactor DNS and SMTP configurations; add system DNS management
- Updated DNS server address configuration to use BindAddress and DnsPort. - Enhanced email submission to utilize BindAddress for SMTP server address. - Improved error messages for unknown recipient domains. - Introduced a new OrderedMap structure for route management. - Added system DNS management functions for Linux, Darwin, and Windows platforms. - Created new dashboard services for DNS configuration and overview. - Updated UI to include Proxy Rules section and improved descriptions. - Added new utility functions for handling DNS configurations.
Diffstat (limited to 'controllers')
-rw-r--r--controllers/dashboard/dns.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/controllers/dashboard/dns.go b/controllers/dashboard/dns.go
new file mode 100644
index 0000000..bbc6468
--- /dev/null
+++ b/controllers/dashboard/dns.go
@@ -0,0 +1,26 @@
+package dashboard
+
+import (
+ dnsSystem "dove/utils/dns"
+ "dove/utils/shortcuts"
+
+ "github.com/gofiber/fiber/v2"
+)
+
+func ConfigureSystemDns(context *fiber.Ctx) error {
+ configureError := dnsSystem.ConfigureSystemDns()
+ if configureError != nil {
+ return shortcuts.BadRequestError(context, configureError)
+ }
+
+ return shortcuts.RedirectToPath(context, "/dashboard")
+}
+
+func DisableSystemDns(context *fiber.Ctx) error {
+ disableError := dnsSystem.DisableSystemDns()
+ if disableError != nil {
+ return shortcuts.BadRequestError(context, disableError)
+ }
+
+ return shortcuts.RedirectToPath(context, "/dashboard")
+}