mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 03:43:29 +00:00
improve pdnsd performace
This commit is contained in:
parent
4aaf8e3c62
commit
d3ab7d4cf5
@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for SSR Pro
|
||||
LUCI_DEPENDS:=+iptables-mod-tproxy +kmod-ipt-tproxy +ip +ipset-lists +shadowsocksr-libev-alt +shadowsocks-libev-ss-redir +pdnsd-alt +coreutils +coreutils-base64 +coreutils-nohup +dnsmasq-full
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=2
|
||||
PKG_RELEASE:=28
|
||||
PKG_RELEASE:=29
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -217,13 +217,13 @@ start_pdnsd()
|
||||
|
||||
mkdir -p /var/etc /var/pdnsd
|
||||
if ! test -f "/var/pdnsd/pdnsd.cache"; then
|
||||
dd if=/dev/zero of="/var/pdnsd/pdnsd.cache" bs=1 count=4 2> /dev/null
|
||||
echo -ne "pd13\000\000\000\000" >/var/pdnsd/pdnsd.cache
|
||||
chown -R nobody.nogroup /var/pdnsd
|
||||
fi
|
||||
|
||||
cat > /var/etc/pdnsd.conf <<EOF
|
||||
global {
|
||||
perm_cache=10240;
|
||||
perm_cache=1024;
|
||||
cache_dir="/var/pdnsd";
|
||||
pid_file = /var/run/pdnsd.pid;
|
||||
run_as="nobody";
|
||||
@ -235,8 +235,8 @@ global {
|
||||
max_ttl=1w;
|
||||
timeout=10;
|
||||
neg_domain_pol=on;
|
||||
proc_limit=2;
|
||||
procq_limit=8;
|
||||
proc_limit=40;
|
||||
procq_limit=60;
|
||||
}
|
||||
server {
|
||||
label= "fwxxx";
|
||||
@ -265,7 +265,7 @@ stop_pdnsd()
|
||||
while iptables -t nat -D OUTPUT -p tcp --dport 53 -j pdnsd_output 2>/dev/null; do :; done
|
||||
iptables -t nat -X pdnsd_output
|
||||
fi
|
||||
killall -9 pdnsd 2>/dev/null
|
||||
kill $(cat /var/run/pdnsd.pid) >/dev/null 2>&1 || killall -9 pdnsd >/dev/null 2>&1
|
||||
rm -rf /var/pdnsd
|
||||
rm -f /var/etc/pdnsd.conf
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user