plugin/forward: expose TLSConfig and error messages to public (#1781)

* plugin/forward: expose TLSConfig and error messages to public

* Add IsTLS() instead of TLSConfig()
This commit is contained in:
Eugen Kleiner
2018-05-09 14:41:14 +03:00
committed by Miek Gieben
parent 0e5e59c327
commit b9f0d55fc9
4 changed files with 16 additions and 11 deletions

View File

@@ -63,6 +63,9 @@ func (p *Proxy) SetTLSConfig(cfg *tls.Config) {
p.client = dnsClient(cfg)
}
// IsTLS returns true if proxy uses tls.
func (p *Proxy) IsTLS() bool { return p.transport.tlsConfig != nil }
// SetExpire sets the expire duration in the lower p.transport.
func (p *Proxy) SetExpire(expire time.Duration) { p.transport.SetExpire(expire) }