mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
dns: add settings dnstimeout/dnsmaxttl/dnsminttl
This commit is contained in:
1 parent
6744f1ad25
commit
a26e437b5d
7 files changed
+52
-24
No files matched your search
@@ -42,7 +42,7 @@ func dialerFromConf() proxy.Dialer {
|
||||
fwdrs = append(fwdrs, fwdr)
|
||||
}
|
||||
|
||||
return NewStrategyDialer(conf.Strategy, fwdrs, conf.CheckWebSite, conf.CheckDuration)
|
||||
return NewStrategyDialer(conf.Strategy, fwdrs, conf.CheckWebSite, conf.CheckInterval)
|
||||
}
|
||||
|
||||
func main() {
|
||||
@@ -57,7 +57,13 @@ func main() {
|
||||
dialer := NewRuleDialer(conf.rules, dialerFromConf())
|
||||
ipsetM, _ := NewIPSetManager(conf.IPSet, conf.rules)
|
||||
if conf.DNS != "" {
|
||||
d, err := dns.NewServer(conf.DNS, dialer, conf.DNSServer)
|
||||
|
||||
dnscfg := &dns.Config{
|
||||
Timeout: conf.DNSTimeout,
|
||||
MaxTTL: conf.DNSMaxTTL,
|
||||
MinTTL: conf.DNSMinTTL}
|
||||
|
||||
d, err := dns.NewServer(conf.DNS, dialer, conf.DNSServer, dnscfg)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user