mirror of
https://github.com/kenzok8/openwrt-packages
synced 2025-01-08 11:17:27 +08:00
update 2022-05-04 22:41:53
This commit is contained in:
parent
baee2bba96
commit
cef2534b96
File diff suppressed because one or more lines are too long
@ -804,7 +804,7 @@ header {
|
||||
|
||||
span[data-indicator="poll-status"] {
|
||||
color: #32325d;
|
||||
background-color: #fff !important;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
span[data-style="active"] {
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
-- Fetch Local Background Media
|
||||
|
||||
function glob(...)
|
||||
local function glob(...)
|
||||
local iter, code, msg = fs.glob(...)
|
||||
if iter then
|
||||
return nutil.consume(iter)
|
||||
@ -45,13 +45,16 @@
|
||||
local imageTypes = " jpg png gif "
|
||||
local videoTypes = " mp4 webm "
|
||||
local allTypes = imageTypes .. videoTypes
|
||||
function fetchMedia(path,themeDir)
|
||||
local function fetchMedia(path,themeDir)
|
||||
local backgroundTable = {}
|
||||
local backgroundCount = 0
|
||||
for i, f in ipairs(glob(path)) do
|
||||
attr = fs.stat(f)
|
||||
if attr then
|
||||
local ext = fs.basename(f):match(".+%.(%w+)$")
|
||||
if ext ~= nil then
|
||||
ext = ext:lower()
|
||||
end
|
||||
if ext ~= nil and string.match(allTypes, " "..ext.." ") ~= nil then
|
||||
local bg = {}
|
||||
bg.type = ext
|
||||
@ -63,27 +66,36 @@
|
||||
end
|
||||
return backgroundTable,backgroundCount
|
||||
end
|
||||
local function selectBackground(themeDir)
|
||||
local bgUrl = media .. "/img/bg1.jpg"
|
||||
local backgroundType = "Image"
|
||||
local mimeType = ""
|
||||
|
||||
if fs.access("/etc/config/argon") then
|
||||
if uci:get_first('argon', 'global', 'bing_background') == "1" then
|
||||
local bing = sys.exec("/usr/libexec/argon/bing_wallpaper")
|
||||
if (bing and bing ~= '') then
|
||||
return bing, "Image", ""
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local backgroundTable, backgroundCount = fetchMedia("/www" .. themeDir .. "*",themeDir)
|
||||
if ( backgroundCount > 0 ) then
|
||||
local currentBg = backgroundTable[math.random(1,backgroundCount)]
|
||||
bgUrl = currentBg.url
|
||||
if (string.match(videoTypes, " "..currentBg.type.." ") ~= nil) then
|
||||
backgroundType = "Video"
|
||||
mimeType = "video/" .. currentBg.type
|
||||
end
|
||||
end
|
||||
|
||||
return bgUrl,backgroundType,mimeType
|
||||
end
|
||||
|
||||
local boardinfo = util.ubus("system", "board")
|
||||
local themeDir = media .. "/background/"
|
||||
local bgUrl = media .. "/img/bg1.jpg"
|
||||
local backgroundTable, backgroundCount = fetchMedia("/www" .. themeDir .. "*",themeDir)
|
||||
local backgroundType = "Image"
|
||||
local mimeType = ""
|
||||
|
||||
if ( backgroundCount > 0 ) then
|
||||
local currentBg = backgroundTable[math.random(1,backgroundCount)]
|
||||
bgUrl = currentBg.url
|
||||
if (string.match(videoTypes, " "..currentBg.type.." ") ~= nil) then
|
||||
backgroundType = "Video"
|
||||
mimeType = "video/" .. currentBg.type
|
||||
end
|
||||
else
|
||||
local bing = sys.exec("/usr/libexec/argon/bing_wallpaper")
|
||||
if (bing and bing ~= '') then
|
||||
bgUrl = bing
|
||||
end
|
||||
end
|
||||
local bgUrl,backgroundType,mimeType = selectBackground(themeDir)
|
||||
%>
|
||||
<!-- Login Page Start -->
|
||||
<div class="login-page">
|
||||
|
@ -1,18 +1,17 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# Copyright (c) 2018-2020 Nick Peng (pymumu@gmail.com)
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
# Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=smartdns
|
||||
PKG_VERSION:=Release36.1
|
||||
PKG_RELEASE:=22
|
||||
PKG_VERSION:=36.1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://www.github.com/pymumu/smartdns.git
|
||||
PKG_SOURCE_VERSION:=24661c2419a81e660b11a0e3d35a3bc269cd4bfa
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/pymumu/smartdns/tar.gz/Release$(PKG_VERSION)?
|
||||
PKG_HASH:=92bba606295869ecdced2c1f0939baa90a9838e554a7f63208da988432769e6f
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-Release$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Nick Peng <pymumu@gmail.com>
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
@ -22,8 +21,8 @@ PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
MAKE_VARS += VER=$(PKG_VERSION)
|
||||
MAKE_PATH:=src
|
||||
MAKE_VARS+= VER=$(PKG_VERSION)
|
||||
|
||||
define Package/smartdns
|
||||
SECTION:=net
|
||||
@ -52,8 +51,8 @@ define Package/smartdns/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/package/openwrt/files/etc/init.d/smartdns $(1)/etc/init.d/smartdns
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/address.conf $(1)/etc/smartdns/address.conf
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/blacklist-ip.conf $(1)/etc/smartdns/blacklist-ip.conf
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/custom.conf $(1)/etc/smartdns/custom.conf
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/files/etc/config/smartdns $(1)/etc/config/smartdns
|
||||
$(INSTALL_CONF) $(CURDIR)/conf/custom.conf $(1)/etc/smartdns/custom.conf
|
||||
$(INSTALL_CONF) $(CURDIR)/conf/smartdns.conf $(1)/etc/config/smartdns
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,smartdns))
|
||||
|
48
smartdns/conf/custom.conf
Normal file
48
smartdns/conf/custom.conf
Normal file
@ -0,0 +1,48 @@
|
||||
# Add custom settings here.
|
||||
|
||||
# set log level
|
||||
# log-level [level], level=fatal, error, warn, notice, info, debug
|
||||
# log-level error
|
||||
|
||||
# log-size k,m,g
|
||||
# log-size 128k
|
||||
|
||||
# log-file /var/log/smartdns.log
|
||||
# log-num 2
|
||||
|
||||
# List of hosts that supply bogus NX domain results
|
||||
# bogus-nxdomain [ip/subnet]
|
||||
|
||||
speed-check-mode tcp:80,ping
|
||||
|
||||
server 101.6.6.6:5353
|
||||
server 202.38.93.153:5353
|
||||
server 202.141.162.123:5353
|
||||
server 202.141.178.13:5353
|
||||
server 2001:da8::666
|
||||
server 208.67.222.222:5353 -group fq_dns -exclude-default-group
|
||||
server 208.67.220.220:5353 -group fq_dns -exclude-default-group
|
||||
|
||||
server-tcp 1.0.0.1 -group fq_dns -exclude-default-group
|
||||
server-tcp 8.8.4.4 -group fq_dns -exclude-default-group
|
||||
server-tcp 149.112.112.112 -group fq_dns -exclude-default-group
|
||||
server-tcp 2606:4700:4700::1001 -group fq_dns -exclude-default-group
|
||||
|
||||
server-tls 115.159.131.230 -host-name dns.rubyfish.cn
|
||||
server-tls dns.rubyfish.cn
|
||||
server-tls 1.1.1.1 -host-name 1dot1dot1dot1.cloudflare-dns.com -group fq_dns -exclude-default-group
|
||||
server-tls 2606:4700:4700::1111 -host-name 1dot1dot1dot1.cloudflare-dns.com -group fq_dns -exclude-default-group
|
||||
server-tls 1dot1dot1dot1.cloudflare-dns.com -group fq_dns -exclude-default-group
|
||||
server-tls 8.8.8.8 -host-name dns.google -group fq_dns -exclude-default-group
|
||||
server-tls dns.google -group fq_dns -exclude-default-group
|
||||
|
||||
server-https https://202.38.93.153/resolve -host-name neatdns.ustclug.org -http-host neatdns.ustclug.org
|
||||
server-https https://202.141.178.13/resolve -host-name neatdns.ustclug.org -http-host neatdns.ustclug.org
|
||||
server-https https://[2001:da8:d800:931::153]/resolve -host-name neatdns.ustclug.org -http-host neatdns.ustclug.org
|
||||
server-https https://neatdns.ustclug.org/resolve
|
||||
server-https https://rubyfish.cn/dns-query
|
||||
server-https https://i.233py.com/dns-query
|
||||
server-https https://9.9.9.9/dns-query -group fq_dns -exclude-default-group
|
||||
server-https https://dns9.quad9.net/dns-query -group fq_dns -exclude-default-group
|
||||
server-https https://146.112.41.2/dns-query -host-name doh.opendns.com -http-host doh.opendns.com -group fq_dns -exclude-default-group
|
||||
server-https https://doh.opendns.com/dns-query -group fq_dns -exclude-default-group
|
28
smartdns/conf/smartdns.conf
Normal file
28
smartdns/conf/smartdns.conf
Normal file
@ -0,0 +1,28 @@
|
||||
config smartdns
|
||||
option server_name 'smartdns'
|
||||
option dualstack_ip_selection '1'
|
||||
option prefetch_domain '1'
|
||||
option serve_expired '1'
|
||||
option seconddns_no_speed_check '0'
|
||||
option seconddns_no_dualstack_selection '0'
|
||||
option seconddns_no_cache '0'
|
||||
option tcp_server '0'
|
||||
option seconddns_tcp_server '0'
|
||||
option coredump '0'
|
||||
option port '6053'
|
||||
option ipv6_server '0'
|
||||
option redirect 'dnsmasq-upstream'
|
||||
option seconddns_port '5335'
|
||||
option seconddns_server_group 'fq_dns'
|
||||
option seconddns_enabled '1'
|
||||
option seconddns_no_rule_addr '0'
|
||||
option seconddns_no_rule_nameserver '0'
|
||||
option seconddns_no_rule_ipset '0'
|
||||
option seconddns_no_rule_soa '0'
|
||||
option enabled '0'
|
||||
option cache_size '20000'
|
||||
option rr_ttl '3600'
|
||||
option rr_ttl_min '5'
|
||||
list old_redirect 'dnsmasq-upstream'
|
||||
list old_port '6053'
|
||||
list old_enabled '0'
|
Loading…
Reference in New Issue
Block a user