mirror of
https://github.com/itdoginfo/podkop.git
synced 2026-01-01 06:09:08 +03:00
feat(podkop): add DNS Rewrite TTL configuration option
This commit is contained in:
@@ -697,6 +697,24 @@ return view.extend({
|
||||
return true;
|
||||
};
|
||||
|
||||
o = s.taboption('additional', form.Value, 'dns_rewrite_ttl', 'DNS Rewrite TTL', 'Time in seconds for DNS record caching (default: 600)');
|
||||
o.default = '600';
|
||||
o.rmempty = false;
|
||||
o.ucisection = 'main';
|
||||
|
||||
o.validate = function (section_id, value) {
|
||||
if (!value) {
|
||||
return 'TTL value cannot be empty';
|
||||
}
|
||||
|
||||
const ttl = parseInt(value);
|
||||
if (isNaN(ttl) || ttl < 0) {
|
||||
return 'TTL must be a positive number';
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
o = s.taboption('additional', form.Value, 'cache_file', 'Cache File Path', 'Select or enter path for sing-box cache file');
|
||||
o.value('/tmp/cache.db', 'RAM (/tmp/cache.db)');
|
||||
o.value('/usr/share/sing-box/cache.db', 'Flash (/usr/share/sing-box/cache.db)');
|
||||
|
||||
Reference in New Issue
Block a user