Compare commits
1 commit
master
...
check_sear
Author | SHA1 | Date | |
---|---|---|---|
|
112768e71f |
3 changed files with 9 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
[
|
||||
{
|
||||
"name": "searx.space",
|
||||
"filters": ["Header:X-Forwarded-For=(2001:41d0:8:de3::1|176.31.252.227)"],
|
||||
"filters": ["Header:X-Forwarded-For=$CHECK_SEARX_SPACE_IPS"],
|
||||
"stop": true,
|
||||
"actions": [{ "name": "log"}]
|
||||
},
|
2
start.sh
2
start.sh
|
@ -5,6 +5,8 @@ cd -- "$BASE_DIR"
|
|||
|
||||
. ./util.sh
|
||||
|
||||
create_rules_json "check.searx.space" > rules.json
|
||||
|
||||
$DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE down -v
|
||||
$DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE rm -fv
|
||||
$DOCKERCOMPOSE -f $DOCKERCOMPOSEFILE up
|
||||
|
|
6
util.sh
6
util.sh
|
@ -24,3 +24,9 @@ if [ ! -f "${DOCKERCOMPOSEFILE}" ]; then
|
|||
echo "${DOCKERCOMPOSEFILE} not found" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
create_rules_json() {
|
||||
# $1 : requests host name $1 will bypass filtron
|
||||
IPS="($(host $1 | rev | cut -d\ -f1 | rev | tr '\n' '|' | sed 's/.$//'))"
|
||||
sed "s/\$CHECK_SEARX_SPACE_IPS/$IPS/" rules.json.template
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue