Эх сурвалжийг харах

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

zfl9 8 жил өмнө
parent
commit
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