Im using dnscrypt-proxy V2 and I just saw the new release from January, version 2.0.45, do you know if it possible to adding that version in my next image compilation?
Or just need to packages feeds update? https://github.com/dnscrypt/dnscrypt-proxy/releases/tag/2.0.45
You can email the maintainer asking them to update OpenWrt package in master and release. Then it will be available for compiling from scratch or a few days later for inclusion in an Image Builder-produced image.
Additionally, if you are already building from source (rather than an ImageBuilder), you can update the package Makefile locally until it is updated in the upstream
You would need to change the version number, the release number back to 1, and the HASH to the sha256sum result of the downloaded .tar.xz (or tar.gz) file in ./dl
Assuming no other requirements were added to the release (like deps), then it should work fine.
Should be make package/feeds/packages/dnscrypt-proxy2
When packages in ./feeds are installed, they are symlinked to package/feeds/packages/xxxx without the net/libs/ etc part.. Just the package name for the xxx
Stealth Edit on the above, so ping @ninjanoir78 for the notification
Here is an updated Makefile, let me know if it works and I'll put in a PR to update the package
#
# Copyright (C) 2019-2020 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=dnscrypt-proxy2
PKG_VERSION:=2.0.45
PKG_RELEASE:=1
PKG_SOURCE:=dnscrypt-proxy-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/DNSCrypt/dnscrypt-proxy/tar.gz/$(PKG_VERSION)?
PKG_HASH:=f7aac28c6a60404683d436072b89d18ed3bb309f8d8a95c8e87ad250da190821
PKG_BUILD_DIR:=$(BUILD_DIR)/dnscrypt-proxy-$(PKG_VERSION)
PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/DNSCrypt/dnscrypt-proxy
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/dnscrypt-proxy2
SECTION:=net
CATEGORY:=Network
TITLE:=Flexible DNS proxy with encrypted DNS protocols
URL:=https://github.com/DNSCrypt/dnscrypt-proxy
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
CONFLICTS:=dnscrypt-proxy
endef
define Package/dnscrypt-proxy2/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/dnscrypt-proxy2
$(INSTALL_CONF) $(PKG_BUILD_DIR)/dnscrypt-proxy/example-dnscrypt-proxy.toml $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
$(INSTALL_CONF) ./files/blacklist.txt $(1)/etc/dnscrypt-proxy2/blacklist.txt
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/dnscrypt-proxy.init $(1)/etc/init.d/dnscrypt-proxy
sed -i "s/^listen_addresses = .*/listen_addresses = ['127.0.0.53:53']/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
sed -i "s/^ # blacklist_file = 'blacklist.txt'/blacklist_file = 'blacklist.txt'/" $(1)/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
endef
define Package/dnscrypt-proxy2/description
A flexible DNS proxy, with support for modern encrypted DNS protocols
such as DNSCrypt v2 and DNS-over-HTTPS.
endef
define Package/dnscrypt-proxy2/conffiles
/etc/dnscrypt-proxy2/dnscrypt-proxy.toml
endef
define Package/golang-github-jedisct1-dnscrypt-proxy2-dev
$(call Package/dnscrypt-proxy2)
$(call GoPackage/GoSubMenu)
TITLE+= (source files)
PKGARCH:=all
endef
define Package/golang-github-jedisct1-dnscrypt-proxy2-dev/description
$(call Package/dnscrypt-proxy2/description)
This package provides the source files for the client/bridge program.
endef
$(eval $(call GoBinPackage,dnscrypt-proxy2))
$(eval $(call BuildPackage,dnscrypt-proxy2))
$(eval $(call GoSrcPackage,golang-github-jedisct1-dnscrypt-proxy2-dev))
$(eval $(call BuildPackage,golang-github-jedisct1-dnscrypt-proxy2-dev))
And, to make this educational The changed lines were:
and resetting the proper HASH value from skip to the value it should be. You can't force a download unless changing the PKG_HASH because the values won't match, but it'll be set for future users to not mess with once it's done
Yes, but I usually don't bother since I'm already in the Makefile when I'm doing it, and set the HASH to skip when I'm testing (due to usually multiple versions I'm testing)
I just noticed that the dnscrypt-proxy2 Makefile advertises DNS-over-HTTPS support, I realize it's a shamepless plug, but if all you need is DoH, I'd totally recommend the https-dns-proxy and luci-app-https-dns-proxy instead. Just compare the package sizes between the dnscrypt-proxy2 written in Go (~3.5Mb) and https-dns-proxy written in C (~12Kb):
EdgeRouterX in ~ # opkg info dnscrypt-proxy2 https-dns-proxy
Package: dnscrypt-proxy2
Version: 2.0.44-1
...
Size: 3564613
Filename: dnscrypt-proxy2_2.0.44-1_mipsel_24kc.ipk
Description: A flexible DNS proxy, with support for modern encrypted DNS protocols
such as DNSCrypt v2 and DNS-over-HTTPS.
EdgeRouterX in ~ # opkg info https-dns-proxy
Package: https-dns-proxy
Version: 2021-01-17-1
...
Size: 12913
Filename: https-dns-proxy_2021-01-17-1_mipsel_24kc.ipk
Description: https-dns-proxy is a light-weight DNS<-->HTTPS, non-caching translation proxy for the RFC 8484 DoH standard.
It receives regular (UDP) DNS requests and issues them via DoH.
Please see https://docs.openwrt.melmac.net/https-dns-proxy/ for more information.
The stubby package which supports DNS-over-TLS is also under 20Kb:
EdgeRouterX in ~ # opkg info stubby
Package: stubby
Version: 0.3.0-1
...
Size: 19219
Filename: stubby_0.3.0-1_mipsel_24kc.ipk
Description: This package contains the Stubby daemon (which utilizes the getdns library).
See https://github.com/openwrt/packages/blob/master/net/stubby/files/README.md for more details.