Pull request: 5009-ecosia-safesearch
Squashed commit of the following:
commit 787b5d40394889510c24f4abc3a08410ecc96e5e
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jul 31 15:09:18 2024 +0300
configmigrate: revert
commit a036638c05967298d13ef435dc5b377103cfe163
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jul 31 09:37:25 2024 +0300
docs
commit a3b2e8de4bab7214dd6b260655bba9f45eee6bd2
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jul 31 09:18:25 2024 +0300
locales
commit a01a22019ef02ae77e9006dd9444da462419908f
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jul 31 09:02:14 2024 +0300
filtering: imp code
commit bc268cdd526c82cb605b1a474d51b79f593cd3da
Merge: 5ad88d914 bc6d20ff1
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jul 31 08:00:05 2024 +0300
Merge remote-tracking branch 'origin/master' into 5009-ecosia-safesearch
commit 5ad88d914cf9b03f399efd481ae39ebd56243e66
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jul 30 13:49:51 2024 +0300
all: ecosia safesearch
This commit is contained in:
@@ -14,6 +14,9 @@ var pixabay string
|
||||
//go:embed rules/duckduckgo.txt
|
||||
var duckduckgo string
|
||||
|
||||
//go:embed rules/ecosia.txt
|
||||
var ecosia string
|
||||
|
||||
//go:embed rules/yandex.txt
|
||||
var yandex string
|
||||
|
||||
@@ -27,6 +30,7 @@ var youtube string
|
||||
var safeSearchRules = map[Service]string{
|
||||
Bing: bing,
|
||||
DuckDuckGo: duckduckgo,
|
||||
Ecosia: ecosia,
|
||||
Google: google,
|
||||
Pixabay: pixabay,
|
||||
Yandex: yandex,
|
||||
|
||||
1
internal/filtering/safesearch/rules/ecosia.txt
Normal file
1
internal/filtering/safesearch/rules/ecosia.txt
Normal file
@@ -0,0 +1 @@
|
||||
|www.ecosia.org^$dnsrewrite=NOERROR;CNAME;strict-safe-search.ecosia.org
|
||||
@@ -28,6 +28,7 @@ type Service string
|
||||
const (
|
||||
Bing Service = "bing"
|
||||
DuckDuckGo Service = "duckduckgo"
|
||||
Ecosia Service = "ecosia"
|
||||
Google Service = "google"
|
||||
Pixabay Service = "pixabay"
|
||||
Yandex Service = "yandex"
|
||||
@@ -41,6 +42,8 @@ func isServiceProtected(s filtering.SafeSearchConfig, service Service) (ok bool)
|
||||
return s.Bing
|
||||
case DuckDuckGo:
|
||||
return s.DuckDuckGo
|
||||
case Ecosia:
|
||||
return s.Ecosia
|
||||
case Google:
|
||||
return s.Google
|
||||
case Pixabay:
|
||||
|
||||
@@ -25,6 +25,7 @@ var defaultSafeSearchConf = filtering.SafeSearchConfig{
|
||||
Enabled: true,
|
||||
Bing: true,
|
||||
DuckDuckGo: true,
|
||||
Ecosia: true,
|
||||
Google: true,
|
||||
Pixabay: true,
|
||||
Yandex: true,
|
||||
|
||||
@@ -34,6 +34,7 @@ var testConf = filtering.SafeSearchConfig{
|
||||
|
||||
Bing: true,
|
||||
DuckDuckGo: true,
|
||||
Ecosia: true,
|
||||
Google: true,
|
||||
Pixabay: true,
|
||||
Yandex: true,
|
||||
|
||||
Reference in New Issue
Block a user