🛸 Sync 2024-07-10 14:36:00

This commit is contained in:
github-actions[bot] 2024-07-10 14:36:00 +08:00
parent 938d1b23b8
commit 2f66ed338f
16 changed files with 5320 additions and 91 deletions

View File

@ -7,41 +7,43 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=adguardhome
PKG_VERSION:=0.107.52
PKG_RELEASE:=125
PKG_RELEASE:=126
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/AdGuardHome/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=skip
PKG_BUILD_DIR:=$(BUILD_DIR)/AdGuardHome-$(PKG_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=c7d8b9ede1eaf8507e406875c679c0a1c21e9cca
PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=LICENSE.txt
PKG_MAINTAINER:=Dobroslaw Kijowski <dobo90@gmail.com>
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host
PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-mips16
PKG_USE_MIPS16:=0
PKG_CONFIG_DEPENDS:=CONFIG_ADGUARDHOME_COMPRESS_GOPROXY
GO_PKG:=github.com/AdguardTeam/AdGuardHome
GO_PKG_BUILD_PKG:=$(GO_PKG)
GO_PKG_BUILD_PKG:=github.com/AdguardTeam/AdGuardHome
AGH_BUILD_TIME:=$(shell date -d @$(SOURCE_DATE_EPOCH) +%FT%TZ%z)
GO_PKG_LDFLAGS_X:= \
$(GO_PKG)/internal/version.channel=release \
$(GO_PKG)/internal/version.version=v$(PKG_VERSION) \
$(GO_PKG)/internal/version.buildtime=$(AGH_BUILD_TIME) \
$(GO_PKG)/internal/version.goarm=$(GO_ARM) \
$(GO_PKG)/internal/version.gomips=$(GO_MIPS)
AGH_VERSION_PKG:=github.com/AdguardTeam/AdGuardHome/internal/version
GO_PKG_LDFLAGS_X:=$(AGH_VERSION_PKG).channel=release \
$(AGH_VERSION_PKG).version=v$(PKG_VERSION) \
$(AGH_VERSION_PKG).buildtime=$(AGH_BUILD_TIME) \
$(AGH_VERSION_PKG).goarm=$(GO_ARM) \
$(AGH_VERSION_PKG).gomips=$(GO_MIPS)
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/adguardhome
SECTION:=net
CATEGORY:=Network
TITLE:=Network-wide ads and trackers blocking DNS server
URL:=https://github.com/AdguardTeam/AdGuardHome
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
SECTION:=net
CATEGORY:=Network
TITLE:=Network-wide ads and trackers blocking DNS server
URL:=https://github.com/AdguardTeam/AdGuardHome
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
endef
define Package/adguardhome/conffiles
@ -50,32 +52,32 @@ define Package/adguardhome/conffiles
endef
define Package/adguardhome/description
Free and open source, powerful network-wide ads and trackers blocking DNS server.
Free and open source, powerful network-wide ads and trackers blocking DNS server.
endef
FRONTEND_FILE:=$(PKG_NAME)-frontend-$(PKG_VERSION).tar.gz
define Download/adguardhome-frontend
URL:=https://github.com/AdguardTeam/AdGuardHome/releases/download/v$(PKG_VERSION)/
URL_FILE:=AdGuardHome_frontend.tar.gz
FILE:=$(FRONTEND_FILE)
HASH:=skip
define Package/$(PKG_NAME)/config
config ADGUARDHOME_COMPRESS_GOPROXY
bool "Compiling with GOPROXY proxy"
default n
endef
define Build/Prepare
$(call Build/Prepare/Default)
ifeq ($(CONFIG_ADGUARDHOME_COMPRESS_GOPROXY),y)
export GO111MODULE=on
export GOPROXY=https://goproxy.bj.bcebos.com
endif
gzip -dc $(DL_DIR)/$(FRONTEND_FILE) | $(HOST_TAR) -C $(PKG_BUILD_DIR)/ $(TAR_OPTIONS)
define Build/Compile
( \
pushd $(PKG_BUILD_DIR) ; \
make js-deps js-build ; \
popd ; \
$(call GoPackage/Build/Compile) ; \
)
endef
define Package/adguardhome/install
$(call GoPackage/Package/Install/Bin,$(1))
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/adguardhome.init $(1)/etc/init.d/adguardhome
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/adguardhome.config $(1)/etc/config/adguardhome
endef
$(eval $(call Download,adguardhome-frontend))
$(eval $(call GoBinPackage,adguardhome))
$(eval $(call BuildPackage,adguardhome))

View File

@ -1,4 +0,0 @@
config adguardhome config
option enabled '0'
# Where to store persistent data by AdGuard Home
option workdir /var/adguardhome

View File

@ -1,25 +0,0 @@
#!/bin/sh /etc/rc.common
PROG=/usr/bin/AdGuardHome
USE_PROCD=1
# starts just after network starts to avoid some network race conditions
START=25
# stops before networking stops
STOP=89
start_service() {
config_load adguardhome
config_get_bool enabled config enabled
config_get WORK_DIR config workdir
[ "$enabled" -eq "1" ] || return 1
[ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR"
procd_open_instance
procd_set_param command "$PROG" -c /etc/adguardhome.yaml -w "$WORK_DIR" --no-check-update
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}

View File

@ -1,11 +1,11 @@
--- a/client/src/login/Login/Form.js
+++ b/client/src/login/Login/Form.js
@@ -25,7 +25,7 @@ const Form = (props) => {
type="text"
className="form-control"
component={renderInputField}
- placeholder={t('username_placeholder')}
+ placeholder="默认用户名密码都是root"
autoComplete="username"
autocapitalize="none"
disabled={processing}
--- a/client/src/__locales/zh-cn.json
+++ b/client/src/__locales/zh-cn.json
@@ -571,7 +571,7 @@
"filters_interval": "过滤器更新间隔",
"disabled": "已禁用",
"username_label": "用户名",
- "username_placeholder": "输入用户名",
+ "username_placeholder": "默认用户名密码都是root",
"password_label": "密码",
"password_placeholder": "输入密码",
"sign_in": "登入",

View File

@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=apfree-wifidog
PKG_VERSION:=master
PKG_RELEASE:=6
PKG_RELEASE:=7
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/liudf0716/apfree-wifidog.git
PKG_SOURCE_VERSION:=23d361c665f23314d508e2a03f0abddd66aeb7d2
PKG_SOURCE_VERSION:=4f8d95f5986afd472146174f34a8ef94c0cb30d0
PKG_MIRROR_HASH:=skip
PKG_MAINTAINER:=Dengfeng Liu <liudf0716@gmail.com>

View File

@ -34,11 +34,11 @@ async function getServiceStatus() {
}
function getAppVersion() {
return L.resolveDefault(fs.exec_direct('/usr/libexec/mihomo-call', ['version', 'app']), {});
return L.resolveDefault(fs.exec_direct('/usr/libexec/mihomo-call', ['version', 'app']));
}
function getCoreVersion() {
return L.resolveDefault(fs.exec_direct('/usr/libexec/mihomo-call', ['version', 'core']), {});
return L.resolveDefault(fs.exec_direct('/usr/libexec/mihomo-call', ['version', 'core']));
}
function loadProfile() {
@ -73,11 +73,15 @@ async function openDashboard(type) {
}
function renderStatus(running) {
if (running) {
return E('input', { style: 'border: unset; color: green; font-style: italic; font-weight: bold;', readonly: 'readonly', value: _('Running') });
} else {
return E('input', { style: 'border: unset; color: red; font-style: italic; font-weight: bold;', readonly: 'readonly', value: _('Not Running') });
return updateStatus(E('input', { id: 'core_status', style: 'border: unset; font-style: italic; font-weight: bold;', readonly: '' }), running);
}
function updateStatus(element, running) {
if (element) {
element.style.color = running ? 'green' : 'red';
element.value = running ? _('Running') : _('Not Running');
}
return element;
}
return view.extend({
@ -105,12 +109,12 @@ return view.extend({
o = s.option(form.DummyValue, '_app_version', _('App Version'));
o.cfgvalue = function (section_id) {
return E('input', { style: 'border: unset;', readonly: 'readonly', value: appVersion });
return E('input', { style: 'border: unset;', readonly: 'readonly', value: appVersion.trim() });
};
o = s.option(form.DummyValue, '_core_version', _('Core Version'));
o.cfgvalue = function (section_id) {
return E('input', { style: 'border: unset;', readonly: 'readonly', value: coreVersion });
return E('input', { style: 'border: unset;', readonly: 'readonly', value: coreVersion.trim() });
};
o = s.option(form.DummyValue, '_core_status', _('Core Status'));
@ -119,7 +123,7 @@ return view.extend({
};
poll.add(function () {
return L.resolveDefault(getServiceStatus()).then(function (running) {
m.lookupOption('mihomo.status._core_status')[0].getUIElement("status").node.replaceChildren(renderStatus(running));
updateStatus(document.getElementById('core_status'), running);
});
});
@ -186,6 +190,11 @@ return view.extend({
o.rmempty = false;
o.depends('transparent_proxy', '1');
o = s.option(form.Flag, 'bypass_china_mainland_ip', _('Bypass China Mainland IP'), _('This option does not work well with Fake-IP.'));
o.retain = true;
o.rmempty = false;
o.depends('transparent_proxy', '1');
s = m.section(form.TableSection, 'subscription', _('Subscription Config'));
s.addremove = true;
s.anonymous = true;

View File

@ -85,6 +85,12 @@ msgstr "DNS 劫持"
msgid "When disabled, DNS request will not redirect to core, you need handle this by yourself!"
msgstr "当禁用此选项时DNS请求将不再重定向到核心你需要自行处理"
msgid "Bypass China Mainland IP"
msgstr "绕过中国大陆 IP"
msgid "This option does not work well with Fake-IP."
msgstr "此选项不能很好的和Fake-IP一起工作。"
msgid "Subscription Config"
msgstr "订阅配置"

View File

@ -11,9 +11,9 @@ LUCI_DEPENDS:=@(x86_64||aarch64) +curl +opkg +luci-lib-ipkg +tar +coreutils +cor
LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.19)
LUCI_PKGARCH:=all
PKG_VERSION:=0.1.24-1
PKG_VERSION:=0.1.25-0
# PKG_RELEASE MUST be empty for luci.mk
PKG_RELEASE:=79
PKG_RELEASE:=80
ISTORE_UI_VERSION:=0.1.16
ISTORE_UI_RELEASE:=1

View File

@ -483,7 +483,7 @@ function entrysh()
local lock, msg = flock("/var/lock/istore-entrysh.lock", "lock")
local meta
for _, meta in ipairs(installed) do
if meta.autoconf ~= nil and meta.uci ~= nil and luci.util.contains(meta.autoconf, "entrysh")
if meta.flags ~= nil and meta.uci ~= nil and luci.util.contains(meta.flags, "entrysh")
and (candidate == nil or luci.util.contains(candidate, meta.name)) then
local entryfile = "/usr/libexec/istoree/" .. meta.name .. ".sh"
local ucifile = "/etc/config/" .. meta.uci

View File

@ -237,7 +237,7 @@ paths:
tags:
- entrysh
summary: 查询插件运行状态,主要为了获取入口信息。
description: 调用前应该检查meta数据中autoconf数组包含entrysh注意如果是安装插件则检查服务器端的autoconf如果是调用已安装插件则检查路由器端的autoconf
description: 调用前应该检查meta数据中flags数组包含entrysh注意如果是安装插件则检查服务器端的flags如果是调用已安装插件则检查路由器端的flags
parameters:
- in: "query"
name: "token"

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mihomo
PKG_VERSION:=1.18.6
PKG_RELEASE:=11
PKG_RELEASE:=12
PKG_BUILD_TIME=$(shell date -u -Iseconds)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@ -49,6 +49,7 @@ define Package/mihomo/install
$(INSTALL_BIN) $(CURDIR)/files/profile_watcher.sh $(1)/etc/mihomo/profile_watcher.sh
$(INSTALL_BIN) $(CURDIR)/files/upnp_lease_watcher.sh $(1)/etc/mihomo/upnp_lease_watcher.sh
$(INSTALL_BIN) $(CURDIR)/files/hijack.nft $(1)/etc/mihomo/hijack.nft
$(INSTALL_BIN) $(CURDIR)/files/geoip-ipv4-cn.nft $(1)/etc/mihomo/geoip-ipv4-cn.nft
$(INSTALL_DATA) $(CURDIR)/files/mixin.yaml $(1)/etc/mihomo/mixin.yaml
$(INSTALL_DIR) $(1)/etc/config

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,11 @@
#!/usr/sbin/nft -f
table ip mihomo {
set china_ip {
type ipv4_addr
flags interval
}
set private_ip {
type ipv4_addr
flags interval
@ -102,6 +107,7 @@ table ip mihomo {
chain mangle_prerouting {
type filter hook prerouting priority mangle; policy accept;
ip daddr @private_ip counter return
ip daddr @china_ip counter return
meta l4proto { tcp, udp } th dport 53 counter return
meta l4proto . ip saddr . th sport @redirect_exclusion counter return
meta l4proto . ip saddr . th sport @upnp_exclusion counter return
@ -112,6 +118,7 @@ table ip mihomo {
chain mangle_output {
type route hook output priority mangle; policy accept;
ip daddr @private_ip counter return
ip daddr @china_ip counter return
meta l4proto { tcp, udp } th dport 53 counter return
meta skuid $MIHOMO_USER counter return
meta l4proto . th sport @router_exclusion counter return

View File

@ -30,6 +30,9 @@ editor=$(uci -q get mihomo.editor); [ -z "$status" ] && uci set mihomo.editor=ed
# add mihomo.log
log=$(uci -q get mihomo.log); [ -z "$status" ] && uci set mihomo.log=log
# add mihomo.proxy.bypass_china_mainland_ip
bypass_china_mainland_ip=$(uci -q get mihomo.proxy.bypass_china_mainland_ip); [ -z "$bypass_china_mainland_ip" ] && uci set mihomo.proxy.bypass_china_mainland_ip=0
# commit
uci commit mihomo

View File

@ -13,6 +13,7 @@ config proxy 'proxy'
option 'router_proxy' '1'
option 'access_control_mode' ''
option 'dns_hijack' '1'
option 'bypass_china_mainland_ip' '0'
config subscription
option 'name' 'default'

View File

@ -246,6 +246,7 @@ start_service() {
local transparent_proxy dns_hijack
config_get_bool transparent_proxy "proxy" "transparent_proxy" 0
config_get_bool dns_hijack "proxy" "dns_hijack" 0
config_get_bool bypass_china_mainland_ip "proxy" "bypass_china_mainland_ip" 0
if [ "$transparent_proxy" == 1 ]; then
log "Transparent Proxy is enabled."
if [ "$dns_hijack" == 0 ]; then
@ -256,6 +257,11 @@ start_service() {
ip rule add fwmark "$fw_mark" table "$fw_table"
ip route add local default dev lo table "$fw_table"
nft -f "$home_dir/hijack.nft" -D FW_MARK="$fw_mark" -D MIHOMO_USER="$mihomo_user" -D TPROXY_PORT="$tproxy_port" -D DNS_PORT="$dns_port"
# bypass china mainland ip
if [ "$bypass_china_mainland_ip" == 1 ]; then
log "Transparent Proxy: Bypass china mainland ip is enabled."
nft -f "$home_dir/geoip-ipv4-cn.nft"
fi
# exclusion
log "Transparent Proxy: Add exclusions."
add_wan_inbound_exclusion