فهرست منبع

dnsmasq cache ttl (3600s)

zfl9 8 سال پیش
والد
کامیت
7e31845bbd
2فایلهای تغییر یافته به همراه10 افزوده شده و 1 حذف شده
  1. 8 0
      ss-tproxy
  2. 2 1
      ss-tproxy.conf

+ 8 - 0
ss-tproxy

@@ -299,6 +299,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
+min-cache-ttl = $dnsmasq_cache_time
 no-negcache
 no-resolv
 port = 53
@@ -312,6 +313,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
+min-cache-ttl = $dnsmasq_cache_time
 no-negcache
 no-resolv
 port = 53
@@ -332,6 +334,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
+min-cache-ttl = $dnsmasq_cache_time
 no-negcache
 no-resolv
 port = 53
@@ -373,6 +376,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
+min-cache-ttl = $dnsmasq_cache_time
 no-negcache
 no-resolv
 port = 53
@@ -422,6 +426,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
+min-cache-ttl = $dnsmasq_cache_time
 no-negcache
 no-resolv
 port = 53
@@ -435,6 +440,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
+min-cache-ttl = $dnsmasq_cache_time
 no-negcache
 no-resolv
 port = 53
@@ -455,6 +461,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
+min-cache-ttl = $dnsmasq_cache_time
 no-negcache
 no-resolv
 port = 53
@@ -496,6 +503,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
+min-cache-ttl = $dnsmasq_cache_time
 no-negcache
 no-resolv
 port = 53

+ 2 - 1
ss-tproxy.conf

@@ -98,7 +98,8 @@ tunnel_log='/var/log/ss-tunnel.log' # 日志文件路径
 ## dnsmasq 配置
 # 根据模式选择使用
 dnsmasq_gfwlist='/etc/tproxy/gfwlist.txt'   # gfwlist 域名文件
-dnsmasq_cache_size='1024'                   # DNS 缓存条目数量
+dnsmasq_cache_size='10240'                  # DNS 缓存条目数量
+dnsmasq_cache_time='3600'                   # DNS 缓存时间(秒)
 dnsmasq_log_on='false'                      # 是否记录 DNS 日志
 dnsmasq_log_file='/var/log/dnsmasq.log'     # DNS 日志记录文件