Project

General

Profile

Actions

Feature #2790

closed

Optional setting for custom DNS TTL value in settings.yml

Added by Povilas Daukintis over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
DNS
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

When smart-proxy manipulates DNS zone records (A/PTR) by default it will use TTL value which is 86400. While it's pretty good for most cases, it might be not suitable for every possible case.

I've slightly modified lib/proxy/dns.rb code to optionally read custom TTL value from settings.yml file:

diff --git a/lib/proxy/dns.rb b/lib/proxy/dns.rb
index f580116..5d4d924 100644
--- a/lib/proxy/dns.rb
+++ b/lib/proxy/dns.rb
@@ -7,7 +7,7 @@ module Proxy::DNS
     def initialize options = {}
       @server = options[:server] || "localhost" 
       @fqdn   = options[:fqdn]
-      @ttl    = options[:ttl]    || "86400" 
+      @ttl    = options[:ttl]    || SETTINGS.dns_ttl || "86400" 
       @type   = options[:type]   || "A" 
       @value  = options[:value]

This would allow to set custom TTL value per smart-proxy instance.

Actions #2

Updated by Lukas Zapletal over 10 years ago

  • Target version set to 1.3.0
Actions #3

Updated by Anonymous over 10 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF