Browse Source

fix: local storage the list files, generate config file of smartdns

dev
dnomd343 4 years ago
parent
commit
3b81e35e74
  1. 6
      overture/config.yml
  2. 18
      overture/update.sh
  3. 0
      smartdns/base.conf
  4. 1
      smartdns/load.sh

6
overture/config.yml

@ -24,11 +24,11 @@ ipv6UseAlternativeDNS: false
alternativeDNSConcurrent: false
whenPrimaryDNSAnswerNoneUse: alternativeDNS
ipNetworkFile:
primary: /etc/overture/china_ip_list.txt
primary: /etc/overture/list/china_ip_list.txt
alternative: /etc/overture/loopback.txt
domainFile:
primary: /etc/overture/chinalist.txt
alternative: /etc/overture/gfwlist.txt
primary: /etc/overture/list/chinalist.txt
alternative: /etc/overture/list/gfwlist.txt
matcher: suffix-tree
hostsFile:
hostsFile: /etc/overture/hosts

18
overture/update.sh

@ -1,8 +1,14 @@
rm -f /etc/overture/chinalist.txt
rm -f /etc/overture/gfwlist.txt
rm -f /etc/overture/china_ip_list.txt
wget -P /etc/overture https://res.343.re/Share/chinalist/chinalist.txt
wget -P /etc/overture https://res.343.re/Share/gfwlist/gfwlist.txt
wget -P /etc/overture https://raw.fastgit.org/17mon/china_ip_list/master/china_ip_list.txt
OVERTURE_DIR="/etc/overture"
TEMP_DIR="$OVERTURE_DIR/list/temp"
[ -f "$OVERTURE_DIR/list/no_auto_update" ] && exit
rm -rf $TEMP_DIR
mkdir -p $TEMP_DIR
wget -P $TEMP_DIR https://res.343.re/Share/chinalist/chinalist.txt
wget -P $TEMP_DIR https://res.343.re/Share/gfwlist/gfwlist.txt
wget -P $TEMP_DIR https://raw.fastgit.org/17mon/china_ip_list/master/china_ip_list.txt
[ -s "$TEMP_DIR/chinalist.txt" ] && mv -f $TEMP_DIR/chinalist.txt $OVERTURE_DIR/list/
[ -s "$TEMP_DIR/gfwlist.txt" ] && mv -f $TEMP_DIR/gfwlist.txt $OVERTURE_DIR/list/
[ -s "$TEMP_DIR/china_ip_list.txt" ] && mv -f $TEMP_DIR/china_ip_list.txt $OVERTURE_DIR/list/
rm -rf $TEMP_DIR
ps -ef | grep overture | grep -v grep | grep -v sh | awk '{print $1}' | xargs kill -9
overture -c /etc/overture/config.yml > /dev/null 2>&1 &

0
smartdns/config.conf → smartdns/base.conf

1
smartdns/load.sh

@ -19,6 +19,7 @@ EOF
mkdir -p /etc/smartdns/expose/
[ ! -s "/etc/smartdns/expose/domestic.conf" ] && load_domestic
[ ! -s "/etc/smartdns/expose/foreign.conf" ] && load_foreign
cat /etc/smartdns/base.conf > /etc/smartdns/config.conf
cat /etc/smartdns/expose/domestic.conf >> /etc/smartdns/config.conf
while read -r raw
do

Loading…
Cancel
Save