Update code

This commit is contained in:
Nick Peng
2018-08-05 17:38:45 +08:00
parent 14f375b718
commit 5ab3cd86a5
4 changed files with 28 additions and 2 deletions

View File

@@ -0,0 +1 @@
/etc/smartdns/smartdns.conf

View File

@@ -25,6 +25,9 @@ msgstr "本地高性能服务器,优化网络访问性能。"
msgid "Enable or disable smartdns server"
msgstr "启用或禁用SmartDNS服务"
msgid "Local Port"
msgstr "本地端口"
msgid "Smartdns local server port"
msgstr "SmartDNS本地服务端口"

View File

@@ -101,6 +101,26 @@ start_service() {
conf_append "rr-ttl-max" "$rr_ttl_max"
fi
config_get "log_size" "$section" "log_size" "128K"
if [ ! -z "$log_size" ]; then
conf_append "log-size" "$log_size"
fi
config_get "log_num" "$section" "log_num" "3"
if [ ! -z "$log_num" ]; then
conf_append "log-num" "$log_num"
fi
config_get "log_level" "$section" "log_level" "error"
if [ ! -z "$log_level" ]; then
conf_append "log-level" "$log_level"
fi
config_get "log_file" "$section" "log_file" ""
if [ ! -z "$log_file" ]; then
conf_append "log-file" "$log_file"
fi
clear_iptable
config_get_bool "redirect" "$section" "redirect" '0'
if [ "$redirect" -eq 1 ]; then