mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-04-17 08:35:17 +08:00
阶段性提交
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
18
pkg/dnsconfigs/recursion_config.go
Normal file
18
pkg/dnsconfigs/recursion_config.go
Normal 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user