Merge pull request #1311 from dibdot/dnscrypt-proxy

luci-app-dnscrypt-proxy: fix ssl dependency
This commit is contained in:
Hannu Nyman 2017-08-18 10:08:43 +03:00 committed by GitHub
commit 2163284cf7
2 changed files with 8 additions and 1 deletions

View file

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for DNSCrypt-Proxy
LUCI_DEPENDS:=+libustream-mbedtls +dnscrypt-proxy
LUCI_DEPENDS:=+uclient-fetch +dnscrypt-proxy
LUCI_PKGARCH:=all
include ../../luci.mk

View file

@ -11,6 +11,13 @@ local plug_cnt = tonumber(luci.sys.exec("env -i /usr/sbin/dnscrypt-proxy --vers
local res_list = {}
local url = "https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv"
if not fs.access("/lib/libustream-ssl.so") then
m = SimpleForm("error", nil, translate("SSL support not available, please install an libustream-ssl variant to use this package."))
m.submit = false
m.reset = false
return m
end
if not fs.access(res_input) then
luci.sys.call("env -i /bin/uclient-fetch --no-check-certificate -O " .. res_input .. " " .. url .. " >/dev/null 2>&1")
end