tls protocol for DoT added, minor refactoring

This commit is contained in:
Vladimir Stoilov
2022-07-21 11:07:44 +02:00
parent 598dc9d254
commit efd33c223f
5 changed files with 35 additions and 42 deletions

View File

@@ -32,6 +32,7 @@ const (
const (
HttpsProtocol = "https"
TlsProtocol = "tls"
)
// FailThreshold is amount of errors a resolvers must experience in order to be regarded as failed.
@@ -65,10 +66,9 @@ type Resolver struct {
UpstreamBlockDetection string
// Special Options
VerifyDomain string
Search []string
SearchOnly bool
Path string
Search []string
SearchOnly bool
Path string
// logic interface
Conn ResolverConn `json:"-"`
@@ -157,6 +157,12 @@ func (info *ResolverInfo) DescriptiveName() string {
info.Name,
info.ID(),
)
case info.IP == nil:
return fmt.Sprintf(
"%s (%s)",
info.Domain,
info.ID(),
)
default:
return fmt.Sprintf(
"%s (%s)",