瀏覽代碼

修复 dnsmasq min-cache-ttl 参数导致的不兼容问题

zfl9 8 年之前
父節點
當前提交
98326cdae5
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. 8 8
      ss-tproxy

+ 8 - 8
ss-tproxy

@@ -306,7 +306,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
-min-cache-ttl = $dnsmasq_cache_time
+$([ $(dnsmasq --help | grep -c min-cache-ttl) -ne 0 ] && echo "min-cache-ttl = $dnsmasq_cache_time")
 no-negcache
 no-resolv
 port = 53
@@ -321,7 +321,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
-min-cache-ttl = $dnsmasq_cache_time
+$([ $(dnsmasq --help | grep -c min-cache-ttl) -ne 0 ] && echo "min-cache-ttl = $dnsmasq_cache_time")
 no-negcache
 no-resolv
 port = 53
@@ -347,7 +347,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
-min-cache-ttl = $dnsmasq_cache_time
+$([ $(dnsmasq --help | grep -c min-cache-ttl) -ne 0 ] && echo "min-cache-ttl = $dnsmasq_cache_time")
 no-negcache
 no-resolv
 port = 53
@@ -391,7 +391,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
-min-cache-ttl = $dnsmasq_cache_time
+$([ $(dnsmasq --help | grep -c min-cache-ttl) -ne 0 ] && echo "min-cache-ttl = $dnsmasq_cache_time")
 no-negcache
 no-resolv
 port = 53
@@ -447,7 +447,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
-min-cache-ttl = $dnsmasq_cache_time
+$([ $(dnsmasq --help | grep -c min-cache-ttl) -ne 0 ] && echo "min-cache-ttl = $dnsmasq_cache_time")
 no-negcache
 no-resolv
 port = 53
@@ -462,7 +462,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
-min-cache-ttl = $dnsmasq_cache_time
+$([ $(dnsmasq --help | grep -c min-cache-ttl) -ne 0 ] && echo "min-cache-ttl = $dnsmasq_cache_time")
 no-negcache
 no-resolv
 port = 53
@@ -488,7 +488,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
-min-cache-ttl = $dnsmasq_cache_time
+$([ $(dnsmasq --help | grep -c min-cache-ttl) -ne 0 ] && echo "min-cache-ttl = $dnsmasq_cache_time")
 no-negcache
 no-resolv
 port = 53
@@ -532,7 +532,7 @@ log-async = 20
 log-facility = $dnsmasq_log_file
 domain-needed
 cache-size = $dnsmasq_cache_size
-min-cache-ttl = $dnsmasq_cache_time
+$([ $(dnsmasq --help | grep -c min-cache-ttl) -ne 0 ] && echo "min-cache-ttl = $dnsmasq_cache_time")
 no-negcache
 no-resolv
 port = 53