did some prep work to make dns query type configurable

This commit is contained in:
hyung-hwan 2014-09-06 04:20:35 +00:00
parent 624ffcb006
commit 3fd82c7943
2 changed files with 18 additions and 1 deletions

View File

@ -195,6 +195,7 @@ struct loccfg_t
qse_nwad_t urs_nwad; /* TODO: multiple urs */
int dns_timeout;
int dns_retries;
int dns_query_type;
int urs_timeout;
int urs_retries;
qse_httpd_mod_t* urs_prerewrite_mod;
@ -1434,6 +1435,14 @@ static int load_loccfg_proxy (qse_httpd_t* httpd, qse_xli_t* xli, qse_xli_list_t
if (pair) cfg->proxy.dns_retries = get_integer ((qse_xli_str_t*)pair->val);
else cfg->proxy.dns_retries = -1;
#if 0
pair = QSE_NULL;
if (proxy) pair = qse_xli_findpair (xli, proxy, QSE_T("dns-query-type"));
if (!pair && default_proxy) pair = qse_xli_findpair (xli, default_proxy, QSE_T("dns-query-type"));
if (pair) cfg->proxy.dns_retries = parse_dns_query_type ((qse_xli_str_t*)pair->val);
else cfg->proxy.dns_flag
#endif
pair = QSE_NULL;
if (proxy) pair = qse_xli_findpair (xli, proxy, QSE_T("urs-enabled"));
if (!pair && default_proxy) pair = qse_xli_findpair (xli, default_proxy, QSE_T("urs-enabled"));

View File

@ -9,6 +9,12 @@ name = "QSEHTTPD v1";
max-nofile = none;
max-nproc = none;
#hooks {
# module "ext-1" {
# file = "ext";
# }
#}
################################################
# default server configuration
################################################
@ -132,16 +138,18 @@ server-default {
#pseudonym = "nice-host";
dns-enabled = yes;
dns-enabled = yes; # yes, no
dns-server = "192.168.1.1:53";
#dns-server = "[::1]:53";
#dns-timeout = 3
#dns-retries = 2
dns-query-type = a, aaaa;
#urs-enabled = yes; # no, yes,
#urs-server = "127.0.0.1:97";
#urs-timeout = 1;
#urs-retries = 4;
#urs-prerewrite-hook = "ext-1";
}
}