mirror of
https://github.com/MarekWojt/gertdns.git
synced 2025-12-15 12:59:53 +01:00
Webserver
This commit is contained in:
@@ -1,18 +1,38 @@
|
||||
package config
|
||||
|
||||
type Configuration struct {
|
||||
DNS DNSConfiguration
|
||||
HTTP HTTPConfiguration
|
||||
}
|
||||
|
||||
type DNSConfiguration struct {
|
||||
Port uint16
|
||||
Host string
|
||||
Domains []string
|
||||
}
|
||||
|
||||
type HTTPConfiguration struct {
|
||||
Port uint16
|
||||
Host string
|
||||
Socket string
|
||||
SocketFileMode uint32
|
||||
}
|
||||
|
||||
var (
|
||||
Config Configuration
|
||||
|
||||
defaultConfig = Configuration{
|
||||
Port: 5353,
|
||||
Host: "0.0.0.0",
|
||||
Domains: []string{},
|
||||
DNS: DNSConfiguration{
|
||||
Port: 5353,
|
||||
Host: "0.0.0.0",
|
||||
Domains: []string{},
|
||||
},
|
||||
HTTP: HTTPConfiguration{
|
||||
Port: 8080,
|
||||
Host: "127.0.0.1",
|
||||
Socket: "",
|
||||
SocketFileMode: 0644,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user