Browse Source

dnscrypt-proxy: add optional plugins

The init script already supports four plugins: dns cache, dns/ip blocking,
ipv6 blocking and dns logging.  If enabled this option installs these four
plugins and also adds libldns as a dependency.  If enabled the total size
increase is around 125 kB.

Signed-off-by: Terry Stockert <stockert@inkblotadmirer.me>
lilik-openwrt-22.03
Terry Stockert 8 years ago
parent
commit
efe6255186
2 changed files with 24 additions and 3 deletions
  1. +8
    -0
      net/dnscrypt-proxy/Config.in
  2. +16
    -3
      net/dnscrypt-proxy/Makefile

+ 8
- 0
net/dnscrypt-proxy/Config.in View File

@ -0,0 +1,8 @@
menu "Configuration"
depends on PACKAGE_dnscrypt-proxy
config DNSCRYPT_ENABLE_PLUGINS
bool "Enable plugin support (includes libldns and plugins, increases size by 125kB)"
default n
endmenu

+ 16
- 3
net/dnscrypt-proxy/Makefile View File

@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnscrypt-proxy PKG_NAME:=dnscrypt-proxy
PKG_VERSION:=1.9.4 PKG_VERSION:=1.9.4
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.dnscrypt.org/dnscrypt-proxy PKG_SOURCE_URL:=http://download.dnscrypt.org/dnscrypt-proxy
@ -21,6 +21,8 @@ PKG_INSTALL:=1
PKG_MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com> PKG_MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
PKG_LICENSE:=ISC PKG_LICENSE:=ISC
PKG_CONFIG_DEPENDS:= \
CONFIG_DNSCRYPT_ENABLE_PLUGINS
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -34,7 +36,8 @@ endef
define Package/dnscrypt-proxy define Package/dnscrypt-proxy
$(call Package/dnscrypt-proxy/Default) $(call Package/dnscrypt-proxy/Default)
DEPENDS:=+libsodium +dnscrypt-proxy-resolvers
DEPENDS:=+libsodium +dnscrypt-proxy-resolvers +DNSCRYPT_ENABLE_PLUGINS:libltdl \
+DNSCRYPT_ENABLE_PLUGINS:libldns
TITLE:=A tool for securing communications between a client and a DNS resolver TITLE:=A tool for securing communications between a client and a DNS resolver
endef endef
@ -68,11 +71,15 @@ define Package/hostip/description
to IPv4 or IPv6 addresses. to IPv4 or IPv6 addresses.
endef endef
define Package/dnscrypt-proxy/config
source "$(SOURCE)/Config.in"
endef
define Build/Configure define Build/Configure
$(call Build/Configure/Default, \ $(call Build/Configure/Default, \
--prefix=/usr \ --prefix=/usr \
--disable-ssp \ --disable-ssp \
--disable-plugins \
$(if $(CONFIG_DNSCRYPT_ENABLE_PLUGINS),,--disable-plugins) \
) )
endef endef
@ -95,6 +102,12 @@ define Package/dnscrypt-proxy/install
$(INSTALL_BIN) ./files/dnscrypt-proxy.init $(1)/etc/init.d/dnscrypt-proxy $(INSTALL_BIN) ./files/dnscrypt-proxy.init $(1)/etc/init.d/dnscrypt-proxy
$(INSTALL_DIR) $(1)/etc/config $(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/dnscrypt-proxy.config $(1)/etc/config/dnscrypt-proxy $(INSTALL_CONF) ./files/dnscrypt-proxy.config $(1)/etc/config/dnscrypt-proxy
$(if $(CONFIG_DNSCRYPT_ENABLE_PLUGINS), \
$(INSTALL_DIR) $(1)/usr/lib/dnscrypt-proxy; \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dnscrypt-proxy/libdcplugin_example_cache.so $(1)/usr/lib/dnscrypt-proxy/; \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dnscrypt-proxy/libdcplugin_example_ldns_aaaa_blocking.so $(1)/usr/lib/dnscrypt-proxy/; \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dnscrypt-proxy/libdcplugin_example_ldns_blocking.so $(1)/usr/lib/dnscrypt-proxy/; \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/dnscrypt-proxy/libdcplugin_example_logging.so $(1)/usr/lib/dnscrypt-proxy/)
endef endef
define Package/dnscrypt-proxy-resolvers/install define Package/dnscrypt-proxy-resolvers/install


Loading…
Cancel
Save