Skip to content

Commit

Permalink
add flushd fea.(dev)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkkgo committed May 19, 2024
1 parent 84d7c9a commit dc49949
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions build_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ if docker exec test1 mosdns curl http://127.0.0.1:7889 | grep -q Country-only-cn
else
exit
fi
docker exec test1 apk add socat
docker exec test1 sh -c "echo 'example.com' | socat - UNIX-CONNECT:/tmp/flush.sock && echo flush_ok_flag >>/etc/os-release"
if docker exec test1 cat /etc/os-release | grep -q flush_ok_flag; then
echo flush_ok_flag pass.
else
exit
fi
docker rm -f test1
docker run --name test2 \
-e USE_MARK_DATA=yes \
Expand Down
5 changes: 3 additions & 2 deletions prebuild-paopaodns/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ apk upgrade
apk add build-base flex byacc musl-dev gcc make git python3-dev swig libevent-dev openssl-dev expat-dev hiredis-dev go grep bind-tools

# build unbound
git clone https://github.com/NLnetLabs/unbound.git --depth 1 /unbound -b release-1.19.3
#git clone https://github.com/NLnetLabs/unbound.git --depth 1 /unbound -b release-1.19.3
git clone https://github.com/NLnetLabs/unbound.git --depth 1 /unbound
cd /unbound || exit
export CFLAGS="-O3"
./configure --with-libevent --with-pthreads --with-libhiredis --enable-cachedb \
--disable-rpath --without-pythonmodule --disable-documentation \
--disable-flto --disable-maintainer-mode --disable-option-checking --disable-rpath \
--with-pidfile=/tmp/unbound.pid \
--prefix=/usr --sysconfdir=/etc --localstatedir=/tmp --with-username=root
--prefix=/usr --sysconfdir=/etc --localstatedir=/tmp --with-username=root --with-chroot-dir=""
make
make install
mv /usr/sbin/unbound /src/
Expand Down
1 change: 1 addition & 0 deletions src/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ if [ "$CNAUTO" != "no" ]; then
fi
if [ "$CNFALL" = "yes" ]; then
sed -i "s/#cnfall//g" /tmp/mosdns.yaml
sed -i "s/#flushd_un_yes//g" /tmp/mosdns.yaml
else
sed -i "s/#nofall//g" /tmp/mosdns.yaml
fi
Expand Down
2 changes: 2 additions & 0 deletions src/mosdns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,5 +325,7 @@ plugins:
entry: check_cache
listen: :53
idle_timeout: 5
#flushd_un_yes - tag: "flushd_server"
#flushd_un_yes type: "flushd_server"
#http_file_yes - tag: "httpd_server"
#http_file_yes type: "httpd_server"

0 comments on commit dc49949

Please sign in to comment.