Development

This commit is contained in:
Matthew Grotke 2026-06-02 12:49:39 -04:00
parent 59ac3c5973
commit 3d0dc265ba
31 changed files with 1093 additions and 2794 deletions

View file

@ -1,11 +1,12 @@
import json
from config_utils import collect_layout_tokens
def collect_tokens(cfg):
tokens = collect_layout_tokens(cfg)
dns = cfg.get('upstream_dns', {})
servers = dns.get('upstream_servers', [])
return {
'DNS_STRICT_ORDER': 'true' if dns.get('strict_order') else 'false',
'DNS_CACHE_SIZE': str(dns.get('cache_size', '-')),
'DNS_UPSTREAM_SERVERS_JSON': json.dumps(servers),
}
tokens['DNS_STRICT_ORDER'] = 'true' if dns.get('strict_order') else 'false'
tokens['DNS_CACHE_SIZE'] = str(dns.get('cache_size', '-'))
tokens['DNS_UPSTREAM_SERVERS_JSON'] = json.dumps(servers)
return tokens