|
|
@ -39,6 +39,7 @@ create_config_file() { |
|
|
|
config_get syslog_prefix $1 'syslog_prefix' 'dnscrypt-proxy' |
|
|
|
config_get query_log_file $1 'query_log_file' '' |
|
|
|
config_get log_level $1 'log_level' '6' |
|
|
|
config_get blacklist $1 'blacklist' '' |
|
|
|
config_get_bool syslog $1 'syslog' '1' |
|
|
|
config_get_bool ephemeral_keys $1 'ephemeral_keys' '0' |
|
|
|
config_get_bool local_cache $1 'local_cache' '0' |
|
|
@ -58,28 +59,29 @@ create_config_file() { |
|
|
|
append_param "SyslogPrefix" "$syslog_prefix" $config_path |
|
|
|
append_on_off "LocalCache" $local_cache $config_path |
|
|
|
append_param_not_empty "QueryLogFile" "$query_log_file" $config_path |
|
|
|
if [ $plugins_support_enabled -ne 0 ] |
|
|
|
|
|
|
|
if [ $plugins_support_enabled -ne 0 ] && [ $block_ipv6 -ne 0 ] |
|
|
|
then |
|
|
|
append_yes_no "BlockIPv6" $block_ipv6 $config_path |
|
|
|
else |
|
|
|
log_ignored_param "block_ipv6" |
|
|
|
append_yes_no "BlockIPv6" $block_ipv6 $config_path |
|
|
|
elif [ $block_ipv6 -ne 0 ] |
|
|
|
then |
|
|
|
log_ignored_param "block_ipv6" |
|
|
|
fi |
|
|
|
|
|
|
|
if [ $plugins_support_enabled -ne 0 ] |
|
|
|
if [ $plugins_support_enabled -ne 0 ] && [ -n "$blacklist" ] |
|
|
|
then |
|
|
|
config_list_foreach $1 'blacklist' append_blacklists $config_path |
|
|
|
else |
|
|
|
log_ignored_param "blacklist" |
|
|
|
config_list_foreach $1 'blacklist' append_blacklists $config_path |
|
|
|
elif [ -n "$blacklist" ] |
|
|
|
then |
|
|
|
log_ignored_param "blacklist" |
|
|
|
fi |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
log_ignored_param() { |
|
|
|
local param_name=$1 |
|
|
|
logger -t dnscrypt-proxy -p user.warn dnscrypt-proxy plugins support not present, ignoring $param_name parameter... |
|
|
|
local param_name=$1 |
|
|
|
logger -t dnscrypt-proxy -p user.warn "dnscrypt-proxy plugins support not present, ignoring '$param_name' parameter." |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
append_on_off() { |
|
|
|
local param_name=$1 |
|
|
|
local param_value=$2 |
|
|
|