diff options
| author | Bobby <[email protected]> | 2026-03-08 23:38:54 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-03-08 23:38:54 +0530 |
| commit | 94d5561e7cc39eb2909bdc36d4ef4972cd21e56d (patch) | |
| tree | 98d9792dda80f76f185ab2eb37c1de005be9ea0f /models | |
| parent | 1136af49815be77a0aca151f3b8ec7348bf4b4c8 (diff) | |
| download | dove-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 'models')
| -rw-r--r-- | models/dns/a.go | 3 | ||||
| -rw-r--r-- | models/dns/aaaa.go | 2 | ||||
| -rw-r--r-- | models/dns/cname.go | 2 | ||||
| -rw-r--r-- | models/dns/mx.go | 11 | ||||
| -rw-r--r-- | models/dns/srv.go | 2 | ||||
| -rw-r--r-- | models/dns/txt.go | 2 |
6 files changed, 10 insertions, 12 deletions
diff --git a/models/dns/a.go b/models/dns/a.go index b3c7f38..3965e0e 100644 --- a/models/dns/a.go +++ b/models/dns/a.go @@ -9,6 +9,5 @@ type ARecord struct { DomainID uint `gorm:"not null;index" json:"domain_id"` Name string `gorm:"not null;default:@" json:"name"` Address string `gorm:"not null" json:"address"` - Port int `gorm:"default:0" json:"port"` - TTL uint32 `gorm:"not null;default:300" json:"ttl"` + TTL uint32 `gorm:"not null;default:1" json:"ttl"` } diff --git a/models/dns/aaaa.go b/models/dns/aaaa.go index 0053fe0..3fc985f 100644 --- a/models/dns/aaaa.go +++ b/models/dns/aaaa.go @@ -9,5 +9,5 @@ type AAAARecord struct { DomainID uint `gorm:"not null;index" json:"domain_id"` Name string `gorm:"not null;default:@" json:"name"` Address string `gorm:"not null" json:"address"` - TTL uint32 `gorm:"not null;default:300" json:"ttl"` + TTL uint32 `gorm:"not null;default:1" json:"ttl"` } diff --git a/models/dns/cname.go b/models/dns/cname.go index 5460f82..4c4223c 100644 --- a/models/dns/cname.go +++ b/models/dns/cname.go @@ -9,5 +9,5 @@ type CNAMERecord struct { DomainID uint `gorm:"not null;index" json:"domain_id"` Name string `gorm:"not null" json:"name"` Target string `gorm:"not null" json:"target"` - TTL uint32 `gorm:"not null;default:300" json:"ttl"` + TTL uint32 `gorm:"not null;default:1" json:"ttl"` } diff --git a/models/dns/mx.go b/models/dns/mx.go index ca1edb0..2049767 100644 --- a/models/dns/mx.go +++ b/models/dns/mx.go @@ -6,10 +6,9 @@ import ( type MXRecord struct { gorm.Model - DomainID uint `gorm:"not null;index" json:"domain_id"` - Name string `gorm:"not null;default:@" json:"name"` - Target string `gorm:"not null" json:"target"` - Priority uint16 `gorm:"not null;default:10" json:"priority"` - TTL uint32 `gorm:"not null;default:300" json:"ttl"` - IsManaged bool `gorm:"not null;default:false" json:"is_managed"` + DomainID uint `gorm:"not null;index" json:"domain_id"` + Name string `gorm:"not null;default:@" json:"name"` + Target string `gorm:"not null" json:"target"` + Priority uint16 `gorm:"not null;default:10" json:"priority"` + TTL uint32 `gorm:"not null;default:1" json:"ttl"` } diff --git a/models/dns/srv.go b/models/dns/srv.go index 481ee7e..1994f0d 100644 --- a/models/dns/srv.go +++ b/models/dns/srv.go @@ -13,5 +13,5 @@ type SRVRecord struct { Weight uint16 `gorm:"not null;default:0" json:"weight"` Port uint16 `gorm:"not null" json:"port"` Protocol string `gorm:"not null;default:tcp" json:"protocol"` - TTL uint32 `gorm:"not null;default:300" json:"ttl"` + TTL uint32 `gorm:"not null;default:1" json:"ttl"` } diff --git a/models/dns/txt.go b/models/dns/txt.go index 98342b3..0ee69c3 100644 --- a/models/dns/txt.go +++ b/models/dns/txt.go @@ -9,5 +9,5 @@ type TXTRecord struct { DomainID uint `gorm:"not null;index" json:"domain_id"` Name string `gorm:"not null;default:@" json:"name"` Content string `gorm:"not null" json:"content"` - TTL uint32 `gorm:"not null;default:300" json:"ttl"` + TTL uint32 `gorm:"not null;default:1" json:"ttl"` } |
