11 lines
355 B
Python
11 lines
355 B
Python
import json
|
|
|
|
|
|
def collect_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),
|
|
}
|