🗽 Sync 2023-02-23 20:45

This commit is contained in:
github-actions[bot] 2023-02-23 20:45:34 +08:00
parent 9b7f1f2905
commit 2793d8d5aa
55 changed files with 8 additions and 3467 deletions

View File

@ -1,77 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=aliyundrive-fuse
PKG_VERSION:=0.1.14
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_MAINTAINER:=messense <messense@icloud.com>
PKG_LIBC:=musl
ifeq ($(ARCH),arm)
PKG_LIBC:=musleabi
ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE))))
ifneq ($(filter $(ARM_CPU_FEATURES),vfp vfpv2),)
PKG_LIBC:=musleabihf
endif
endif
PKG_ARCH=$(ARCH)
ifeq ($(ARCH),i386)
PKG_ARCH:=i686
endif
PKG_SOURCE:=aliyundrive-fuse-v$(PKG_VERSION).$(PKG_ARCH)-unknown-linux-$(PKG_LIBC).tar.gz
PKG_SOURCE_URL:=https://github.com/messense/aliyundrive-fuse/releases/download/v$(PKG_VERSION)/
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/aliyundrive-fuse
SECTION:=multimedia
CATEGORY:=Multimedia
DEPENDS:=+fuse-utils
TITLE:=FUSE for AliyunDrive
URL:=https://github.com/messense/aliyundrive-fuse
endef
define Package/aliyundrive-fuse/description
FUSE for AliyunDrive.
endef
define Package/aliyundrive-fuse/conffiles
/etc/config/aliyundrive-fuse
endef
define Download/sha256sum
FILE:=$(PKG_SOURCE).sha256
URL_FILE:=$(FILE)
URL:=$(PKG_SOURCE_URL)
HASH:=skip
endef
$(eval $(call Download,sha256sum))
define Build/Prepare
mv $(DL_DIR)/$(PKG_SOURCE).sha256 .
cp $(DL_DIR)/$(PKG_SOURCE) .
shasum -a 256 -c $(PKG_SOURCE).sha256
rm $(PKG_SOURCE).sha256 $(PKG_SOURCE)
tar -C $(PKG_BUILD_DIR)/ -zxf $(DL_DIR)/$(PKG_SOURCE)
endef
define Build/Compile
echo "aliyundrive-fuse using precompiled binary."
endef
define Package/aliyundrive-fuse/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/aliyundrive-fuse $(1)/usr/bin/aliyundrive-fuse
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/aliyundrive-fuse.init $(1)/etc/init.d/aliyundrive-fuse
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/aliyundrive-fuse.config $(1)/etc/config/aliyundrive-fuse
endef
$(eval $(call BuildPackage,aliyundrive-fuse))

View File

@ -1,7 +0,0 @@
config default
option enable '0'
option debug '0'
option refresh_token ''
option mount_point '/mnt/aliyundrive'
option read_buffer_size '10485760'
option allow_other '1'

View File

@ -1,48 +0,0 @@
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=99
STOP=15
NAME=aliyundrive-fuse
uci_get_by_type() {
local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null)
echo ${ret:=$3}
}
start_service() {
local enable=$(uci_get_by_type default enable)
case "$enable" in
1|on|true|yes|enabled)
local refresh_token=$(uci_get_by_type default refresh_token)
local mount_point=$(uci_get_by_type default mount_point)
local read_buf_size=$(uci_get_by_type default read_buffer_size 10485760)
local allow_other=$(uci_get_by_type default allow_other 0)
local extra_options=""
if [ "$allow_other" = "1" ]; then
extra_options="$extra_options --allow-other"
fi
mkdir -p "$mount_point"
procd_open_instance
procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options -S $read_buf_size --workdir /var/run/$NAME $mount_point >>/var/log/$NAME.log 2>&1"
procd_set_param pidfile /var/run/$NAME.pid
procd_set_param env REFRESH_TOKEN="$refresh_token"
case $(uci_get_by_type default debug) in
1|on|true|yes|enabled)
procd_append_param env RUST_LOG="aliyundrive_fuse=debug" ;;
*) ;;
esac
procd_close_instance ;;
*)
stop_service ;;
esac
}
service_triggers() {
procd_add_reload_trigger "aliyundrive-fuse"
}

View File

@ -1,17 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-aliyundrive-fuse
PKG_VERSION:=0.1.14
PKG_RELEASE:=1
PKG_PO_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
PKG_LICENSE:=MIT
PKG_MAINTAINER:=messense <messense@icloud.com>
LUCI_TITLE:=LuCI Support for aliyundrive-fuse
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+aliyundrive-fuse
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,40 +0,0 @@
module("luci.controller.aliyundrive-fuse", package.seeall)
function index()
if not nixio.fs.access("/etc/config/aliyundrive-fuse") then
return
end
local page
page = entry({"admin", "services", "aliyundrive-fuse"}, alias("admin", "services", "aliyundrive-fuse", "client"), _("AliyunDrive FUSE"), 10) -- 首页
page.dependent = true
page.acl_depends = { "luci-app-aliyundrive-fuse" }
entry({"admin", "services", "aliyundrive-fuse", "client"}, cbi("aliyundrive-fuse/client"), _("Settings"), 10).leaf = true -- 客户端配置
entry({"admin", "services", "aliyundrive-fuse", "log"}, form("aliyundrive-fuse/log"), _("Log"), 30).leaf = true -- 日志页面
entry({"admin", "services", "aliyundrive-fuse", "status"}, call("action_status")).leaf = true
entry({"admin", "services", "aliyundrive-fuse", "logtail"}, call("action_logtail")).leaf = true
end
function action_status()
local e = {}
e.running = luci.sys.call("pidof aliyundrive-fuse >/dev/null") == 0
e.application = luci.sys.exec("aliyundrive-fuse --version")
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
function action_logtail()
local fs = require "nixio.fs"
local log_path = "/var/log/aliyundrive-fuse.log"
local e = {}
e.running = luci.sys.call("pidof aliyundrive-fuse >/dev/null") == 0
if fs.access(log_path) then
e.log = luci.sys.exec("tail -n 100 %s | sed 's/\\x1b\\[[0-9;]*m//g'" % log_path)
else
e.log = ""
end
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -1,30 +0,0 @@
m = Map("aliyundrive-fuse")
m.title = translate("AliyunDrive FUSE")
m.description = translate("<a href=\"https://github.com/messense/aliyundrive-fuse\" target=\"_blank\">Project GitHub URL</a>")
m:section(SimpleSection).template = "aliyundrive-fuse/aliyundrive-fuse_status"
e = m:section(TypedSection, "default")
e.anonymous = true
enable = e:option(Flag, "enable", translate("Enable"))
enable.rmempty = false
refresh_token = e:option(Value, "refresh_token", translate("Refresh Token"))
refresh_token.description = translate("<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">How to get refresh token</a>")
mount_point = e:option(Value, "mount_point", translate("Mount Point"))
mount_point.default = "/mnt/aliyundrive"
read_buffer_size = e:option(Value, "read_buffer_size", translate("Read Buffer Size"))
read_buffer_size.default = "10485760"
read_buffer_size.datatype = "uinteger"
allow_other = e:option(Flag, "allow_other", translate("Allow Other users Access"))
allow_other.description = translate("Allow other users to access the drive, enable this if you share with samba")
allow_other.rmempty = false
debug = e:option(Flag, "debug", translate("Debug Mode"))
debug.rmempty = false
return m

View File

@ -1,9 +0,0 @@
log = SimpleForm("logview")
log.submit = false
log.reset = false
t = log:field(DummyValue, '', '')
t.rawhtml = true
t.template = 'aliyundrive-fuse/aliyundrive-fuse_log'
return log

View File

@ -1,15 +0,0 @@
<%+cbi/valueheader%>
<textarea id="logview" class="cbi-input-textarea" style="width: 100%" rows="30" readonly="readonly"></textarea>
<script type="text/javascript">
const LOG_URL = '<%=luci.dispatcher.build_url("admin", "services", "aliyundrive-fuse", "logtail")%>';
XHR.poll(1, LOG_URL, null, (x, d) => {
let logview = document.getElementById("logview");
if (!d.running) {
XHR.halt();
}
logview.value = d.log;
logview.scrollTop = logview.scrollHeight;
});
</script>
<%+cbi/valuefooter%>

View File

@ -1,21 +0,0 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[services]], [[aliyundrive-fuse]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('aliyundrive-fuse_status');
if (data && tb) {
if (data.running) {
tb.innerHTML = '<em><b style=color:green>' + data.application + '<%:RUNNING%></b></em>';
} else {
tb.innerHTML = '<em><b style=color:red>' + data.application + '<%:NOT RUNNING%></b></em>';
}
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="aliyundrive-fuse_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>

View File

@ -1,50 +0,0 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8\n"
msgid "AliyunDrive"
msgstr "阿里云盘"
msgid "AliyunDrive FUSE"
msgstr "阿里云盘 FUSE"
msgid "Enable"
msgstr "启用"
msgid "Refresh Token"
msgstr "Refresh Token"
msgid "Mount Point"
msgstr "挂载点"
msgid "Read Buffer Size"
msgstr "下载缓冲大小(bytes)"
msgid "Collecting data..."
msgstr "获取数据中..."
msgid "RUNNING"
msgstr "运行中"
msgid "NOT RUNNING"
msgstr "未运行"
msgid "Settings"
msgstr "设置"
msgid "Log"
msgstr "日志"
msgid "Debug Mode"
msgstr "调试模式"
msgid "<a href=\"https://github.com/messense/aliyundrive-fuse\" target=\"_blank\">Project GitHub URL</a>"
msgstr "<a href=\"https://github.com/messense/aliyundrive-fuse\" target=\"_blank\">GitHub 项目地址</a>"
msgid "<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">How to get refresh token</a>"
msgstr "<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">查看获取 refresh token 的方法</a>"
msgid "Allow Other users Access"
msgstr "允许其他用户访问"
msgid "Allow other users to access the drive, enable this if you share with samba"
msgstr "允许其他用户访问此驱动如果你想用Samba分享请开启此开关"

View File

@ -1 +0,0 @@
zh-cn

View File

@ -1,11 +0,0 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@aliyundrive-fuse[-1]
add ucitrack aliyundrive-fuse
set ucitrack.@aliyundrive-fuse[-1].init=aliyundrive-fuse
commit ucitrack
EOF
rm -f /tmp/luci-indexcache
exit 0

View File

@ -1,11 +0,0 @@
{
"luci-app-aliyundrive-fuse": {
"description": "Grant UCI access for luci-app-aliyundrive-fuse",
"read": {
"uci": [ "aliyundrive-fuse" ]
},
"write": {
"uci": [ "aliyundrive-fuse" ]
}
}
}

View File

@ -1,21 +0,0 @@
# Author: mingxiaoyu (fengying0347@163.com)
#
# Licensed to the public under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-cloudflarespeedtest
LUCI_TITLE:=LuCI support for Cloudflares Speed Test
LUCI_DEPENDS:=+cdnspeedtest +openssl-util +curl
LUCI_PKGARCH:=all
PKG_VERSION:=1.5.0
PKG_RELEASE:=0
PKG_LICENSE:=AGPL-3.0
PKG_MAINTAINER:=mingxiaoyu <fengying0347@163.com>
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,50 +0,0 @@
-- Copyright (C) 2020 mingxiaoyu <fengying0347@163.com>
-- Licensed to the public under the GNU General Public License v3.
module("luci.controller.cloudflarespeedtest",package.seeall)
function index()
if not nixio.fs.access('/etc/config/cloudflarespeedtest') then
return
end
local page
page = entry({"admin", "services", "cloudflarespeedtest"}, firstchild(), _("Cloudflare Speed Test"), 99)
page.dependent = false
page.acl_depends = { "luci-app-cloudflarespeedtest" }
entry({"admin", "services", "cloudflarespeedtest", "general"}, cbi("cloudflarespeedtest/cloudflarespeedtest"), _("Base Setting"), 1)
entry({"admin", "services", "cloudflarespeedtest", "logread"}, form("cloudflarespeedtest/logread"), _("Logs"), 2)
entry({"admin", "services", "cloudflarespeedtest", "status"}, call("act_status")).leaf = true
entry({"admin", "services", "cloudflarespeedtest", "stop"}, call("act_stop"))
entry({"admin", "services", "cloudflarespeedtest", "start"}, call("act_start"))
entry({"admin", "services", "cloudflarespeedtest", "getlog"}, call("get_log"))
end
function act_status()
local e = {}
e.running = luci.sys.call("busybox ps -w | grep cdnspeedtest | grep -v grep >/dev/null") == 0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
function act_stop()
luci.sys.call("busybox ps -w | grep cdnspeedtest | grep -v grep | xargs kill -9 >/dev/null")
luci.http.write('')
end
function act_start()
act_stop()
luci.sys.call("/usr/bin/cloudflarespeedtest/cloudflarespeedtest.sh start")
luci.http.write('')
end
function get_log()
local fs = require "nixio.fs"
local e = {}
e.running = luci.sys.call("busybox ps -w | grep cdnspeedtest | grep -v grep >/dev/null") == 0
e.log= fs.readfile("/var/log/cloudflarespeedtest.log") or ""
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -1,335 +0,0 @@
require("luci.sys")
local uci = luci.model.uci.cursor()
m = Map('cloudflarespeedtest')
m.title = translate('Cloudflare Speed Test')
m.description = '<a href=\"https://github.com/mingxiaoyu/luci-app-cloudflarespeedtest\" target=\"_blank\">GitHub</a>'
-- [[ 基本设置 ]]--
s = m:section(NamedSection, 'global')
s.addremove = false
s.anonymous = true
o=s:option(Flag,"enabled",translate("Enabled"))
o.description = translate("Enabled scheduled task test Cloudflare IP")
o.rmempty=false
o.default = 0
o=s:option(Flag,"ipv6_enabled",translate("IPv6 Enabled"))
o.description = translate("Provides only one method, if IPv6 is enabled, IPv4 will not be tested")
o.default = 0
o.rmempty=false
o=s:option(Value,"speed",translate("Broadband speed"))
o.description =translate("100M broadband download speed is about 12M/s. It is not recommended to fill in an excessively large value, and it may run all the time.");
o.datatype ="uinteger"
o.rmempty=false
o=s:option(Value,"custome_url",translate("Custome Url"))
o.description = translate("<a href=\"https://github.com/XIU2/CloudflareSpeedTest/issues/168\" target=\"_blank\">How to create</a>")
o.rmempty=false
o=s:option(Flag,"custome_cors_enabled",translate("Custome Cron Enabled"))
o.default = 0
o.rmempty=false
o = s:option(Value, "custome_cron", translate("Custome Cron"))
o:depends("custome_cors_enabled", 1)
hour = s:option(Value, "hour", translate("Hour"))
hour.datatype = "range(0,23)"
hour:depends("custome_cors_enabled", 0)
minute = s:option(Value, "minute", translate("Minute"))
minute.datatype = "range(0,59)"
minute:depends("custome_cors_enabled", 0)
o = s:option(ListValue, "proxy_mode", translate("Proxy Mode"))
o:value("nil", translate("HOLD"))
o.description = translate("during the speed testing, swith to which mode")
o:value("gfw", translate("GFW List"))
o:value("close", translate("CLOSE"))
o.default = "gfw"
o=s:option(Flag,"advanced",translate("Advanced"))
o.description = translate("Not recommended")
o.default = 0
o.rmempty=false
o = s:option(Value, "threads", translate("Thread"))
o.datatype ="uinteger"
o.default = 200
o.rmempty=true
o:depends("advanced", 1)
o = s:option(Value, "tl", translate("Average Latency Cap"))
o.datatype ="uinteger"
o.default = 200
o.rmempty=true
o:depends("advanced", 1)
o = s:option(Value, "tll", translate("Average Latency Lower Bound"))
o.datatype ="uinteger"
o.default = 40
o.rmempty=true
o:depends("advanced", 1)
o = s:option(Value, "t", translate("Delayed speed measurement time"))
o.datatype ="uinteger"
o.default = 4
o.rmempty=true
o:depends("advanced", 1)
o = s:option(Value, "dt", translate("Download speed test time"))
o.datatype ="uinteger"
o.default = 10
o.rmempty=true
o:depends("advanced", 1)
o = s:option(Value, "dn", translate("Number of download speed tests"))
o.datatype ="uinteger"
o.default = 1
o.rmempty=true
o:depends("advanced", 1)
o = s:option(Flag, "dd", translate("Disable download speed test"))
o.default = 0
o.rmempty=true
o:depends("advanced", 1)
o = s:option(Value, "tp", translate("Port"))
o.rmempty=true
o.default = 443
o.datatype ="port"
o:depends("advanced", 1)
o = s:option(DummyValue, '', '')
o.rawhtml = true
o.template = "cloudflarespeedtest/actions"
s = m:section(NamedSection, "servers", "section", translate("Third party applications settings"))
if nixio.fs.access("/etc/config/shadowsocksr") then
s:tab("ssr", translate("Shadowsocksr Plus+"))
o=s:taboption("ssr", Flag, "ssr_enabled",translate("Shadowsocksr Plus+ Enabled"))
o.rmempty=true
local ssr_server_table = {}
uci:foreach("shadowsocksr", "servers", function(s)
if s.alias then
ssr_server_table[s[".name"]] = "[%s]:%s" % {string.upper(s.v2ray_protocol or s.type), s.alias}
elseif s.server and s.server_port then
ssr_server_table[s[".name"]] = "[%s]:%s:%s" % {string.upper(s.v2ray_protocol or s.type), s.server, s.server_port}
end
end)
local ssr_key_table = {}
for key, _ in pairs(ssr_server_table) do
table.insert(ssr_key_table, key)
end
table.sort(ssr_key_table)
o = s:taboption("ssr", DynamicList, "ssr_services",
translate("Shadowsocksr Servers"),
translate("Please select a service"))
for _, key in pairs(ssr_key_table) do
o:value(key, ssr_server_table[key])
end
o:depends("ssr_enabled", 1)
o.forcewrite = true
end
if nixio.fs.access("/etc/config/passwall") then
s:tab("passwalltab", translate("passwall"))
o=s:taboption("passwalltab", Flag, "passwall_enabled",translate("Passwall Enabled"))
o.rmempty=true
local passwall_server_table = {}
uci:foreach("passwall", "nodes", function(s)
if s.remarks then
passwall_server_table[s[".name"]] = "[%s]:%s" % {string.upper(s.protocol or s.type), s.remarks}
end
end)
local passwall_key_table = {}
for key, _ in pairs(passwall_server_table) do
table.insert(passwall_key_table, key)
end
table.sort(passwall_key_table)
o = s:taboption("passwalltab", DynamicList, "passwall_services",
translate("Passwall Servers"),
translate("Please select a service"))
for _, key in pairs(passwall_key_table) do
o:value(key, passwall_server_table[key])
end
o:depends("passwall_enabled", 1)
o.forcewrite = true
end
if nixio.fs.access("/etc/config/passwall2") then
s:tab("passwall2tab", translate("passwall2"))
o=s:taboption("passwall2tab", Flag, "passwall2_enabled",translate("PassWall2 Enabled"))
o.rmempty=true
local passwall2_server_table = {}
uci:foreach("passwall2", "nodes", function(s)
if s.remarks then
passwall2_server_table[s[".name"]] = "[%s]:%s" % {string.upper(s.protocol or s.type), s.remarks}
end
end)
local passwall2_key_table = {}
for key, _ in pairs(passwall2_server_table) do
table.insert(passwall2_key_table, key)
end
table.sort(passwall2_key_table)
o = s:taboption("passwall2tab", DynamicList, "passwall2_services",
translate("Passwall2 Servers"),
translate("Please select a service"))
for _, key in pairs(passwall2_key_table) do
o:value(key, passwall2_server_table[key])
end
o:depends("passwall2_enabled", 1)
o.forcewrite = true
end
s:tab("bypasstab", translate("Bypass"))
if nixio.fs.access("/etc/config/bypass") then
o=s:taboption("bypasstab", Flag, "bypass_enabled",translate("Bypass Enabled"))
o.rmempty=true
local bypass_server_table = {}
uci:foreach("bypass", "servers", function(s)
if s.alias then
bypass_server_table[s[".name"]] = "[%s]:%s" % {string.upper(s.protocol or s.type), s.alias}
elseif s.server and s.server_port then
bypass_server_table[s[".name"]] = "[%s]:%s:%s" % {string.upper(s.protocol or s.type), s.server, s.server_port}
end
end)
local bypass_key_table = {}
for key, _ in pairs(bypass_server_table) do
table.insert(bypass_key_table, key)
end
table.sort(bypass_key_table)
o = s:taboption("bypasstab", DynamicList, "bypass_services",
translate("Bypass Servers"),
translate("Please select a service"))
for _, key in pairs(bypass_key_table) do
o:value(key, bypass_server_table[key])
end
o:depends("bypass_enabled", 1)
o.forcewrite = true
end
s:tab("vssrtab", translate("Vssr"))
if nixio.fs.access("/etc/config/vssr") then
o=s:taboption("vssrtab", Flag, "vssr_enabled",translate("Vssr Enabled"))
o.rmempty=true
local vssr_server_table = {}
uci:foreach("vssr", "servers", function(s)
if s.alias then
vssr_server_table[s[".name"]] = "[%s]:%s" % {string.upper(s.protocol or s.type), s.alias}
elseif s.server and s.server_port then
vssr_server_table[s[".name"]] = "[%s]:%s:%s" % {string.upper(s.protocol or s.type), s.server, s.server_port}
end
end)
local vssr_key_table = {}
for key, _ in pairs(vssr_server_table) do
table.insert(vssr_key_table, key)
end
table.sort(vssr_key_table)
o = s:taboption("vssrtab", DynamicList, "vssr_services",
translate("Vssr Servers"),
translate("Please select a service"))
for _, key in pairs(vssr_key_table) do
o:value(key, vssr_server_table[key])
end
o:depends("vssr_enabled", 1)
o.forcewrite = true
end
s:tab("dnstab", translate("DNS"))
o=s:taboption("dnstab", Flag, "DNS_enabled",translate("DNS Enabled"))
o=s:taboption("dnstab", ListValue, "DNS_type", translate("DNS Type"))
o:value("aliyu", translate("AliyuDNS"))
o:depends("DNS_enabled", 1)
o=s:taboption("dnstab", Value,"app_key",translate("Access Key ID"))
o.rmempty=true
o:depends("DNS_enabled", 1)
o=s:taboption("dnstab", Value,"app_secret",translate("Access Key Secret"))
o.rmempty=true
o:depends("DNS_enabled", 1)
o=s:taboption("dnstab", Value,"main_domain",translate("Main Domain"),translate("For example: test.github.com -> github.com"))
o.rmempty=true
o:depends("DNS_enabled", 1)
o=s:taboption("dnstab", DynamicList,"sub_domain",translate("Sub Domain"),translate("For example: test.github.com -> test"))
o.rmempty=true
o:depends("DNS_enabled", 1)
o=s:taboption("dnstab", ListValue, "line", translate("Lines"))
o:value("default", translate("default"))
o:value("telecom", translate("telecom"))
o:value("unicom", translate("unicom"))
o:value("mobile", translate("mobile"))
o:depends("DNS_enabled", 1)
o.default ="telecom"
s:tab("dnshost", translate("HOST"))
o=s:taboption("dnshost", Flag, "HOST_enabled",translate("HOST Enabled"))
o=s:taboption("dnshost", Value,"host_domain",translate("Domain"))
o.rmempty=true
o:depends("HOST_enabled", 1)
e=m:section(TypedSection,"global",translate("Best IP"))
e.anonymous=true
local a="/usr/share/cloudflarespeedtestresult.txt"
tvIPs=e:option(TextValue,"syipstext")
tvIPs.rows=8
tvIPs.readonly="readonly"
tvIPs.wrap="off"
function tvIPs.cfgvalue(e,e)
sylogtext=""
if a and nixio.fs.access(a) then
sylogtext=luci.sys.exec("tail -n 100 %s"%a)
end
return sylogtext
end
tvIPs.write=function(e,e,e)
end
return m

View File

@ -1,9 +0,0 @@
log = SimpleForm("logview")
log.submit = false
log.reset = false
t = log:field(DummyValue, '', '')
t.rawhtml = true
t.template = 'cloudflarespeedtest/logread'
return log

View File

@ -1,56 +0,0 @@
<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
const STATUS_URL = '<%=luci.dispatcher.build_url("admin", "services", "cloudflarespeedtest","status")%>';
const RUN_URL = '<%=luci.dispatcher.build_url("admin", "services", "cloudflarespeedtest","start")%>';
const STOP_URL = '<%=luci.dispatcher.build_url("admin", "services", "cloudflarespeedtest","stop")%>';
const LOG_URL = '<%=luci.dispatcher.build_url("admin", "services", "cloudflarespeedtest","logread")%>';
XHR.poll(3, STATUS_URL, null,
function(x, data) {
var tb = document.getElementById('cloudflarespeedtest_status');
if (data && tb) {
if (data.running) {
buttonStatus(true)
tb.innerHTML = '<em><b><font color=green><%:RUNNING %></font></b></em>';
} else {
buttonStatus(false)
tb.innerHTML = '<em><b><font color=red> <%:NOT RUNNING %></font></b></em>';
}
}
}
);
function cloudflarespeedtest_act_start() {
buttonStatus(true)
XHR.get(RUN_URL, null, () => {
});
setTimeout(() => { window.location = LOG_URL }, 500);
return false;
}
function cloudflarespeedtest_act_stop(){
XHR.get(STOP_URL, null, () => {
buttonStatus(false)
});
return false;
}
function buttonStatus(running){
document.getElementById('cloudflarespeedtest_start').style.display = running ? "none" : "block"
document.getElementById('cloudflarespeedtest_stop').style.display = running ? "block" : "none"
}
//]]></script>
<label class="cbi-value-title"><%= translate("Status") %></label>
<div class="cbi-value-field">
<p id="cloudflarespeedtest_status"><em><%:Collecting data...%></em></p>
</div>
<label class="cbi-value-title"><%= translate("Speed Test") %></label>
<div class="cbi-value-field">
<input id="cloudflarespeedtest_start" type="button" style="display:block;" class="btn cbi-button cbi-button-apply" value="<%= translate('TEST AND APPLY') %>" onclick="cloudflarespeedtest_act_start()" />
<input id="cloudflarespeedtest_stop" type="button" style="display:none;" class="btn cbi-button cbi-button-apply" value="<%= translate('STOP') %>" onclick="cloudflarespeedtest_act_stop()" />
</div>
<%+cbi/valuefooter%>

View File

@ -1,23 +0,0 @@
<%+cbi/valueheader%>
<input type="checkbox" id="checkbox1" checked><%:Auto refresh%></input>
<textarea id="logview" class="cbi-input-textarea" style="width: 100%" rows="30" readonly="readonly"></textarea>
<script type="text/javascript">
const LOG_URL = '<%=luci.dispatcher.build_url("admin", "services", "cloudflarespeedtest","getlog")%>';
function getlog(){
XHR.get(LOG_URL, null, function(x, data) {
logview.value = data.log;
if(document.getElementById("checkbox1").checked == true){
logview.scrollTop = logview.scrollHeight;
}
});
}
getlog()
setInterval(() => {
if(document.getElementById("checkbox1").checked == true){
getlog()
}
}, 2000);
</script>
<%+cbi/valuefooter%>

View File

@ -1 +0,0 @@
zh_Hans

View File

@ -1,221 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2022-02-10 20:44+0000\n"
"Last-Translator: mingxiaoyu <fengying0347@163.com>\n"
"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.8-dev\n"
msgid "<a href=\"https://github.com/mingxiaoyu/luci-app-cloudflarespeedtest\" target=\"_blank\">GitHub</a>"
msgstr "<a href=\"https://github.com/mingxiaoyu/luci-app-cloudflarespeedtest\" target=\"_blank\">GitHub项目地址</a>"
msgid "Cloudflare Speed Test"
msgstr "Cloudflare速度测试"
msgid "Base Setting"
msgstr "基本设置"
msgid "Logs"
msgstr "日志"
msgid "Enabled"
msgstr "启用"
msgid "Enabled scheduled task test Cloudflare IP"
msgstr "启用计划任务测试 Cloudflare IP"
msgid "Broadband speed"
msgstr "宽带速度"
msgid "Custome Url Enabled"
msgstr "启用自定义地址"
msgid "Custome Url"
msgstr "自定义地址"
msgid "Custome Cron Enabled"
msgstr "启用自定义Cron"
msgid "Custome Cron"
msgstr "自定义Cron"
msgid "Hour"
msgstr "小时"
msgid "Minute"
msgstr "分钟"
msgid "100M broadband download speed is about 12M/s. It is not recommended to fill in an excessively large value, and it may run all the time."
msgstr "100M的宽带下载大概为速度12M/s。不推荐填过大的值可能出现一直运行。"
msgid "Shadowsocksr Plus+ Enabled"
msgstr "启用ShadowSocksR Plus+"
msgid "Passwall Enabled"
msgstr "启用Passwall"
msgid "PassWall2 Enabled"
msgstr "启用PassWall2"
msgid "Bypass Enabled"
msgstr "启用Bypass"
msgid "Vssr Enabled"
msgstr "启用Vssr"
msgid "Shadowsocksr Servers"
msgstr "ShadowSocksR Plus+服务"
msgid "Passwall Servers"
msgstr "Passwall服务"
msgid "Passwall2 Servers"
msgstr "Passwall2服务"
msgid "Bypass Servers"
msgstr "Bypass服务"
msgid "Vssr Servers"
msgstr "Vssr服务"
msgid "Please select a service"
msgstr "请选择一项服务"
msgid "Speed Test"
msgstr "速度测试"
msgid "Best IP"
msgstr "最佳IP"
msgid "TEST AND APPLY"
msgstr "测试并应用"
msgid "STOP"
msgstr "停止"
msgid "Advanced"
msgstr "高级模式"
msgid "Thread"
msgid "线程数"
msgid "Average Latency Cap"
msgstr "平均延迟上限"
msgid "Average Latency Lower Bound"
msgstr "平均延迟下限"
msgid "IPv6 Enabled"
msgstr "启用IPv6"
msgid "Delayed speed measurement time"
msgstr "延迟测速次数"
msgid "Download speed test time"
msgstr "下载测速时间"
msgid "Number of download speed tests"
msgstr "下载测速数量"
msgid "Disable download speed test"
msgstr "禁用下载测速"
msgid "Port"
msgstr "端口"
msgid "Not recommended"
msgstr "不推荐"
msgid "Provides only one method, if IPv6 is enabled, IPv4 will not be tested"
msgstr "IPv4和IPv6只能选一个"
msgid "<a href=\"https://github.com/XIU2/CloudflareSpeedTest/issues/168\" target=\"_blank\">How to create</a>"
msgstr "<a href=\"https://github.com/XIU2/CloudflareSpeedTest/issues/168\" target=\"_blank\">如何创建</a>"
msgid "RUNNING"
msgstr "运行中"
msgid "NOT RUNNING"
msgstr "未运行"
msgid "Collecting data..."
msgstr "收集数据中..."
msgid "Third party applications settings"
msgstr "第三方应用设置"
msgid "Auto refresh"
msgstr "自动刷新"
msgid "Status"
msgstr "状态"
msgid "Proxy Mode"
msgstr "代理模式"
msgid "HOLD"
msgstr "保持"
msgid "GFW List"
msgid "GFW列表"
msgid "CLOSE"
msgstr "关闭"
msgid "during the speed testing, swith to which mode"
msgstr "在速度测试期间,切换到哪种模式"
msgid "DNS"
msgstr "DNS"
msgid "DNS Enabled"
msgstr "启用DNS"
msgid "DNS Type"
msgstr "DNS类型"
msgid "AliyuDNS"
msgstr "阿里云DNS"
msgid "Access Key ID"
msgstr "Access Key ID"
msgid "Access Key Secret"
msgstr "Access Key Secret"
msgid "Main Domain"
msgstr "主域名"
msgid "Sub Domain"
msgstr "子域名"
msgid "For example: test.github.com -> github.com"
msgstr "例如: test.github.com 则填: github.com"
msgid "For example: test.github.com -> test"
msgstr "例如: test.github.com, 则填: test"
msgid "Lines"
msgstr "解析线路"
msgid "default"
msgstr "默认"
msgid "telecom"
msgstr "电信"
msgid "unicom"
msgstr "联通"
msgid "mobile"
msgstr "移动"
msgid "HOST Enabled"
msgstr "启用HOST"
msgid "Domain"
msgstr "域名"

View File

@ -1,21 +0,0 @@
config global 'global'
option hour '5'
option minute '0'
option enabled '0'
option ipv6_enabled '0'
option advanced '0'
option tl '200'
option tll '40'
option custome_url 'https://speed.cloudflare.com/__down?bytes=300000000'
option threads '200'
option speed '100'
config servers 'servers'
option ssr_enabled '0'
option passwall_enabled '0'
option passwall2_enabled '0'
option bypass_enabled '0'
option vssr_enabled '0'
option DNS_enabled '0'

View File

@ -1,59 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
CRON_FILE=/etc/crontabs/root
service_triggers() {
procd_add_reload_trigger "cloudflarespeedtest"
}
add_cron(){
local enabled
config_get_bool enabled $1 enabled
del_cron
if [ $enabled = 1 ] ; then
local minute
local hour
local custome_cors_enabled
local custome_cron
config_get minute $1 minute
config_get hour $1 hour
config_get_bool custome_cors_enabled $1 custome_cors_enabled
config_get custome_cron $1 custome_cron
if [ $custome_cors_enabled = 1 ] ; then
echo "$custome_cron /usr/bin/cloudflarespeedtest/cloudflarespeedtest.sh start" >> $CRON_FILE
else
echo "$minute $hour * * * /usr/bin/cloudflarespeedtest/cloudflarespeedtest.sh start" >> $CRON_FILE
fi
crontab $CRON_FILE
fi
}
del_cron(){
sed -i '/cloudflarespeedtest/d' $CRON_FILE
/etc/init.d/cron restart
}
stop_instance(){
del_cron
}
stop_service() {
config_load cloudflarespeedtest
config_foreach stop_instance global
}
start_service() {
config_load cloudflarespeedtest
config_foreach add_cron global
}
reload_service() {
stop
start
}

View File

@ -1,81 +0,0 @@
#!/bin/sh
LOG_FILE='/var/log/cloudflarespeedtest.log'
echolog() {
local d="$(date "+%Y-%m-%d %H:%M:%S")"
echo -e "$d: $*" >>$LOG_FILE
}
urlencode() {
# urlencode url<string>
out=''
for c in $(echo -n $1 | sed 's/[^\n]/&\n/g'); do
case $c in
[a-zA-Z0-9._-]) out="$out$c" ;;
*) out="$out$(printf '%%%02X' "'$c")" ;;
esac
done
echo -n $out
}
send_request() {
# send_request action<string> args<string>
local args="AccessKeyId=$ak_id&Action=$1&Format=json&$2&Version=2015-01-09"
local hash=$(urlencode $(echo -n "GET&%2F&$(urlencode $args)" | openssl dgst -sha1 -hmac "$ak_sec&" -binary | openssl base64))
curl -sSL --connect-timeout 5 "http://alidns.aliyuncs.com/?$args&Signature=$hash"
}
get_recordid() {
sed 's/RR/\n/g' | sed -n 's/.*RecordId[^0-9]*\([0-9]*\).*/\1\n/p' | sort -ru | sed /^$/d
}
query_recordid() {
send_request "DescribeSubDomainRecords" "SignatureMethod=HMAC-SHA1&SignatureNonce=$timestamp&SignatureVersion=1.0&SubDomain=$sub_dm.$main_dm&Timestamp=$timestamp&Type=A"
}
update_record() {
send_request "UpdateDomainRecord" "Line=$line&RR=$sub_dm&RecordId=$1&SignatureMethod=HMAC-SHA1&SignatureNonce=$timestamp&SignatureVersion=1.0&Timestamp=$timestamp&Type=$type&Value=$ip"
}
add_record() {
send_request "AddDomainRecord&DomainName=$main_dm" "Line=$line&RR=$sub_dm&SignatureMethod=HMAC-SHA1&SignatureNonce=$timestamp&SignatureVersion=1.0&Timestamp=$timestamp&Type=$type&Value=$ip"
}
del_record() {
send_request "DeleteDomainRecord" "RecordId=$1&SignatureMethod=HMAC-SHA1&SignatureNonce=$timestamp&SignatureVersion=1.0&Timestamp=$timestamp"
}
aliddns() {
ak_id=$1
ak_sec=$2
main_dm=$3
sub_dm=$4
line=$5
isIpv6=$6
ip=$7
type=A
if [ $isIpv6 -eq "1" ] ;then
type=AAAA
fi
echo $ip
echo $type
rrid=`query_recordid | get_recordid`
if [ -z "$rrid" ]; then
rrid=`add_record | get_recordid`
echolog "ADD record $rrid"
else
update_record $rrid
echolog "UPDATE record $rrid"
fi
if [ -z "$rrid" ]; then
# failed
echolog "# ERROR, Please Check Config/Time"
fi
}
timestamp=$(date -u "+%Y-%m-%dT%H%%3A%M%%3A%SZ")
aliddns "$@"

View File

@ -1,314 +0,0 @@
#!/bin/sh
LOG_FILE='/var/log/cloudflarespeedtest.log'
IP_FILE='/usr/share/cloudflarespeedtestresult.txt'
IPV4_TXT='/usr/share/CloudflareSpeedTest/ip.txt'
IPV6_TXT='/usr/share/CloudflareSpeedTest/ipv6.txt'
function get_global_config(){
while [[ "$*" != "" ]]; do
eval ${1}='`uci get cloudflarespeedtest.global.$1`' 2>/dev/null
shift
done
}
function get_servers_config(){
while [[ "$*" != "" ]]; do
eval ${1}='`uci get cloudflarespeedtest.servers.$1`' 2>/dev/null
shift
done
}
echolog() {
local d="$(date "+%Y-%m-%d %H:%M:%S")"
echo -e "$d: $*"
echo -e "$d: $*" >>$LOG_FILE
}
function read_config(){
get_global_config "enabled" "speed" "custome_url" "threads" "custome_cors_enabled" "custome_cron" "t" "tp" "dt" "dn" "dd" "tl" "tll" "ipv6_enabled" "advanced" "proxy_mode"
get_servers_config "ssr_services" "ssr_enabled" "passwall_enabled" "passwall_services" "passwall2_enabled" "passwall2_services" "bypass_enabled" "bypass_services" "vssr_enabled" "vssr_services" "DNS_enabled" "HOST_enabled"
}
function appinit(){
ssr_started='';
passwall_started='';
passwall2_started='';
bypass_started='';
vssr_started='';
}
function speed_test(){
rm -rf $LOG_FILE
command="/usr/bin/cdnspeedtest -sl $((speed*125/1000)) -url ${custome_url} -o ${IP_FILE}"
if [ $ipv6_enabled -eq "1" ] ;then
command="${command} -f ${IPV6_TXT}"
else
command="${command} -f ${IPV4_TXT}"
fi
if [ $advanced -eq "1" ] ; then
command="${command} -tl ${tl} -tll ${tll} -n ${threads} -t ${t} -dt ${dt} -dn ${dn}"
if [ $dd -eq "1" ] ; then
command="${command} -dd"
fi
if [ $tp -ne "443" ] ; then
command="${command} -tp ${tp}"
fi
else
command="${command} -tl 200 -tll 40 -n 200 -t 4 -dt 10 -dn 1"
fi
appinit
ssr_original_server=$(uci get shadowsocksr.@global[0].global_server 2>/dev/null)
ssr_original_run_mode=$(uci get shadowsocksr.@global[0].run_mode 2>/dev/null)
if [ "x${ssr_original_server}" != "xnil" ] && [ "x${ssr_original_server}" != "x" ] ;then
if [ $proxy_mode == "close" ] ;then
uci set shadowsocksr.@global[0].global_server="nil"
elif [ $proxy_mode == "gfw" ] ;then
uci set shadowsocksr.@global[0].run_mode="gfw"
fi
ssr_started='1';
uci commit shadowsocksr
/etc/init.d/shadowsocksr restart
fi
passwall_server_enabled=$(uci get passwall.@global[0].enabled 2>/dev/null)
passwall_original_run_mode=$(uci get passwall.@global[0].tcp_proxy_mode 2>/dev/null)
if [ "x${passwall_server_enabled}" == "x1" ] ;then
if [ $proxy_mode == "close" ] ;then
uci set passwall.@global[0].enabled="0"
elif [ $proxy_mode == "gfw" ] ;then
uci set passwall.@global[0].tcp_proxy_mode="gfwlist"
fi
passwall_started='1';
uci commit passwall
/etc/init.d/passwall restart 2>/dev/null
fi
passwall2_server_enabled=$(uci get passwall2.@global[0].enabled 2>/dev/null)
passwall2_original_run_mode=$(uci get passwall2.@global[0].tcp_proxy_mode 2>/dev/null)
if [ "x${passwall2_server_enabled}" == "x1" ] ;then
if [ $proxy_mode == "close" ] ;then
uci set passwall2.@global[0].enabled="0"
elif [ $proxy_mode == "gfw" ] ;then
uci set passwall2.@global[0].tcp_proxy_mode="gfwlist"
fi
passwall2_started='1';
uci commit passwall2
/etc/init.d/passwall2 restart 2>/dev/null
fi
vssr_original_server=$(uci get vssr.@global[0].global_server 2>/dev/null)
vssr_original_run_mode=$(uci get vssr.@global[0].run_mode 2>/dev/null)
if [ "x${vssr_original_server}" != "xnil" ] && [ "x${vssr_original_server}" != "x" ] ;then
if [ $proxy_mode == "close" ] ;then
uci set vssr.@global[0].global_server="nil"
elif [ $proxy_mode == "gfw" ] ;then
uci set vssr.@global[0].run_mode="gfw"
fi
vssr_started='1';
uci commit vssr
/etc/init.d/vssr restart
fi
bypass_original_server=$(uci get bypass.@global[0].global_server 2>/dev/null)
bypass_original_run_mode=$(uci get bypass.@global[0].run_mode 2>/dev/null)
if [ "x${bypass_original_server}" != "x" ] ;then
if [ $proxy_mode == "close" ] ;then
uci set bypass.@global[0].global_server=""
elif [ $proxy_mode == "gfw" ] ;then
uci set bypass.@global[0].run_mode="gfw"
fi
bypass_started='1';
uci commit bypass
/etc/init.d/bypass restart
fi
echo $command >> $LOG_FILE 2>&1
echolog "-----------start----------"
$command >> $LOG_FILE 2>&1
echolog "-----------end------------"
}
function ip_replace(){
# 获取最快 IP从 result.csv 结果文件中获取第一个 IP
bestip=$(sed -n "2,1p" $IP_FILE | awk -F, '{print $1}')
if [[ -z "${bestip}" ]]; then
echolog "CloudflareST 测速结果 IP 数量为 0,跳过下面步骤..."
else
alidns_ip
ssr_best_ip
vssr_best_ip
bypass_best_ip
passwall_best_ip
passwall2_best_ip
restart_app
host_ip
fi
}
function passwall_best_ip(){
if [ "x${passwall_enabled}" == "x1" ] ;then
echolog "设置passwall IP"
for ssrname in $passwall_services
do
echo $ssrname
uci set passwall.$ssrname.address="${bestip}"
done
uci commit passwall
fi
}
function passwall2_best_ip(){
if [ "x${passwall2_enabled}" == "x1" ] ;then
echolog "设置passwall2 IP"
for ssrname in $passwall2_services
do
echo $ssrname
uci set passwall2.$ssrname.address="${bestip}"
done
uci commit passwall2
fi
}
function ssr_best_ip(){
if [ "x${ssr_enabled}" == "x1" ] ;then
echolog "设置ssr IP"
for ssrname in $ssr_services
do
echo $ssrname
uci set shadowsocksr.$ssrname.server="${bestip}"
uci set shadowsocksr.$ssrname.ip="${bestip}"
done
uci commit shadowsocksr
fi
}
function vssr_best_ip(){
if [ "x${vssr_enabled}" == "x1" ] ;then
echolog "设置Vssr IP"
for ssrname in $vssr_services
do
echo $ssrname
uci set vssr.$ssrname.server="${bestip}"
done
uci commit vssr
fi
}
function bypass_best_ip(){
if [ "x${bypass_enabled}" == "x1" ] ;then
echolog "设置Bypass IP"
for ssrname in $bypass_services
do
echo $ssrname
uci set bypass.$ssrname.server="${bestip}"
done
uci commit bypass
fi
}
function restart_app(){
if [ "x${ssr_started}" == "x1" ] ;then
if [ $proxy_mode == "close" ] ;then
uci set shadowsocksr.@global[0].global_server="${ssr_original_server}"
elif [ $proxy_mode == "gfw" ] ;then
uci set shadowsocksr.@global[0].run_mode="${ssr_original_run_mode}"
fi
uci commit shadowsocksr
/etc/init.d/shadowsocksr restart &>/dev/null
echolog "ssr重启完成"
fi
if [ "x${passwall_started}" == "x1" ] ;then
if [ $proxy_mode == "close" ] ;then
uci set passwall.@global[0].enabled="${passwall_server_enabled}"
elif [ $proxy_mode == "gfw" ] ;then
uci set passwall.@global[0].tcp_proxy_mode="${passwall_original_run_mode}"
fi
uci commit passwall
/etc/init.d/passwall restart 2>/dev/null
echolog "passwall重启完成"
fi
if [ "x${passwall2_started}" == "x1" ] ;then
if [ $proxy_mode == "close" ] ;then
uci set passwall2.@global[0].enabled="${passwall2_server_enabled}"
elif [ $proxy_mode == "gfw" ] ;then
uci set passwall2.@global[0].tcp_proxy_mode="${passwall2_original_run_mode}"
fi
uci commit passwall2
/etc/init.d/passwall2 restart 2>/dev/null
echolog "passwall2重启完成"
fi
if [ "x${vssr_started}" == "x1" ] ;then
if [ $proxy_mode == "close" ] ;then
uci set vssr.@global[0].global_server="${vssr_original_server}"
elif [ $proxy_mode == "gfw" ] ;then
uci set vssr.@global[0].run_mode="${vssr_original_run_mode}"
fi
uci commit vssr
/etc/init.d/vssr restart &>/dev/null
echolog "Vssr重启完成"
fi
if [ "x${bypass_started}" == "x1" ] ;then
if [ $proxy_mode == "close" ] ;then
uci set bypass.@global[0].global_server="${bypass_original_server}"
elif [ $proxy_mode == "gfw" ] ;then
uci set bypass.@global[0].run_mode="${bypass_original_run_mode}"
fi
uci commit bypass
/etc/init.d/bypass restart &>/dev/null
echolog "Bypass重启完成"
fi
}
function alidns_ip(){
if [ "x${DNS_enabled}" == "x1" ] ;then
get_servers_config "DNS_type" "app_key" "app_secret" "main_domain" "sub_domain" "line"
if [ $DNS_type == "aliyu" ] ;then
for sub in $sub_domain
do
/usr/bin/cloudflarespeedtest/aliddns.sh $app_key $app_secret $main_domain $sub $line $ipv6_enabled $bestip
echolog "更新域名${sub}阿里云DNS完成"
sleep 1s
done
fi
echo "aliyun done"
fi
}
function host_ip() {
if [ "x${HOST_enabled}" == "x1" ] ;then
get_servers_config "host_domain"
HOSTS_LINE="$bestip $host_domain"
if [ -n "$(grep $host_domain /etc/hosts)" ]
then
sed -i".bak" "/$host_domain/d" /etc/hosts
echo $HOSTS_LINE >> /etc/hosts;
else
echo $HOSTS_LINE >> /etc/hosts;
fi
/etc/init.d/dnsmasq reload &>/dev/null
echolog "HOST 完成"
fi
}
read_config
# 启动参数
if [ "$1" ] ;then
[ $1 == "start" ] && speed_test && ip_replace
[ $1 == "test" ] && speed_test
[ $1 == "replace" ] && ip_replace
exit
fi

View File

@ -1,11 +0,0 @@
{
"luci-app-cloudflarespeedtest": {
"description": "Grant UCI access for luci-app-cloudflarespeedtest",
"read": {
"uci": [ "cloudflarespeedtest" ]
},
"write": {
"uci": [ "cloudflarespeedtest" ]
}
}
}

View File

@ -1,19 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-mosdns
PKG_VERSION:=1.4.4
PKG_RELEASE:=2
LUCI_TITLE:=LuCI Support for mosdns
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+mosdns +jsonfilter +luci-compat +curl +v2ray-geoip +v2ray-geosite
define Package/$(PKG_NAME)/conffiles
/etc/config/mosdns
/etc/mosdns/config_custom.yaml
/etc/mosdns/rule
endef
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,42 +0,0 @@
module("luci.controller.mosdns", package.seeall)
function index()
if not nixio.fs.access("/etc/config/mosdns") then
return
end
local page = entry({"admin", "services", "mosdns"}, alias("admin", "services", "mosdns", "basic"), _("MosDNS"), 30)
page.dependent = true
page.acl_depends = { "luci-app-mosdns" }
entry({"admin", "services", "mosdns", "basic"}, cbi("mosdns/basic"), _("Basic Setting"), 1).leaf = true
entry({"admin", "services", "mosdns", "rule_list"}, cbi("mosdns/rule_list"), _("Rule List"), 2).leaf = true
entry({"admin", "services", "mosdns", "update"}, cbi("mosdns/update"), _("Geodata Update"), 3).leaf = true
entry({"admin", "services", "mosdns", "log"}, cbi("mosdns/log"), _("Logs"), 4).leaf = true
entry({"admin", "services", "mosdns", "status"}, call("act_status")).leaf = true
entry({"admin", "services", "mosdns", "get_log"}, call("get_log")).leaf = true
entry({"admin", "services", "mosdns", "clear_log"}, call("clear_log")).leaf = true
entry({"admin", "services", "mosdns", "geo_update"}, call("geo_update")).leaf = true
end
function act_status()
local e = {}
e.running = luci.sys.call("pgrep -f mosdns >/dev/null") == 0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
function get_log()
luci.http.write(luci.sys.exec("cat $(/usr/share/mosdns/mosdns.sh logfile)"))
end
function clear_log()
luci.sys.call("cat /dev/null > $(/usr/share/mosdns/mosdns.sh logfile)")
end
function geo_update()
local e = {}
e.updating = luci.sys.call("/usr/share/mosdns/mosdns.sh geodata >/dev/null") == 0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -1,136 +0,0 @@
m = Map("mosdns")
m.title = translate("MosDNS")
m.description = translate("MosDNS is a 'programmable' DNS forwarder.")
m:section(SimpleSection).template = "mosdns/mosdns_status"
s = m:section(TypedSection, "mosdns")
s.addremove = false
s.anonymous = true
enable = s:option(Flag, "enabled", translate("Enable"))
enable.rmempty = false
configfile = s:option(ListValue, "configfile", translate("Config File"))
configfile:value("/etc/mosdns/config.yaml", translate("Default Config"))
configfile:value("/etc/mosdns/config_custom.yaml", translate("Custom Config"))
configfile.default = "/etc/mosdns/config.yaml"
listenport = s:option(Value, "listen_port", translate("Listen port"))
listenport.datatype = "and(port,min(1))"
listenport.default = 5335
listenport:depends( "configfile", "/etc/mosdns/config.yaml")
loglevel = s:option(ListValue, "log_level", translate("Log Level"))
loglevel:value("debug", translate("Debug"))
loglevel:value("info", translate("Info"))
loglevel:value("warn", translate("Warning"))
loglevel:value("error", translate("Error"))
loglevel.default = "info"
loglevel:depends( "configfile", "/etc/mosdns/config.yaml")
logfile = s:option(Value, "logfile", translate("Log File"))
logfile.placeholder = "/tmp/mosdns.log"
logfile.default = "/tmp/mosdns.log"
logfile:depends( "configfile", "/etc/mosdns/config.yaml")
redirect = s:option(Flag, "redirect", translate("DNS Forward"), translate("Forward Dnsmasq Domain Name resolution requests to MosDNS"))
redirect.default = true
custom_local_dns = s:option(Flag, "custom_local_dns", translate("Local DNS"), translate("Follow WAN interface DNS if not enabled"))
custom_local_dns:depends( "configfile", "/etc/mosdns/config.yaml")
custom_local_dns.default = false
custom_local_dns = s:option(DynamicList, "local_dns", translate("Upstream DNS servers"))
custom_local_dns:value("119.29.29.29", "119.29.29.29 (DNSPod Primary)")
custom_local_dns:value("119.28.28.28", "119.28.28.28 (DNSPod Secondary)")
custom_local_dns:value("223.5.5.5", "223.5.5.5 (AliDNS Primary)")
custom_local_dns:value("223.6.6.6", "223.6.6.6 (AliDNS Secondary)")
custom_local_dns:value("114.114.114.114", "114.114.114.114 (114DNS Primary)")
custom_local_dns:value("114.114.115.115", "114.114.115.115 (114DNS Secondary)")
custom_local_dns:value("180.76.76.76", "180.76.76.76 (Baidu DNS)")
custom_local_dns:depends("custom_local_dns", "1")
custom_local_dns = s:option(ListValue, "bootstrap_dns", translate("Bootstrap DNS servers"), translate("Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams"))
custom_local_dns:value("119.29.29.29", "119.29.29.29 (DNSPod Primary)")
custom_local_dns:value("119.28.28.28", "119.28.28.28 (DNSPod Secondary)")
custom_local_dns:value("223.5.5.5", "223.5.5.5 (AliDNS Primary)")
custom_local_dns:value("223.6.6.6", "223.6.6.6 (AliDNS Secondary)")
custom_local_dns:value("114.114.114.114", "114.114.114.114 (114DNS Primary)")
custom_local_dns:value("114.114.115.115", "114.114.115.115 (114DNS Secondary)")
custom_local_dns:value("180.76.76.76", "180.76.76.76 (Baidu DNS)")
custom_local_dns.default = "119.29.29.29"
custom_local_dns:depends("custom_local_dns", "1")
remote_dns = s:option(DynamicList, "remote_dns", translate("Remote DNS"))
remote_dns:value("tls://1.1.1.1", "1.1.1.1 (CloudFlare DNS)")
remote_dns:value("tls://1.0.0.1", "1.0.0.1 (CloudFlare DNS)")
remote_dns:value("tls://8.8.8.8", "8.8.8.8 (Google DNS)")
remote_dns:value("tls://8.8.4.4", "8.8.4.4 (Google DNS)")
remote_dns:value("tls://9.9.9.9", "9.9.9.9 (Quad9 DNS)")
remote_dns:value("tls://149.112.112.112", "149.112.112.112 (Quad9 DNS)")
remote_dns:value("tls://45.11.45.11", "45.11.45.11 (DNS.SB)")
remote_dns:value("tls://208.67.222.222", "208.67.222.222 (Open DNS)")
remote_dns:value("tls://208.67.220.220", "208.67.220.220 (Open DNS)")
remote_dns:depends( "configfile", "/etc/mosdns/config.yaml")
remote_dns_pipeline = s:option(Flag, "enable_pipeline", translate("Remote DNS Connection Multiplexing"), translate("Enable TCP/DoT RFC 7766 new Query Pipelining connection multiplexing mode"))
remote_dns_pipeline.rmempty = false
remote_dns_pipeline.default = false
remote_dns_pipeline:depends( "configfile", "/etc/mosdns/config.yaml")
cache_size = s:option(Value, "cache_size", translate("DNS Cache Size"))
cache_size.datatype = "and(uinteger,min(0))"
cache_size.default = "200000"
cache_size:depends( "configfile", "/etc/mosdns/config.yaml")
cache_size = s:option(Value, "cache_survival_time", translate("Cache Survival Time"))
cache_size.datatype = "and(uinteger,min(0))"
cache_size.default = "259200"
cache_size:depends( "configfile", "/etc/mosdns/config.yaml")
minimal_ttl = s:option(Value, "minimal_ttl", translate("Minimum TTL"))
minimal_ttl.datatype = "and(uinteger,min(0))"
minimal_ttl.datatype = "and(uinteger,max(3600))"
minimal_ttl.default = "0"
minimal_ttl:depends( "configfile", "/etc/mosdns/config.yaml")
maximum_ttl = s:option(Value, "maximum_ttl", translate("Maximum TTL"))
maximum_ttl.datatype = "and(uinteger,min(0))"
maximum_ttl.default = "0"
maximum_ttl:depends( "configfile", "/etc/mosdns/config.yaml")
adblock = s:option(Flag, "adblock", translate("Enable DNS ADblock"))
adblock:depends( "configfile", "/etc/mosdns/config.yaml")
adblock.default = false
adblock = s:option(Value, "ad_source", translate("ADblock Source"))
adblock:depends("adblock", "1")
adblock.default = "https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt"
adblock:value("geosite.dat", "v2ray-geosite")
adblock:value("https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt", "anti-AD")
adblock:value("https://raw.githubusercontent.com/sjhgvr/oisd/main/dbl_basic.txt", "oisd (basic)")
adblock:value("https://raw.githubusercontent.com/QiuSimons/openwrt-mos/master/dat/serverlist.txt", "QiuSimons/openwrt-mos")
reload_service = s:option( Button, "_reload", translate("Reload Service"), translate("Reload service to take effect of new configuration"))
reload_service.write = function()
luci.sys.exec("/etc/init.d/mosdns reload")
end
reload_service:depends( "configfile", "/etc/mosdns/config_custom.yaml")
config = s:option(TextValue, "manual-config")
config.description = translate("<font color=\"ff0000\"><strong>View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need.</strong></font>")
config.template = "cbi/tvalue"
config.rows = 25
config:depends( "configfile", "/etc/mosdns/config_custom.yaml")
function config.cfgvalue(self, section)
return nixio.fs.readfile("/etc/mosdns/config_custom.yaml")
end
function config.write(self, section, value)
value = value:gsub("\r\n?", "\n")
nixio.fs.writefile("/etc/mosdns/config_custom.yaml", value)
end
return m

View File

@ -1,5 +0,0 @@
m = Map("mosdns")
m:append(Template("mosdns/mosdns_log"))
return m

View File

@ -1,87 +0,0 @@
local datatypes = require "luci.cbi.datatypes"
local white_list_file = "/etc/mosdns/rule/whitelist.txt"
local block_list_file = "/etc/mosdns/rule/blocklist.txt"
local grey_list_file = "/etc/mosdns/rule/greylist.txt"
local hosts_list_file = "/etc/mosdns/rule/hosts.txt"
local redirect_list_file = "/etc/mosdns/rule/redirect.txt"
local local_ptr_file = "/etc/mosdns/rule/local-ptr.txt"
m = Map("mosdns")
s = m:section(TypedSection, "mosdns", translate("Rule Settings"))
s.anonymous = true
s:tab("white_list", translate("White Lists"))
s:tab("block_list", translate("Block Lists"))
s:tab("grey_list", translate("Grey Lists"))
s:tab("hosts_list", translate("Hosts"))
s:tab("redirect_list", translate("Redirect"))
s:tab("local_ptr_list", translate("Block PTR"))
o = s:taboption("white_list", TextValue, "whitelist", "", "<font color='red'>" .. translate("These domain names allow DNS resolution with the highest priority. Please input the domain names of websites, every line can input only one website domain. For example: hm.baidu.com.") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Default Config' profiles.") .. "</font>")
o.rows = 15
o.wrap = "off"
o.cfgvalue = function(self, section) return nixio.fs.readfile(white_list_file) or "" end
o.write = function(self, section, value) nixio.fs.writefile(white_list_file , value:gsub("\r\n", "\n")) end
o.remove = function(self, section, value) nixio.fs.writefile(white_list_file , "") end
o.validate = function(self, value)
return value
end
o = s:taboption("block_list", TextValue, "blocklist", "", "<font color='red'>" .. translate("These domains are blocked from DNS resolution. Please input the domain names of websites, every line can input only one website domain. For example: baidu.com.") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Default Config' profiles.") .. "</font>")
o.rows = 15
o.wrap = "off"
o.cfgvalue = function(self, section) return nixio.fs.readfile(block_list_file) or "" end
o.write = function(self, section, value) nixio.fs.writefile(block_list_file, value:gsub("\r\n", "\n")) end
o.remove = function(self, section, value) nixio.fs.writefile(block_list_file, "") end
o.validate = function(self, value)
return value
end
o = s:taboption("grey_list", TextValue, "greylist", "", "<font color='red'>" .. translate("These domains are always resolved using remote DNS. Please input the domain names of websites, every line can input only one website domain. For example: google.com.") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Default Config' profiles.") .. "</font>")
o.rows = 15
o.wrap = "off"
o.cfgvalue = function(self, section) return nixio.fs.readfile(grey_list_file) or "" end
o.write = function(self, section, value) nixio.fs.writefile(grey_list_file, value:gsub("\r\n", "\n")) end
o.remove = function(self, section, value) nixio.fs.writefile(grey_list_file, "") end
o.validate = function(self, value)
return value
end
o = s:taboption("hosts_list", TextValue, "hosts", "", "<font color='red'>" .. translate("Hosts For example: baidu.com 10.0.0.1") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Default Config' profiles.") .. "</font>")
o.rows = 15
o.wrap = "off"
o.cfgvalue = function(self, section) return nixio.fs.readfile(hosts_list_file) or "" end
o.write = function(self, section, value) nixio.fs.writefile(hosts_list_file, value:gsub("\r\n", "\n")) end
o.remove = function(self, section, value) nixio.fs.writefile(hosts_list_file, "") end
o.validate = function(self, value)
return value
end
o = s:taboption("redirect_list", TextValue, "redirect", "", "<font color='red'>" .. translate("The domain name to redirect the request to. Requests domain A, but returns records for domain B. example: a.com b.com") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Default Config' profiles.") .. "</font>")
o.rows = 15
o.wrap = "off"
o.cfgvalue = function(self, section) return nixio.fs.readfile(redirect_list_file) or "" end
o.write = function(self, section, value) nixio.fs.writefile(redirect_list_file, value:gsub("\r\n", "\n")) end
o.remove = function(self, section, value) nixio.fs.writefile(redirect_list_file, "") end
o.validate = function(self, value)
return value
end
o = s:taboption("local_ptr_list", TextValue, "local_ptr", "", "<font color='red'>" .. translate("These domains are blocked from PTR requests") .. "</font>" .. "<font color='#00bd3e'>" .. translate("<br>The list of rules only apply to 'Default Config' profiles.") .. "</font>")
o.rows = 15
o.wrap = "off"
o.cfgvalue = function(self, section) return nixio.fs.readfile(local_ptr_file) or "" end
o.write = function(self, section, value) nixio.fs.writefile(local_ptr_file, value:gsub("\r\n", "\n")) end
o.remove = function(self, section, value) nixio.fs.writefile(local_ptr_file, "") end
o.validate = function(self, value)
return value
end
local apply = luci.http.formvalue("cbi.apply")
if apply then
luci.sys.exec("/etc/init.d/mosdns reload")
end
return m

View File

@ -1,31 +0,0 @@
m = Map("mosdns")
s = m:section(TypedSection, "mosdns", translate("Update GeoIP & GeoSite dat"))
s.addremove = false
s.anonymous = true
enable = s:option(Flag, "geo_auto_update", translate("Enable Auto Database Update"))
enable.rmempty = false
o = s:option(ListValue, "geo_update_week_time", translate("Update Cycle"))
o:value("*", translate("Every Day"))
o:value("1", translate("Every Monday"))
o:value("2", translate("Every Tuesday"))
o:value("3", translate("Every Wednesday"))
o:value("4", translate("Every Thursday"))
o:value("5", translate("Every Friday"))
o:value("6", translate("Every Saturday"))
o:value("7", translate("Every Sunday"))
o.default = "*"
update_time = s:option(ListValue, "geo_update_day_time", translate("Update Time"))
for t = 0, 23 do
update_time:value(t, t..":00")
end
update_time.default = 0
data_update = s:option(Button, "geo_update_database", translate("Database Update"))
data_update.rawhtml = true
data_update.template = "mosdns/geo_update"
return m

View File

@ -1,34 +0,0 @@
<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
function update_data(btn, dataname)
{
btn.disabled = true;
btn.value = '<%:Updating...%> ';
st=dataname;
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "mosdns", "geo_update")%>',
{ set:st },
function(x,data)
{
var tb = document.getElementById(dataname+'-status');
if (tb)
{
switch (data.updating)
{
case true:
tb.innerHTML = "<font color='green'>" + "<%:Update success%>" + "</font>";
break;
case false:
tb.innerHTML = "<font color='red'>" + "<%:Update failed, Please check the network status%>" + "</font>";
break;
}
}
btn.disabled = false;
btn.value = '<%:Check And Update%>';
}
);
return false;
}
//]]></script>
<input type="button" class="btn cbi-button cbi-button-reload" value="<%:Check And Update%>" onclick="return update_data(this,'<%=self.option%>')" />
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
<%+cbi/valuefooter%>

View File

@ -1,29 +0,0 @@
<script type="text/javascript">
//<![CDATA[
function clear_log(btn) {
XHR.get('<%=url([[admin]], [[services]], [[mosdns]], [[clear_log]])%>', null,
function(x, data) {
if(x && x.status == 200) {
var log_textarea = document.getElementById('log_textarea');
log_textarea.innerHTML = "";
log_textarea.scrollTop = log_textarea.scrollHeight;
}
location.reload();
}
);
}
XHR.poll(1, '<%=url([[admin]], [[services]], [[mosdns]], [[get_log]])%>', null,
function(x, data) {
if(x && x.status == 200) {
var log_textarea = document.getElementById('log_textarea');
log_textarea.innerHTML = x.responseText;
log_textarea.scrollTop = log_textarea.scrollHeight;
}
}
);
//]]>
</script>
<fieldset class="cbi-section" id="_log_fieldset">
<input class="cbi-button cbi-input-remove" type="button" onclick="clear_log()" value="<%:Clear logs%>" style="margin-left: 10px; margin-top: 10px;">
<textarea id="log_textarea" class="cbi-input-textarea" style="width: calc(100% - 20px); height: 600px; margin: 10px;" data-update="change" rows="5" wrap="off" readonly="readonly"></textarea>
</fieldset>

View File

@ -1,28 +0,0 @@
<script type="text/javascript">
//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[services]], [[mosdns]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('mosdns_status');
if (data && tb) {
if (data.running) {
var links = '<em><b style=color:green>MosDNS <%:RUNNING%></b></em>';
tb.innerHTML = links;
} else {
tb.innerHTML = '<em><b style=color:red>MosDNS <%:NOT RUNNING%></b></em>';
}
}
}
);
//]]>
</script>
<style>
.mar-10 {
margin-left: 50px;
margin-right: 10px;
}
</style>
<fieldset class="cbi-section">
<p id="mosdns_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>

View File

@ -1,194 +0,0 @@
msgid "Basic Setting"
msgstr "基本设置"
msgid "MosDNS is a 'programmable' DNS forwarder."
msgstr "MosDNS 是一个插件化的 DNS 转发/分流器。"
msgid "RUNNING"
msgstr "运行中"
msgid "NOT RUNNING"
msgstr "未运行"
msgid "Collecting data..."
msgstr "获取数据中..."
msgid "Enable"
msgstr "启用"
msgid "Listen port"
msgstr "监听端口"
msgid "Log Level"
msgstr "日志等级"
msgid "DNS Forward"
msgstr "DNS 转发"
msgid "Forward Dnsmasq Domain Name resolution requests to MosDNS"
msgstr "将 Dnsmasq 域名解析请求转发到 MosDNS 服务器"
msgid "Enable DNS ADblock"
msgstr "启用 DNS 广告过滤"
msgid "ADblock Source"
msgstr "广告过滤来源"
msgid "Reload Service"
msgstr "重载服务"
msgid "Reload service to take effect of new configuration"
msgstr "重载 MosDNS 服务生效配置文件"
msgid "<font color=\"ff0000\"><strong>View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need.</strong></font>"
msgstr "<font color=\"ff0000\"><strong>注意!此页的更改仅当配置文件为 “自定义” 时才会生效</strong></font>"
msgid "Geodata Update"
msgstr "更新数据库"
msgid "Update GeoIP & GeoSite dat"
msgstr "更新 GeoIP & GeoSite 数据库"
msgid "Update Time"
msgstr "更新时间"
msgid "Update Cycle"
msgstr "更新周期"
msgid "Every Day"
msgstr "每天"
msgid "Every Monday"
msgstr "每周一"
msgid "Every Tuesday"
msgstr "每周二"
msgid "Every Wednesday"
msgstr "每周三"
msgid "Every Thursday"
msgstr "每周四"
msgid "Every Friday"
msgstr "每周五"
msgid "Every Saturday"
msgstr "每周六"
msgid "Every Sunday"
msgstr "每周日"
msgid "Database Update"
msgstr "数据库更新"
msgid "Check And Update"
msgstr "检查并更新"
msgid "Enable Auto Database Update"
msgstr "启用自动更新"
msgid "Updating..."
msgstr "正在更新..."
msgid "Update success"
msgstr "更新成功"
msgid "Update failed, Please check the network status"
msgstr "更新失败,请检查网络状态"
msgid "Config File"
msgstr "配置文件"
msgid "Default Config"
msgstr "内置预设"
msgid "Custom Config"
msgstr "自定义"
msgid "Log File"
msgstr "日志文件"
msgid "Local DNS"
msgstr "本地 DNS"
msgid "Follow WAN interface DNS if not enabled"
msgstr "不启用则遵循 WAN 接口 DNS"
msgid "Upstream DNS servers"
msgstr "上游 DNS 服务器"
msgid "Bootstrap DNS servers"
msgstr "Bootstrap DNS 服务器"
msgid "Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams"
msgstr "Bootstrap DNS 服务器用于解析所指定为上游的 DoH / DoT 解析器的 IP 地址"
msgid "Remote DNS"
msgstr "远程 DNS"
msgid "Remote DNS Connection Multiplexing"
msgstr "远程 DNS 连接复用"
msgid "Enable TCP/DoT RFC 7766 new Query Pipelining connection multiplexing mode"
msgstr "启用 TCP/DoT RFC 7766 新型 Query Pipelining 连接复用模式"
msgid "DNS Cache Size"
msgstr "DNS 缓存大小(条)"
msgid "Cache Survival Time"
msgstr "缓存生存时间(秒)"
msgid "Minimum TTL"
msgstr "覆盖最小 TTL 值(默认 0"
msgid "Maximum TTL"
msgstr "覆盖最大 TTL 值(默认 0"
msgid "Logs"
msgstr "日志"
msgid "Clear logs"
msgstr "清空日志"
msgid "Rule List"
msgstr "规则列表"
msgid "Rule Settings"
msgstr "自定义规则列表"
msgid "<br>The list of rules only apply to 'Default Config' profiles."
msgstr "<br>规则列表仅适用于 “内置预设” 配置文件"
msgid "White Lists"
msgstr "白名单"
msgid "These domain names allow DNS resolution with the highest priority. Please input the domain names of websites, every line can input only one website domain. For example: hm.baidu.com."
msgstr "加入的域名始终允许使用 “本地 DNS” 进行解析,且优先级最高(每个域名一行,支持域名匹配规则)"
msgid "Block Lists"
msgstr "黑名单"
msgid "These domains are blocked from DNS resolution. Please input the domain names of websites, every line can input only one website domain. For example: baidu.com."
msgstr "加入的域名将屏蔽 DNS 解析(每个域名一行,支持域名匹配规则)"
msgid "Grey Lists"
msgstr "灰名单"
msgid "These domains are always resolved using remote DNS. Please input the domain names of websites, every line can input only one website domain. For example: google.com."
msgstr "加入的域名始终使用 “远程 DNS” 进行解析(每个域名一行,支持域名匹配规则)"
msgid "Hosts For example: baidu.com 10.0.0.1"
msgstr "自定义 Hosts 重写baidu.com 10.0.0.1(每个规则一行)"
msgid "Redirect"
msgstr "重定向"
msgid "The domain name to redirect the request to. Requests domain A, but returns records for domain B. example: a.com b.com"
msgstr "重定向请求的域名。请求域名 A但返回域名 B 的记录baidu.com qq.com每个规则一行"
msgid "Block PTR"
msgstr "PTR 黑名单"
msgid "These domains are blocked from PTR requests"
msgstr "加入的域名将阻止 PTR 请求(每个域名一行,支持域名匹配规则)"

View File

@ -1 +0,0 @@
zh-cn

View File

@ -1,21 +0,0 @@
config mosdns 'config'
option enabled '0'
option listen_port '5335'
option geo_auto_update '0'
option geo_update_week_time '*'
option geo_update_day_time '2'
option redirect '1'
option adblock '0'
option configfile '/etc/mosdns/config.yaml'
option log_level 'info'
option logfile '/tmp/mosdns.log'
option cache_size '200000'
option cache_survival_time '259200'
option minimal_ttl '0'
option maximum_ttl '0'
option custom_local_dns '0'
option enable_pipeline '0'
list remote_dns 'tls://8.8.8.8'
list remote_dns 'tls://1.1.1.1'

View File

@ -1,2 +0,0 @@
#!/bin/sh
[ "$ACTION" = ifup ] && /etc/init.d/mosdns restart

View File

@ -1,157 +0,0 @@
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2020-2022, IrineSistiana
#
# This file is part of mosdns.
#
# mosdns is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# mosdns is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
START=99
USE_PROCD=1
PROG=/usr/bin/mosdns
CONF=$(uci -q get mosdns.config.configfile)
CRON_FILE=/etc/crontabs/root
get_config() {
config_get enabled $1 enabled 0
config_get adblock $1 adblock 0
config_get ad_source $1 ad_source ""
config_get cache_size $1 cache_size 200000
config_get cache_survival_time $1 cache_survival_time 259200
config_get enable_pipeline $1 enable_pipeline 0
config_get geo_auto_update $1 geo_auto_update 0
config_get geo_update_day_time $1 geo_update_day_time 2
config_get geo_update_week_time $1 geo_update_week_time "*"
config_get listen_port $1 listen_port 5335
config_get log_file $1 logfile "/tmp/mosdns.log"
config_get log_level $1 log_level "info"
config_get maximum_ttl_custom $1 maximum_ttl 0
config_get minimal_ttl_custom $1 minimal_ttl 0
config_get redirect $1 redirect 0
config_get remote_dns $1 remote_dns "tls://8.8.8.8 tls://1.1.1.1"
config_get custom_local_dns $1 custom_local_dns 0
config_get bootstrap_dns $1 bootstrap_dns "119.29.29.29"
}
init_yaml() {
tmpdir=$(mktemp -d) || exit 1
adlist=$(/usr/share/mosdns/mosdns.sh ad)
[ $enable_pipeline = 1 ] && enable_pipeline=true || enable_pipeline=false
local_dns=$(/usr/share/mosdns/mosdns.sh dns | xargs -n1 echo " - addr:")
remote_dns=$(echo $remote_dns | awk '{for(i=1;i<=NF;i++)printf "%s- addr: %s\n%s enable_pipeline: '${enable_pipeline}'\n",s,$i,s}' s=' ')
sed "s,log_level,$log_level,g;s,log_file,$log_file,g; \
s,listen_port,$listen_port,g;s,cache_size,$cache_size,g; \
s,cache_survival_time,$cache_survival_time,g; \
s,minimal_ttl_custom,$minimal_ttl_custom,g; \
s,maximum_ttl_custom,$maximum_ttl_custom,g; \
s,adblock,$adlist,g;s,remote_dns_pipeline,$enable_pipeline,g" \
/usr/share/mosdns/default.yaml > $CONF
[ "$custom_local_dns" -eq 0 ] && sed -i "/bootstrap/d" $CONF || \
sed -i "s,bootstrap_dns,$bootstrap_dns,g" $CONF
echo "${local_dns}" > $tmpdir/local_dns.txt
echo "${remote_dns}" > $tmpdir/remote_dns.txt
sed -i -e '/- addr: local_dns/{r '$tmpdir/local_dns.txt -e';d};/- addr: remote_dns/{r '$tmpdir/remote_dns.txt -e';d}' \
$CONF
rm -rf $tmpdir
}
service_triggers() {
procd_add_reload_trigger "mosdns"
}
restore_setting() {
rm -f /etc/mosdns/redirect.lock
sed -i "/list server/d" /etc/config/dhcp
uci set dhcp.@dnsmasq[0].noresolv='0'
uci del dhcp.@dnsmasq[0].cachesize
uci commit dhcp
}
redirect_setting() {
if [ "${CONF}" = "/etc/mosdns/config.yaml" ]; then
sed -i "/list server/d" /etc/config/dhcp
uci add_list dhcp.@dnsmasq[0].server="127.0.0.1#$listen_port"
uci set dhcp.@dnsmasq[0].rebind_protection='0'
uci set dhcp.@dnsmasq[0].noresolv="1"
uci set dhcp.@dnsmasq[0].cachesize='0'
uci commit dhcp
else
sed -i "/list server/d" /etc/config/dhcp
uci add_list dhcp.@dnsmasq[0].server="127.0.0.1#$(cat /etc/mosdns/config_custom.yaml | awk -F'[:" ]+' '/^\s+addr:/{for(i=1;i<=NF;i++){if($i~/^[0-9]+$/){print $i;exit}}}')"
uci set dhcp.@dnsmasq[0].rebind_protection='0'
uci set dhcp.@dnsmasq[0].noresolv="1"
uci set dhcp.@dnsmasq[0].cachesize='0'
uci commit dhcp
fi
touch /etc/mosdns/redirect.lock
}
reload_others() {
/etc/init.d/network reload
/etc/init.d/dnsmasq reload
}
reload_service() {
stop
sleep 1
start
}
setcron() {
sed -i '/mosdns.sh/d' $CRON_FILE 2>/dev/null
[ "$geo_auto_update" -eq 1 ] && echo "0 $geo_update_day_time * * $geo_update_week_time /usr/share/mosdns/mosdns.sh geodata" >>$CRON_FILE
crontab $CRON_FILE
}
delcron() {
sed -i '/mosdns.sh/d' $CRON_FILE 2>/dev/null
crontab $CRON_FILE
}
start_service() {
config_load "mosdns"
config_foreach get_config "mosdns"
[ $enabled != 1 ] && return 1
delcron
setcron
[ "${CONF}" = "/etc/mosdns/config.yaml" ] && init_yaml
:> $(/usr/share/mosdns/mosdns.sh logfile)
procd_open_instance mosdns
procd_set_param command $PROG start -c "$CONF"
procd_set_param user root
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
procd_close_instance mosdns
[ "$redirect" -ne 1 ] && [ -f "/etc/mosdns/redirect.lock" ] && restore_setting
[ "$redirect" -eq 1 ] && redirect_setting
reload_others
update_list=0
[ "$adblock" -eq 1 ] && [ "$ad_source" != "geosite.dat" ] && {
[ -s "/etc/mosdns/rule/adlist.txt" ] && [ -f "/etc/mosdns/rule/.ad_source" ] && url_adlist=$(cat /etc/mosdns/rule/.ad_source) || update_list=1
[ "$ad_source" != "$url_adlist" ] && update_list=1
}
[ "$update_list" -eq 1 ] && /usr/share/mosdns/mosdns.sh adlist_update &> /dev/null &
}
stop_service() {
pgrep -f /usr/bin/mosdns | xargs kill -9 >/dev/null 2>&1
config_load "mosdns"
config_foreach get_config "mosdns"
[ "$enabled" = "0" ] && [ -f "/etc/mosdns/redirect.lock" ] && restore_setting
reload_others
delcron
}

View File

@ -1,162 +0,0 @@
log:
level: info
file: "/tmp/mosdns.log"
include: []
data_providers:
- tag: geoip
file: "/usr/share/v2ray/geoip.dat"
auto_reload: true
- tag: geosite
file: "/usr/share/v2ray/geosite.dat"
auto_reload: true
- tag: whitelist
file: "/etc/mosdns/rule/whitelist.txt"
auto_reload: true
- tag: blocklist
file: "/etc/mosdns/rule/blocklist.txt"
auto_reload: true
- tag: hosts
file: "/etc/mosdns/rule/hosts.txt"
auto_reload: true
- tag: redirect
file: "/etc/mosdns/rule/redirect.txt"
auto_reload: true
plugins:
- tag: lazy_cache
type: cache
args:
size: 200000
lazy_cache_ttl: 259200
- tag: modify_ttl
type: ttl
args:
minimal_ttl: 0
maximum_ttl: 0
- tag: "forward_local"
type: fast_forward
args:
upstream:
- addr: 119.29.29.29
- addr: 114.114.114.114
- tag: "forward_remote"
type: fast_forward
args:
upstream:
- addr: tls://8.8.8.8
- addr: tls://1.1.1.1
- tag: query_is_whitelist_domain
type: query_matcher
args:
domain:
- "provider:whitelist"
- tag: query_is_blocklist_domain
type: query_matcher
args:
domain:
- "provider:blocklist"
- tag: query_is_hosts_domain
type: hosts
args:
hosts:
- "provider:hosts"
- tag: query_is_redirect_domain
type: redirect
args:
rule:
- "provider:redirect"
- tag: query_is_local_domain
type: query_matcher
args:
domain:
- "provider:geosite:cn"
- tag: query_is_non_local_domain
type: query_matcher
args:
domain:
- "provider:geosite:geolocation-!cn"
- tag: response_has_local_ip
type: response_matcher
args:
ip:
- "provider:geoip:cn"
- tag: query_is_ad_domain
type: query_matcher
args:
domain:
- "provider:geosite:category-ads-all"
- tag: match_qtype65
type: query_matcher
args:
qtype: [65]
- tag: "main_sequence"
type: "sequence"
args:
exec:
- _misc_optm
- query_is_hosts_domain
- query_is_redirect_domain
- if: query_is_whitelist_domain
exec:
- forward_local
- modify_ttl
- _return
- if: "query_is_blocklist_domain || query_is_ad_domain || match_qtype65"
exec:
- _new_nxdomain_response
- _return
- lazy_cache
- if: query_is_local_domain
exec:
- forward_local
- modify_ttl
- _return
- if: query_is_non_local_domain
exec:
- _prefer_ipv4
- forward_remote
- modify_ttl
- _return
- primary:
- forward_local
- if: "(! response_has_local_ip) && [_response_valid_answer]"
exec:
- _drop_response
secondary:
- _prefer_ipv4
- forward_remote
- modify_ttl
fast_fallback: 200
servers:
- exec: main_sequence
listeners:
- protocol: udp
addr: ":5335"
- protocol: tcp
addr: ":5335"

View File

@ -1,3 +0,0 @@
domain:gstatic.com
domain:kernel.org
keyword:github

View File

@ -1,87 +0,0 @@
0.in-addr.arpa
10.in-addr.arpa
127.in-addr.arpa
16.172.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
64.100.in-addr.arpa
65.100.in-addr.arpa
66.100.in-addr.arpa
67.100.in-addr.arpa
68.100.in-addr.arpa
69.100.in-addr.arpa
70.100.in-addr.arpa
71.100.in-addr.arpa
72.100.in-addr.arpa
73.100.in-addr.arpa
74.100.in-addr.arpa
75.100.in-addr.arpa
76.100.in-addr.arpa
77.100.in-addr.arpa
78.100.in-addr.arpa
79.100.in-addr.arpa
80.100.in-addr.arpa
81.100.in-addr.arpa
82.100.in-addr.arpa
83.100.in-addr.arpa
84.100.in-addr.arpa
85.100.in-addr.arpa
86.100.in-addr.arpa
87.100.in-addr.arpa
88.100.in-addr.arpa
89.100.in-addr.arpa
90.100.in-addr.arpa
91.100.in-addr.arpa
92.100.in-addr.arpa
93.100.in-addr.arpa
94.100.in-addr.arpa
95.100.in-addr.arpa
96.100.in-addr.arpa
97.100.in-addr.arpa
98.100.in-addr.arpa
99.100.in-addr.arpa
100.100.in-addr.arpa
101.100.in-addr.arpa
102.100.in-addr.arpa
103.100.in-addr.arpa
104.100.in-addr.arpa
105.100.in-addr.arpa
106.100.in-addr.arpa
107.100.in-addr.arpa
108.100.in-addr.arpa
109.100.in-addr.arpa
110.100.in-addr.arpa
111.100.in-addr.arpa
112.100.in-addr.arpa
113.100.in-addr.arpa
114.100.in-addr.arpa
115.100.in-addr.arpa
116.100.in-addr.arpa
117.100.in-addr.arpa
118.100.in-addr.arpa
119.100.in-addr.arpa
120.100.in-addr.arpa
121.100.in-addr.arpa
122.100.in-addr.arpa
123.100.in-addr.arpa
124.100.in-addr.arpa
125.100.in-addr.arpa
126.100.in-addr.arpa
127.100.in-addr.arpa
2.0.192.in-addr.arpa
168.192.in-addr.arpa
255.255.255.255.in-addr.arpa
domain:ip6.arpa

View File

@ -1,24 +0,0 @@
domain:bing.com
domain:live.com
domain:msn.com
domain:ntp.org
domain:office.com
domain:qlogo.cn
domain:qq.com
domain:redhat.com
keyword:aaplimg
keyword:aicdn
keyword:akadns
keyword:akamai
keyword:apple
keyword:douyin
keyword:fclouddns
keyword:icloud
keyword:itunes
keyword:microsoft
keyword:mzstatic
keyword:ssrcdn
keyword:windows
keyword:xxpkg
keyword:yximgs
keyword:yxygslb

View File

@ -1,11 +0,0 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@mosdns[-1]
add ucitrack mosdns
set ucitrack.@mosdns[-1].init=mosdns
commit ucitrack
EOF
rm -rf /tmp/luci-*
exit 0

View File

@ -1,193 +0,0 @@
log:
level: log_level
file: "log_file"
include: []
data_providers:
- tag: geoip
file: "/usr/share/v2ray/geoip.dat"
auto_reload: true
- tag: geosite
file: "/usr/share/v2ray/geosite.dat"
auto_reload: true
- tag: whitelist
file: "/etc/mosdns/rule/whitelist.txt"
auto_reload: true
- tag: blocklist
file: "/etc/mosdns/rule/blocklist.txt"
auto_reload: true
- tag: greylist
file: "/etc/mosdns/rule/greylist.txt"
auto_reload: true
- tag: hosts
file: "/etc/mosdns/rule/hosts.txt"
auto_reload: true
- tag: redirect
file: "/etc/mosdns/rule/redirect.txt"
auto_reload: true
- tag: local_ptr
file: "/etc/mosdns/rule/local-ptr.txt"
auto_reload: true
- tag: adlist
file: "/etc/mosdns/rule/adlist.txt"
auto_reload: true
plugins:
- tag: lazy_cache
type: cache
args:
size: cache_size
lazy_cache_ttl: cache_survival_time
- tag: modify_ttl
type: ttl
args:
minimal_ttl: minimal_ttl_custom
maximum_ttl: maximum_ttl_custom
- tag: "forward_local"
type: forward
args:
upstream:
- addr: local_dns
bootstrap:
- "bootstrap_dns"
- tag: "forward_remote"
type: fast_forward
args:
upstream:
- addr: remote_dns
- tag: query_is_whitelist_domain
type: query_matcher
args:
domain:
- "provider:whitelist"
- tag: query_is_blocklist_domain
type: query_matcher
args:
domain:
- "provider:blocklist"
- tag: query_is_greylist_domain
type: query_matcher
args:
domain:
- "provider:greylist"
- tag: query_is_hosts_domain
type: hosts
args:
hosts:
- "provider:hosts"
- tag: query_is_redirect_domain
type: redirect
args:
rule:
- "provider:redirect"
- tag: query_is_local_domain
type: query_matcher
args:
domain:
- "provider:geosite:cn"
- tag: query_is_non_local_domain
type: query_matcher
args:
domain:
- "provider:geosite:geolocation-!cn"
- tag: response_has_local_ip
type: response_matcher
args:
ip:
- "provider:geoip:cn"
- tag: query_is_ad_domain
type: query_matcher
args:
domain:
- "adblock"
- tag: match_local_ptr
type: query_matcher
args:
qtype: [12]
domain:
- "provider:local_ptr"
- tag: match_qtype65
type: query_matcher
args:
qtype: [65]
- tag: "main_sequence"
type: "sequence"
args:
exec:
- _misc_optm
- query_is_hosts_domain
- query_is_redirect_domain
- if: query_is_whitelist_domain
exec:
- forward_local
- modify_ttl
- _return
- if: "query_is_blocklist_domain || query_is_ad_domain || match_local_ptr || match_qtype65"
exec:
- _new_nxdomain_response
- _return
- lazy_cache
- if: query_is_greylist_domain
exec:
- forward_remote
- modify_ttl
- _return
- if: query_is_local_domain
exec:
- forward_local
- modify_ttl
- _return
- if: query_is_non_local_domain
exec:
- _prefer_ipv4
- forward_remote
- modify_ttl
- _return
- primary:
- forward_local
- if: "(! response_has_local_ip) && [_response_valid_answer]"
exec:
- _drop_response
secondary:
- _prefer_ipv4
- forward_remote
- modify_ttl
fast_fallback: 200
servers:
- exec: main_sequence
listeners:
- protocol: udp
addr: ":listen_port"
- protocol: tcp
addr: ":listen_port"

View File

@ -1,102 +0,0 @@
#!/bin/sh
script_action=${1}
logfile_path() (
configfile=$(uci -q get mosdns.config.configfile)
if [ "$configfile" = "/etc/mosdns/config.yaml" ]; then
uci -q get mosdns.config.logfile
else
[ ! -f /etc/mosdns/config_custom.yaml ] && exit 1
awk '/^log:/{f=1;next}f==1{if($0~/file:/){print;exit}if($0~/^[^ ]/)exit}' /etc/mosdns/config_custom.yaml | grep -Eo "/[^'\"]+"
fi
)
interface_dns() (
if [ "$(uci -q get mosdns.config.custom_local_dns)" -eq 1 ]; then
uci -q get mosdns.config.local_dns
else
peerdns=$(uci -q get network.wan.peerdns)
proto=$(uci -q get network.wan.proto)
if [ "$peerdns" = 0 ] || [ "$proto" = "static" ]; then
uci -q get network.wan.dns
else
interface_status=$(ubus call network.interface.wan status)
echo $interface_status | jsonfilter -e "@['dns-server'][0]"
echo $interface_status | jsonfilter -e "@['dns-server'][1]"
fi
[ $? -ne 0 ] && echo "119.29.29.29"
fi
)
ad_block() (
adblock=$(uci -q get mosdns.config.adblock)
if [ "$adblock" -eq 1 ]; then
ad_source=$(uci -q get mosdns.config.ad_source)
if [ "$ad_source" = "geosite.dat" ]; then
echo "provider:geosite:category-ads-all"
else
echo "provider:adlist"
fi
else
echo "full:disable-category-ads-all.null"
fi
)
adlist_update() (
ad_source=$(uci -q get mosdns.config.ad_source)
[ "$ad_source" = "geosite.dat" ] || [ -z "$ad_source" ] && exit 0
AD_TMPDIR=$(mktemp -d) || exit 1
if echo "$ad_source" | grep -Eq "^https://raw.githubusercontent.com" ; then
google_status=$(curl -I -4 -m 3 -o /dev/null -s -w %{http_code} http://www.google.com/generate_204)
[ "$google_status" -ne "204" ] && mirror="https://ghproxy.com/"
fi
echo -e "\e[1;32mDownloading $mirror$ad_source\e[0m"
curl --connect-timeout 60 -m 90 --ipv4 -fSLo "$AD_TMPDIR/adlist.txt" "$mirror$ad_source"
if [ $? -ne 0 ]; then
rm -rf "$AD_TMPDIR"
exit 1
else
\cp "$AD_TMPDIR/adlist.txt" /etc/mosdns/rule/adlist.txt
echo "$ad_source" > /etc/mosdns/rule/.ad_source
rm -rf "$AD_TMPDIR"
fi
)
geodat_update() (
geodat_download() (
google_status=$(curl -I -4 -m 3 -o /dev/null -s -w %{http_code} http://www.google.com/generate_204)
[ "$google_status" -ne "204" ] && mirror="https://ghproxy.com/"
echo -e "\e[1;32mDownloading "$mirror"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1\e[0m"
curl --connect-timeout 60 -m 900 --ipv4 -fSLo "$TMPDIR/$1" ""$mirror"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1"
)
TMPDIR=$(mktemp -d) || exit 1
geodat_download geoip.dat && geodat_download geosite.dat
if [ $? -ne 0 ]; then
rm -rf "$TMPDIR"
exit 1
fi
cp -f "$TMPDIR"/* /usr/share/v2ray
rm -rf "$TMPDIR"
)
case $script_action in
"dns")
interface_dns
;;
"ad")
ad_block
;;
"geodata")
geodat_update && adlist_update
;;
"logfile")
logfile_path
;;
"adlist_update")
adlist_update
;;
*)
exit 0
;;
esac

View File

@ -1,11 +0,0 @@
{
"luci-app-mosdns": {
"description": "Grant UCI access for luci-app-mosdns",
"read": {
"uci": [ "mosdns" ]
},
"write": {
"uci": [ "mosdns" ]
}
}
}

View File

@ -1,45 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=mosdns
PKG_VERSION:=4.5.3
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/IrineSistiana/mosdns/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=2a13b1b1d862731cf946a8ceaa99523a0eb0eaae56045dd31207b61a5a6d47ae
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/IrineSistiana/mosdns
GO_PKG_LDFLAGS_X:=main.version=v$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/mosdns
SECTION:=net
CATEGORY:=Network
SUBMENU:=IP Addresses and Names
TITLE:=A plug-in DNS forwarder/splitter
URL:=https://github.com/IrineSistiana/mosdns
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
endef
GO_PKG_TARGET_VARS:=$(filter-out CGO_ENABLED=%,$(GO_PKG_TARGET_VARS)) CGO_ENABLED=0
define Package/mosdns/install
$(call GoPackage/Package/Install/Bin,$(1))
endef
$(eval $(call GoBinPackage,mosdns))
$(eval $(call BuildPackage,mosdns))

View File

@ -1,496 +0,0 @@
diff --git a/go.mod b/go.mod
index f44519b..81928ae 100644
--- a/go.mod
+++ b/go.mod
@@ -3,27 +3,26 @@ module github.com/IrineSistiana/mosdns/v4
go 1.18
require (
- github.com/AdguardTeam/dnsproxy v0.46.2
github.com/Knetic/govaluate v3.0.0+incompatible
github.com/fsnotify/fsnotify v1.6.0
github.com/go-redis/redis/v8 v8.11.5
github.com/golang/snappy v0.0.4
- github.com/google/nftables v0.0.0-20221029063419-3ad45c080caa
+ github.com/google/nftables v0.1.0
github.com/kardianos/service v1.2.2
- github.com/lucas-clemente/quic-go v0.30.0
github.com/miekg/dns v1.1.50
github.com/mitchellh/mapstructure v1.5.0
github.com/nadoo/ipset v0.5.0
github.com/pires/go-proxyproto v0.6.2
github.com/prometheus/client_golang v1.13.0
+ github.com/quic-go/quic-go v0.32.0
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.13.0
- github.com/stretchr/testify v1.8.0
+ github.com/stretchr/testify v1.8.1
go.uber.org/zap v1.23.0
- golang.org/x/exp v0.0.0-20221028150844-83b7d23a625f
- golang.org/x/net v0.1.0
+ golang.org/x/exp v0.0.0-20230203172020-98cc5a0785f9
+ golang.org/x/net v0.5.0
golang.org/x/sync v0.1.0
- golang.org/x/sys v0.1.0
+ golang.org/x/sys v0.4.0
google.golang.org/protobuf v1.28.1
gopkg.in/yaml.v3 v3.0.1
)
@@ -31,12 +30,18 @@ require (
replace github.com/nadoo/ipset v0.5.0 => github.com/IrineSistiana/ipset v0.5.1-0.20220703061533-6e0fc3b04c0a
require (
- github.com/AdguardTeam/golibs v0.11.2 // indirect
+ github.com/AdguardTeam/golibs v0.11.4 // indirect
+ github.com/Potterli20/dnscrypt-go v0.0.0-20230127121635-686bceceab0b // indirect
+ github.com/Potterli20/dnsproxy-go-fork v0.0.0-20230204013503-c9a1291ce56d // indirect
+ github.com/Potterli20/go-flags-fork v0.0.0-20230105121328-343499d19367 // indirect
+ github.com/Potterli20/golibs-fork v0.0.0-20230126184335-257157f1aac9 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 // indirect
github.com/ameshkov/dnscrypt/v2 v2.2.5 // indirect
github.com/ameshkov/dnsstamps v1.0.3 // indirect
+ github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
+ github.com/bluele/gcache v0.0.2 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
@@ -44,7 +49,7 @@ require (
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
- github.com/google/pprof v0.0.0-20221010195024-131d412537ea // indirect
+ github.com/google/pprof v0.0.0-20230131232505-5a9e8f65f08f // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/josharian/native v1.0.0 // indirect
@@ -55,13 +60,19 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mdlayher/netlink v1.6.2 // indirect
github.com/mdlayher/socket v0.2.3 // indirect
- github.com/onsi/ginkgo/v2 v2.4.0 // indirect
+ github.com/nxadm/tail v1.4.8 // indirect
+ github.com/onsi/ginkgo v1.16.5 // indirect
+ github.com/onsi/ginkgo/v2 v2.8.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
+ github.com/quic-go/qpack v0.4.0 // indirect
+ github.com/quic-go/qtls-go1-18 v0.2.0 // indirect
+ github.com/quic-go/qtls-go1-19 v0.2.0 // indirect
+ github.com/quic-go/qtls-go1-20 v0.1.0 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
@@ -70,10 +81,12 @@ require (
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
- golang.org/x/crypto v0.1.0 // indirect
- golang.org/x/mod v0.6.0 // indirect
- golang.org/x/text v0.4.0 // indirect
- golang.org/x/tools v0.2.0 // indirect
+ golang.org/x/crypto v0.5.0 // indirect
+ golang.org/x/mod v0.7.0 // indirect
+ golang.org/x/text v0.6.0 // indirect
+ golang.org/x/tools v0.5.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
+ zgo.at/zcache v1.2.0 // indirect
)
diff --git a/go.sum b/go.sum
index 588e416..d6b92e4 100644
--- a/go.sum
+++ b/go.sum
@@ -36,20 +36,24 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
-github.com/AdguardTeam/dnsproxy v0.46.1 h1:ej9iRorG+vekaXGYB854waAiS+q8OfswYZ1MQRZolHk=
-github.com/AdguardTeam/dnsproxy v0.46.1/go.mod h1:PAmRzFqls0E92XTglyY2ESAqMAzZJhHKErG1ZpRnpjA=
-github.com/AdguardTeam/dnsproxy v0.46.2 h1:ZUKM713Ts5meYQqk6cJkUBMCFSWqFPXTgjXkN4RI1Vo=
-github.com/AdguardTeam/dnsproxy v0.46.2/go.mod h1:PAmRzFqls0E92XTglyY2ESAqMAzZJhHKErG1ZpRnpjA=
-github.com/AdguardTeam/golibs v0.10.9 h1:F9oP2da0dQ9RQDM1lGR7LxUTfUWu8hEFOs4icwAkKM0=
-github.com/AdguardTeam/golibs v0.10.9/go.mod h1:W+5rznZa1cSNSFt+gPS7f4Wytnr9fOrd5ZYqwadPw14=
github.com/AdguardTeam/golibs v0.11.2 h1:JbQB1Dg2JWStXgHh1QqBbOLWnP4t9oDjppoBH6TVXSE=
github.com/AdguardTeam/golibs v0.11.2/go.mod h1:87bN2x4VsTritptE3XZg9l8T6gznWsIxHBcQ1DeRIXA=
+github.com/AdguardTeam/golibs v0.11.4 h1:IltyvxwCTN+xxJF5sh6VadF8Zfbf8elgCm9dgijSVzM=
+github.com/AdguardTeam/golibs v0.11.4/go.mod h1:87bN2x4VsTritptE3XZg9l8T6gznWsIxHBcQ1DeRIXA=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/IrineSistiana/ipset v0.5.1-0.20220703061533-6e0fc3b04c0a h1:GQdh/h0q0ni3L//CXusyk+7QdhBL289vdNaes1WKkHI=
github.com/IrineSistiana/ipset v0.5.1-0.20220703061533-6e0fc3b04c0a/go.mod h1:rYF5DQLRGGoQ8ZSWeK+6eX5amAuPqwFkWjhQlEITGJQ=
github.com/Knetic/govaluate v3.0.0+incompatible h1:7o6+MAPhYTCF0+fdvoz1xDedhRb4f6s9Tn1Tt7/WTEg=
github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
+github.com/Potterli20/dnscrypt-go v0.0.0-20230127121635-686bceceab0b h1:QTTqfdCou16jhebgjEKpl2GjXLVK5SSOqpZYhgHd/Eo=
+github.com/Potterli20/dnscrypt-go v0.0.0-20230127121635-686bceceab0b/go.mod h1:sOoffGWwhCnUbi9PaynkrxF/ZgfSPXl9aYI0SxJOKGA=
+github.com/Potterli20/dnsproxy-go-fork v0.0.0-20230204013503-c9a1291ce56d h1:6NBKMT8/wQ1BDMb8Dj+JQyMuFqyOiZvgHrbZjIW8zw4=
+github.com/Potterli20/dnsproxy-go-fork v0.0.0-20230204013503-c9a1291ce56d/go.mod h1:WYCA2ec2vGYiMur6WA6/a26DCVwClW01SSbGUdjH7pQ=
+github.com/Potterli20/go-flags-fork v0.0.0-20230105121328-343499d19367 h1:Fk/zliZUUzmrTBBhP1jZIUemLRaTC50pUqxzDsI0BKc=
+github.com/Potterli20/go-flags-fork v0.0.0-20230105121328-343499d19367/go.mod h1:fxgCKaAiZ5s1gvXFfhymGvLZiOqERySJgz1hMWjb3fs=
+github.com/Potterli20/golibs-fork v0.0.0-20230126184335-257157f1aac9 h1:Lor82lC1jWhea/F+4VLV2U9pMy4ndtK3rJGCfVb1EqQ=
+github.com/Potterli20/golibs-fork v0.0.0-20230126184335-257157f1aac9/go.mod h1:hFpRVMkn7pYG91D/u3iFJ8B4nxnDUHqT4dJioQTvjA0=
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 h1:52m0LGchQBBVqJRyYYufQuIbVqRawmubW3OFGqK1ekw=
@@ -63,11 +67,15 @@ github.com/ameshkov/dnscrypt/v2 v2.2.5 h1:Ju1gQeez+6XLtk/b/k3RoJ2t+Ls+BSItLTZjZe
github.com/ameshkov/dnscrypt/v2 v2.2.5/go.mod h1:Cu5GgMvCR10BeXgACiGDwXyOpfMktsSIidml1XBp6uM=
github.com/ameshkov/dnsstamps v1.0.3 h1:Srzik+J9mivH1alRACTbys2xOxs0lRH9qnTA7Y1OYVo=
github.com/ameshkov/dnsstamps v1.0.3/go.mod h1:Ii3eUu73dx4Vw5O4wjzmT5+lkCwovjzaEZZ4gKyIH5A=
+github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0 h1:0b2vaepXIfMsG++IsjHiI2p4bxALD1Y2nQKGMR5zDQM=
+github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0/go.mod h1:6YNgTHLutezwnBvyneBbwvB8C82y3dcoOj5EQJIdGXA=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/bluele/gcache v0.0.2 h1:WcbfdXICg7G/DGBh1PFfcirkWOQV+v077yF1pSy3DGw=
+github.com/bluele/gcache v0.0.2/go.mod h1:m15KV+ECjptwSPxKhOhQoAFQVtUFjTVkc3H8o0t/fp0=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
@@ -92,6 +100,8 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -105,6 +115,7 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
+github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
@@ -162,10 +173,10 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/nftables v0.0.0-20221015190445-4f5cd5826fbd h1:EWP0uTXu3ItJlSimbOvSFVejL5/Bc8eMui48EESr9R4=
-github.com/google/nftables v0.0.0-20221015190445-4f5cd5826fbd/go.mod h1:b97ulCCFipUC+kSin+zygkvUVpx0vyIAwxXFdY3PlNc=
github.com/google/nftables v0.0.0-20221029063419-3ad45c080caa h1:29BM9lwE2zPdn0c0iaiqF/faXQn2IS2Ck/wrlwxKi40=
github.com/google/nftables v0.0.0-20221029063419-3ad45c080caa/go.mod h1:b97ulCCFipUC+kSin+zygkvUVpx0vyIAwxXFdY3PlNc=
+github.com/google/nftables v0.1.0 h1:T6lS4qudrMufcNIZ8wSRrL+iuwhsKxpN+zFLxhUWOqk=
+github.com/google/nftables v0.1.0/go.mod h1:b97ulCCFipUC+kSin+zygkvUVpx0vyIAwxXFdY3PlNc=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
@@ -178,6 +189,8 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20221010195024-131d412537ea h1:R3VfsTXMMK4JCWZDdxScmnTzu9n9YRsDvguLis0U/b8=
github.com/google/pprof v0.0.0-20221010195024-131d412537ea/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
+github.com/google/pprof v0.0.0-20230131232505-5a9e8f65f08f h1:gl1DCiSk+mrXXBGPm6CEeS2MkJuMVzAOrXg34oVj1QI=
+github.com/google/pprof v0.0.0-20230131232505-5a9e8f65f08f/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
@@ -187,6 +200,7 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
@@ -211,11 +225,10 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
-github.com/lucas-clemente/quic-go v0.30.0 h1:nwLW0h8ahVQ5EPTIM7uhl/stHqQDea15oRlYKZmw2O0=
-github.com/lucas-clemente/quic-go v0.30.0/go.mod h1:ssOrRsOmdxa768Wr78vnh2B8JozgLsMzG/g+0qEC7uk=
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/marten-seemann/qpack v0.3.0 h1:UiWstOgT8+znlkDPOg2+3rIuYXJ2CnGDkGUXN6ki6hE=
@@ -225,8 +238,6 @@ github.com/marten-seemann/qtls-go1-18 v0.1.3/go.mod h1:mJttiymBAByA49mhlNZZGrH5u
github.com/marten-seemann/qtls-go1-19 v0.1.1 h1:mnbxeq3oEyQxQXwI4ReCgW9DPoPR94sNlqWoDZnjRIE=
github.com/marten-seemann/qtls-go1-19 v0.1.1/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
-github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM=
-github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/mdlayher/netlink v1.6.2 h1:D2zGSkvYsJ6NreeED3JiVTu1lj2sIYATqSaZlhPzUgQ=
@@ -245,14 +256,21 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
+github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
+github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
-github.com/onsi/ginkgo/v2 v2.3.1 h1:8SbseP7qM32WcvE6VaN6vfXxv698izmsJ1UQX9ve7T8=
-github.com/onsi/ginkgo/v2 v2.3.1/go.mod h1:Sv4yQXwG5VmF7tm3Q5Z+RWUpPo24LF1mpnz2crUb8Ys=
+github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs=
github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo=
-github.com/onsi/gomega v1.22.0 h1:AIg2/OntwkBiCg5Tt1ayyiF1ArFrWFoCSMtMi/wdApk=
+github.com/onsi/ginkgo/v2 v2.8.0 h1:pAM+oBNPrpXRs+E/8spkeGx9QgekbRVyr74EUvRVOUI=
+github.com/onsi/ginkgo/v2 v2.8.0/go.mod h1:6JsQiECmxCa3V5st74AL/AmsV482EDdVrGaVW6z3oYU=
+github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
+github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.22.1 h1:pY8O4lBfsHKZHM/6nrxkhVPUznOlIu3quZcKP/M20KI=
+github.com/onsi/gomega v1.25.0 h1:Vw7br2PCDYijJHSfBOWhov+8cAnUf8MfMaIOV323l6Y=
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg=
@@ -292,6 +310,16 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
+github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
+github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
+github.com/quic-go/qtls-go1-18 v0.2.0 h1:5ViXqBZ90wpUcZS0ge79rf029yx0dYB0McyPJwqqj7U=
+github.com/quic-go/qtls-go1-18 v0.2.0/go.mod h1:moGulGHK7o6O8lSPSZNoOwcLvJKJ85vVNc7oJFD65bc=
+github.com/quic-go/qtls-go1-19 v0.2.0 h1:Cvn2WdhyViFUHoOqK52i51k4nDX8EwIh5VJiVM4nttk=
+github.com/quic-go/qtls-go1-19 v0.2.0/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI=
+github.com/quic-go/qtls-go1-20 v0.1.0 h1:d1PK3ErFy9t7zxKsG3NXBJXZjp/kMLoIb3y/kV54oAI=
+github.com/quic-go/qtls-go1-20 v0.1.0/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM=
+github.com/quic-go/quic-go v0.32.0 h1:lY02md31s1JgPiiyfqJijpu/UX/Iun304FI3yUqX7tA=
+github.com/quic-go/quic-go v0.32.0/go.mod h1:/fCsKANhQIeD5l76c2JFU+07gVE3KaA0FP+0zMWwfwo=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
@@ -302,8 +330,6 @@ github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
-github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI=
-github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
@@ -315,6 +341,7 @@ github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+z
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
@@ -323,6 +350,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 h1:gga7acRE695APm9hlsSMoOoE65U4/TcqNj90mc69Rlg=
@@ -354,8 +383,10 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
-golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
+golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
+golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
+golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
+golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -366,10 +397,10 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
-golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg=
-golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/exp v0.0.0-20221028150844-83b7d23a625f h1:Al51T6tzvuh3oiwX11vex3QgJ2XTedFPGmbEVh8cdoc=
-golang.org/x/exp v0.0.0-20221028150844-83b7d23a625f/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
+golang.org/x/exp v0.0.0-20221205204356-47842c84f3db h1:D/cFflL63o2KSLJIwjlcIt8PR064j/xsmdEJL/YvY/o=
+golang.org/x/exp v0.0.0-20221205204356-47842c84f3db/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
+golang.org/x/exp v0.0.0-20230203172020-98cc5a0785f9 h1:frX3nT9RkKybPnjyI+yvZh6ZucTZatCCEm9D47sZ2zo=
+golang.org/x/exp v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -396,8 +427,11 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I=
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
+golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
+golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -420,6 +454,7 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
@@ -435,8 +470,10 @@ golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220923203811-8be639271d50/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
-golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
-golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
+golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
+golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
+golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
+golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -464,6 +501,7 @@ golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -474,7 +512,10 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -500,6 +541,7 @@ golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -515,8 +557,10 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
-golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
+golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
+golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -527,8 +571,10 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
-golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
+golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
+golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -576,6 +622,7 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
@@ -583,6 +630,8 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE=
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
+golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4=
+golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -685,9 +734,11 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
@@ -709,3 +760,5 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
+zgo.at/zcache v1.2.0 h1:++0dNWOrmUBa10WSja+eHx5bEO2PzZLRY6MJlBD47yk=
+zgo.at/zcache v1.2.0/go.mod h1:xWQo2ha/bamTmx8CbfrZl9Nf8AoT5uNh2hWfbQi8TiE=
diff --git a/pkg/server/server_test.go b/pkg/server/server_test.go
index 29bc5bb..9050a6b 100644
--- a/pkg/server/server_test.go
+++ b/pkg/server/server_test.go
@@ -22,7 +22,7 @@ package server
import (
"crypto/rand"
"crypto/tls"
- "github.com/AdguardTeam/dnsproxy/upstream"
+ "github.com/Potterli20/dnsproxy-go-fork/upstream"
"github.com/IrineSistiana/mosdns/v4/pkg/server/dns_handler"
"github.com/IrineSistiana/mosdns/v4/pkg/server/http_handler"
"github.com/IrineSistiana/mosdns/v4/pkg/utils"
diff --git a/pkg/upstream/h3roundtripper/h3roundtripper.go b/pkg/upstream/h3roundtripper/h3roundtripper.go
index f32eafd..2ff9460 100644
--- a/pkg/upstream/h3roundtripper/h3roundtripper.go
+++ b/pkg/upstream/h3roundtripper/h3roundtripper.go
@@ -22,8 +22,8 @@ package h3roundtripper
import (
"context"
"crypto/tls"
- "github.com/lucas-clemente/quic-go"
- "github.com/lucas-clemente/quic-go/http3"
+ "github.com/quic-go/quic-go"
+ "github.com/quic-go/quic-go/http3"
"go.uber.org/zap"
"net/http"
"sync"
diff --git a/pkg/upstream/upstream.go b/pkg/upstream/upstream.go
index 5acddd9..4f47b55 100644
--- a/pkg/upstream/upstream.go
+++ b/pkg/upstream/upstream.go
@@ -28,7 +28,7 @@ import (
"github.com/IrineSistiana/mosdns/v4/pkg/upstream/doh"
"github.com/IrineSistiana/mosdns/v4/pkg/upstream/h3roundtripper"
"github.com/IrineSistiana/mosdns/v4/pkg/upstream/transport"
- "github.com/lucas-clemente/quic-go"
+ "github.com/quic-go/quic-go"
"github.com/miekg/dns"
"go.uber.org/zap"
"golang.org/x/net/http2"
diff --git a/plugin/executable/forward/forward.go b/plugin/executable/forward/forward.go
index a11e852..804bd9f 100644
--- a/plugin/executable/forward/forward.go
+++ b/plugin/executable/forward/forward.go
@@ -23,7 +23,7 @@ import (
"context"
"errors"
"fmt"
- "github.com/AdguardTeam/dnsproxy/upstream"
+ "github.com/Potterli20/dnsproxy-go-fork/upstream"
"github.com/IrineSistiana/mosdns/v4/coremain"
"github.com/IrineSistiana/mosdns/v4/pkg/executable_seq"
"github.com/IrineSistiana/mosdns/v4/pkg/query_context"

View File

@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=naiveproxy
PKG_VERSION:=109.0.5414.74-1
PKG_VERSION:=110.0.5481.100-1
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=eb0b7d4ee7e34aff5bd9f7ff662a707c059e3739da47cd52e6d5edfff988123a
PKG_HASH:=b20ea791927426d2da9ba19bc448e902a6aa667706f1cda8f24323546e3b994f
PKG_LICENSE:=BSD 3-Clause
PKG_LICENSE_FILES:=LICENSE
@ -58,31 +58,31 @@ ifneq ($(CONFIG_CCACHE),)
export naive_ccache_flags=cc_wrapper="$(CCACHE)"
endif
CLANG_VER:=16-init-8697-g60809cd2-1
CLANG_VER:=16-init-12251-g87d0ff91-2
CLANG_FILE:=clang-llvmorg-$(CLANG_VER).tgz
define Download/CLANG
URL:=https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64
URL_FILE:=$(CLANG_FILE)
FILE:=$(CLANG_FILE)
HASH:=5ae35f85e0d32136795c6b223bf64263d46678dd4a24fea4e9039e58a32670de
HASH:=902060c5657cb99e58332ef33eed52262373734abf841a38efac239b9382969c
endef
GN_VER:=1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41
GN_VER:=5e19d2fb166fbd4f6f32147fbb2f497091a54ad8
GN_FILE:=gn-git_revision-$(GN_VER).zip
define Download/GN_TOOL
URL:=https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+
URL_FILE:=git_revision:$(GN_VER)
FILE:=$(GN_FILE)
HASH:=7195291488d08f3a10e85b85d8c4816e077015f1c5f196f770003a97aa42caf8
HASH:=a95c29544e581b56c1d3f1920637a9f518989b3b744d6b2234fe8de634acddf1
endef
PGO_VER:=5414-1672766927-26b17aa1745606599e619feccfe46371e879e7c4
PGO_VER:=5481-1675162426-393d781cbc3753d814a299bfd43435032b5acfd9
PGO_FILE:=chrome-linux-$(PGO_VER).profdata
define Download/PGO_PROF
URL:=https://storage.googleapis.com/chromium-optimization-profiles/pgo_profiles
URL_FILE:=$(PGO_FILE)
FILE:=$(PGO_FILE)
HASH:=e9a52f7a60d46fd6e682b0e908b1363faeb6f96bc2e95d5d95095b33fa67e34a
HASH:=c58a2775b7287f80ec21b503a0d18bb7b8777d943b16bb2c7b3135c5a89d7acc
endef
define Build/Prepare