Add stub OpenAPI methods

This commit is contained in:
Eugene Bujak
2019-01-23 17:26:15 +03:00
committed by Eugene Bujak
parent 0820983d81
commit 8725c1df7a
2 changed files with 37 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ type configuration struct {
Filters []filter `yaml:"filters"`
UserRules []string `yaml:"user_rules"`
DHCP dhcpd.ServerConfig `yaml:"dhcp"`
TLS tlsConfig `yaml:"tls"`
logSettings `yaml:",inline"`
@@ -60,6 +61,16 @@ type dnsConfig struct {
var defaultDNS = []string{"tls://1.1.1.1", "tls://1.0.0.1"}
// field ordering is important -- yaml fields will mirror ordering from here
type tlsConfig struct {
ServerName string `yaml:"server_name" json:"server_name"`
ForceHTTPS bool `yaml:"force_https" json:"force_https"`
PortHTTPS int `yaml:"port_https" json:"port_https"`
PortDNSOverTLS int `yaml:"port_dns_over_tls" json:"port_dns_over_tls"`
CertificateChain string `yaml:"certificate_chain" json:"certificate_chain"`
PrivateKey string `yaml:"private_key" json:"private_key"`
}
// initialize to default values, will be changed later when reading config or parsing command line
var config = configuration{
ourConfigFilename: "AdGuardHome.yaml",