diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-04-18 15:49:26 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-04-18 16:21:27 +0200 |
commit | b4040aacb04ce38b7eae315d37b2a61a38aea4b1 (patch) | |
tree | e8b38cd68d04f5a2bcac5d55294cd591558e349a /applications/luci-app-dnscrypt-proxy | |
parent | eb4571c6dc7e9f99133de1d7df23024ba6d31d9e (diff) |
libs: move http.protocol.{date,mime,conditionals} to luci-lib-httpprotoutils
Also adjust the dependencies of components depending on these classes and
flatten the namespace from luci.http.protocol.* to luci.http.*
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-dnscrypt-proxy')
-rw-r--r-- | applications/luci-app-dnscrypt-proxy/Makefile | 2 | ||||
-rw-r--r-- | applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/applications/luci-app-dnscrypt-proxy/Makefile b/applications/luci-app-dnscrypt-proxy/Makefile index 4b632b8d04..d34fec87d7 100644 --- a/applications/luci-app-dnscrypt-proxy/Makefile +++ b/applications/luci-app-dnscrypt-proxy/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for DNSCrypt-Proxy -LUCI_DEPENDS:=+uclient-fetch +dnscrypt-proxy +LUCI_DEPENDS:=+uclient-fetch +dnscrypt-proxy +luci-lib-httpprotoutils LUCI_PKGARCH:=all include ../../luci.mk diff --git a/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua b/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua index 999c81dee7..8f0e3224b4 100644 --- a/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua +++ b/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua @@ -4,7 +4,6 @@ local fs = require("nixio.fs") local uci = require("luci.model.uci").cursor() local util = require("luci.util") -local date = require("luci.http.protocol.date") local res_input = "/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv" local res_dir = fs.dirname(res_input) local dump = util.ubus("network.interface", "dump", {}) @@ -12,6 +11,11 @@ local plug_cnt = tonumber(luci.sys.exec("env -i /usr/sbin/dnscrypt-proxy --vers local res_list = {} local url = "https://raw.githubusercontent.com/dyne/dnscrypt-proxy/master/dnscrypt-resolvers.csv" +local _, date = pcall(require, "luci.http.date") +if not date then + _, date = pcall(require, "luci.http.protocol.date") +end + if not fs.access(res_input) then if not fs.access("/lib/libustream-ssl.so") then m = SimpleForm("error", nil, translate("No default resolver list and no SSL support available.<br />") |