Subversion Repositories ALCASAR

Rev

Rev 2649 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2649 Rev 2662
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
3
# Id: $Id: alcasar-url_filter_bl.sh 2649 2018-11-02 22:36:26Z lucas.echard $
3
# Id: $Id: alcasar-url_filter_bl.sh 2662 2018-11-18 12:55:55Z lucas.echard $
4
 
4
 
5
# alcasar-url_filter.sh
5
# alcasar-url_filter.sh
6
# by REXY
6
# by REXY
7
# This script is distributed under the Gnu General Public License (GPL)
7
# This script is distributed under the Gnu General Public License (GPL)
8
 
8
 
Line 87... Line 87...
87
		for yt_dnsname in $youtubedomains
87
		for yt_dnsname in $youtubedomains
88
		do
88
		do
89
			echo "address=/$yt_dnsname/$youtube_safe_server" >> $DNSMASQ_BL_CONF
89
			echo "address=/$yt_dnsname/$youtube_safe_server" >> $DNSMASQ_BL_CONF
90
		done
90
		done
91
 
91
 
-
 
92
		# add 'SafeSearch' redirection for qwant searching
-
 
93
		$SED "/qwant/d" $DNSMASQ_BL_CONF # remove old qwant declaration
-
 
94
		qwant_safe_server=`host -ta safeapi.qwant.com | grep "address" | cut -d" " -f4`	# retrieve qwant strict ip
-
 
95
		echo "# SafeSearch redirect server for qwant" >> $DNSMASQ_BL_CONF
-
 
96
		echo "address=/api.qwant.com/$qwant_safe_server" >> $DNSMASQ_BL_CONF
92
	else
97
	else
93
		$SED "s?^[^#]?#&?g" $DIR_DG/urlregexplist
98
		$SED "s?^[^#]?#&?g" $DIR_DG/urlregexplist
94
		$SED "/google/d" $DNSMASQ_BL_CONF
99
		$SED "/google/d" $DNSMASQ_BL_CONF
95
		$SED "/bing/d" $DNSMASQ_BL_CONF
100
		$SED "/bing/d" $DNSMASQ_BL_CONF
96
		$SED "/youtube/d" $DNSMASQ_BL_CONF
101
		$SED "/youtube/d" $DNSMASQ_BL_CONF
-
 
102
		$SED "/qwant/d" $DNSMASQ_BL_CONF
97
	fi
103
	fi
98
	if [ $pureip == "On" ]
104
	if [ $pureip == "On" ]
99
	then
105
	then
100
		$SED "s/^\#\*ip$/*ip/g" $DIR_DG/bannedsitelist
106
		$SED "s/^\#\*ip$/*ip/g" $DIR_DG/bannedsitelist
101
		$SED "s/^\#\*ips$/*ips/g" $DIR_DG/bannedsitelist
107
		$SED "s/^\#\*ips$/*ips/g" $DIR_DG/bannedsitelist