阶段性提交

This commit is contained in:
GoEdgeLab
2021-08-23 09:59:43 +08:00
parent 7bef4d6d30
commit 6147421c8f
8 changed files with 456 additions and 95 deletions

View File

@@ -5,11 +5,12 @@ package dnsconfigs
import "fmt"
type NSNodeConfig struct {
Id int64 `yaml:"id" json:"id"`
NodeId string `yaml:"nodeId" json:"nodeId"`
Secret string `yaml:"secret" json:"secret"`
ClusterId int64 `yaml:"clusterId" json:"clusterId"`
AccessLogRef *NSAccessLogRef `yaml:"accessLogRef" json:"accessLogRef"`
Id int64 `yaml:"id" json:"id"`
NodeId string `yaml:"nodeId" json:"nodeId"`
Secret string `yaml:"secret" json:"secret"`
ClusterId int64 `yaml:"clusterId" json:"clusterId"`
AccessLogRef *NSAccessLogRef `yaml:"accessLogRef" json:"accessLogRef"`
RecursionConfig *RecursionConfig `yaml:"recursionConfig" json:"recursionConfig"`
paddedId string
}

View File

@@ -0,0 +1,18 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package dnsconfigs
type DNSHost struct {
Host string `json:"host"`
Port int `json:"port"`
Protocol string `json:"protocol"`
}
// RecursionConfig 递归DNS设置
type RecursionConfig struct {
IsOn bool `json:"isOn"`
Hosts []*DNSHost `json:"hosts"`
UseLocalHosts bool `json:"useLocalHosts"` // 自动从本机读取DNS
AllowDomains []string `json:"allowDomains"`
DenyDomains []string `json:"denyDomains"`
}