diff --git a/beszel-agent/Makefile b/beszel-agent/Makefile
new file mode 100644
index 00000000..0a84710f
--- /dev/null
+++ b/beszel-agent/Makefile
@@ -0,0 +1,55 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=beszel-agent
+PKG_VERSION:=0.18.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)_linux_$(or $(BESZEL_GOARCH),arm64).tar.gz
+PKG_SOURCE_URL:=https://github.com/henrygd/beszel/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=skip
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/beszel-agent
+ SECTION:=admin
+ CATEGORY:=Administration
+ TITLE:=Beszel monitoring agent
+ URL:=https://github.com/henrygd/beszel
+endef
+
+define Package/beszel-agent/description
+ Lightweight server monitoring agent for Beszel hub
+endef
+
+define Build/Prepare
+ mkdir -p $(PKG_BUILD_DIR)
+ tar -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+ if command -v upx >/dev/null 2>&1; then \
+ upx --best --lzma $(PKG_BUILD_DIR)/beszel-agent || true; \
+ fi
+endef
+
+define Package/beszel-agent/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/beszel-agent $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/beszel-agent.init $(1)/etc/init.d/beszel-agent
+
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/beszel-agent.config $(1)/etc/config/beszel-agent
+endef
+
+define Package/beszel-agent/conffiles
+/etc/config/beszel-agent
+endef
+
+$(eval $(call BuildPackage,beszel-agent))
diff --git a/beszel-agent/files/beszel-agent.config b/beszel-agent/files/beszel-agent.config
new file mode 100644
index 00000000..74c2ac83
--- /dev/null
+++ b/beszel-agent/files/beszel-agent.config
@@ -0,0 +1,7 @@
+config agent 'agent'
+ option enabled '0'
+ option port '45876'
+ option public_key ''
+ option hub_url '' # optional, for outbound mode (websockets)
+ option token '' # optional, for outbound mode (websockets)
+
diff --git a/beszel-agent/files/beszel-agent.init b/beszel-agent/files/beszel-agent.init
new file mode 100644
index 00000000..c1cd0e6c
--- /dev/null
+++ b/beszel-agent/files/beszel-agent.init
@@ -0,0 +1,55 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=10
+
+USE_PROCD=1
+PROG=/usr/bin/beszel-agent
+
+start_service() {
+ local enabled port key url token
+
+ config_load 'beszel-agent'
+ config_get_bool enabled 'agent' 'enabled' '0'
+ config_get port 'agent' 'port' '45876'
+ config_get key 'agent' 'public_key' ''
+ config_get url 'agent' 'hub_url' ''
+ config_get token 'agent' 'token' ''
+
+ [ "$enabled" -eq 0 ] && return 0
+
+ [ -z "$key" ] && {
+ logger -t beszel-agent "Public key not set!"
+ return 1
+ }
+
+ if [ -n "$url" ] || [ -n "$token" ]; then
+ if [ -z "$url" ] || [ -z "$token" ]; then
+ logger -t beszel-agent "Outbound mode requires both hub_url and token, but only one set!"
+ return 1
+ fi
+ fi
+
+ procd_open_instance beszel-agent
+ procd_set_param command "$PROG" -listen "$port" -key "$key"
+ [ -n "$url" ] && [ -n "$token" ] && {
+ procd_append_param command -url "$url" -token "$token"
+ }
+ procd_set_param respawn 3600 5 5
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_set_param user root
+ procd_close_instance
+}
+
+stop_service() {
+ service_stop "$PROG"
+}
+
+reload_service() {
+ restart
+}
+
+service_triggers() {
+ procd_add_reload_trigger "beszel-agent"
+}
diff --git a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js
index 849ac297..f94405e5 100644
--- a/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js
+++ b/luci-app-fchomo/htdocs/luci-static/resources/view/fchomo/node.js
@@ -1272,14 +1272,14 @@ return view.extend({
so.depends({transport_enabled: '1', transport_type: 'xhttp'});
so.modalonly = true;
- so = ss.taboption('field_transport', form.Value, 'transport_xhttp_xmux_max_connections', _('XMUX: ') + _('Max connections'));
+ so = ss.taboption('field_transport', form.Value, 'transport_xhttp_xmux_max_concurrency', _('XMUX: ') + _('Max concurrency'));
so.placeholder = '16-32';
so.depends('transport_xhttp_xmux', '1');
so.modalonly = true;
- so = ss.taboption('field_transport', form.Value, 'transport_xhttp_xmux_max_concurrency', _('XMUX: ') + _('Max concurrency'));
+ so = ss.taboption('field_transport', form.Value, 'transport_xhttp_xmux_max_connections', _('XMUX: ') + _('Max connections'));
so.placeholder = '0';
- so.depends({transport_xhttp_xmux: '1', transport_xhttp_xmux_max_connections: ''});
+ so.depends({transport_xhttp_xmux: '1', transport_xhttp_xmux_max_concurrency: ''});
so.modalonly = true;
so = ss.taboption('field_transport', form.Value, 'transport_xhttp_xmux_max_reuse_times', _('XMUX: ') + _('Max reuse times'));
@@ -1689,11 +1689,14 @@ return view.extend({
so.depends({type: 'inline', '!reverse': true});
so.modalonly = true;
- so = ss.taboption('field_override', form.Flag, 'override_skip_cert_verify', _('Skip cert verify'),
+ so = ss.taboption('field_override', form.ListValue, 'override_skip_cert_verify', _('Skip cert verify'),
_('Donot verifying server certificate.') +
'
' +
_('This is DANGEROUS, your traffic is almost like PLAIN TEXT! Use at your own risk!'));
- so.default = so.disabled;
+ so.default = '';
+ so.value('', _('Keep default'));
+ so.value('1', _('Yes'));
+ so.value('0', _('No'));
so.depends({type: 'inline', '!reverse': true});
so.modalonly = true;
diff --git a/luci-app-fchomo/root/usr/share/fchomo/generate_client.uc b/luci-app-fchomo/root/usr/share/fchomo/generate_client.uc
index 4926e297..5aef8c60 100644
--- a/luci-app-fchomo/root/usr/share/fchomo/generate_client.uc
+++ b/luci-app-fchomo/root/usr/share/fchomo/generate_client.uc
@@ -671,8 +671,8 @@ uci.foreach(uciconf, ucinode, (cfg) => {
"x-padding-bytes": cfg.transport_xhttp_x_padding_bytes,
"sc-max-each-post-bytes": strToInt(cfg.transport_xhttp_sc_max_each_post_bytes) || null,
"reuse-settings": cfg.transport_xhttp_xmux ? {
- "max-connections": cfg.transport_xhttp_xmux_max_connections,
"max-concurrency": cfg.transport_xhttp_xmux_max_concurrency,
+ "max-connections": cfg.transport_xhttp_xmux_max_connections,
"c-max-reuse-times": cfg.transport_xhttp_xmux_max_reuse_times,
"h-max-request-times": cfg.transport_xhttp_xmux_max_request_times,
"h-max-reusable-secs": cfg.transport_xhttp_xmux_max_reusable_secs
@@ -782,11 +782,11 @@ uci.foreach(uciconf, uciprov, (cfg) => {
// Configuration Items
tfo: strToBool(cfg.override_tfo),
mptcp: strToBool(cfg.override_mptcp),
- udp: (cfg.override_udp === '0') ? false : true,
+ udp: (cfg.override_udp === '0') ? null : true,
"udp-over-tcp": strToBool(cfg.override_uot),
up: cfg.override_up ? cfg.override_up + ' Mbps' : null,
down: cfg.override_down ? cfg.override_down + ' Mbps' : null,
- "skip-cert-verify": strToBool(cfg.override_skip_cert_verify) || false,
+ "skip-cert-verify": cfg.override_skip_cert_verify ? strToBool(cfg.override_skip_cert_verify) || false : null,
"dialer-proxy": dialerproxy[cfg['.name']]?.detour,
"interface-name": cfg.override_interface_name,
"routing-mark": strToInt(cfg.override_routing_mark) || null,
diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua
index e7d7e2c6..5ec65fd5 100644
--- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua
+++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua
@@ -12,7 +12,8 @@ local local_version = api.get_app_version("sing-box"):match("[^v]+")
local version_ge_1_13_0 = api.compare_versions(local_version, ">=", "1.13.0")
local GLOBAL = {
- DNS_SERVER = {}
+ DNS_SERVER = {},
+ VPS_EXCLUDE = {}
}
local GEO_VAR = {
@@ -159,7 +160,6 @@ function gen_outbound(flag, node, tag, proxy_table)
}
if api.datatypes.hostname(node.address) and node.domain_resolver and (node.domain_resolver_dns or node.domain_resolver_dns_https) then
- local dns_tag = node_id .. "_dns"
local dns_proto = node.domain_resolver
local server_address
local server_port
@@ -168,12 +168,8 @@ function gen_outbound(flag, node, tag, proxy_table)
local _a = api.parseURL(node.domain_resolver_dns_https)
if _a then
server_address = _a.hostname
- if _a.port then
- server_port = _a.port
- else
- server_port = 443
- end
- server_path = _a.pathname
+ server_port = _a.port or 443
+ server_path = _a.pathname or ""
end
else
server_address = node.domain_resolver_dns
@@ -184,19 +180,28 @@ function gen_outbound(flag, node, tag, proxy_table)
server_port = tonumber(split[#split])
end
end
- GLOBAL.DNS_SERVER[node_id] = {
- server = {
- tag = dns_tag,
- type = dns_proto,
- server = server_address,
- server_port = server_port,
- path = server_path,
- domain_resolver = "direct",
- detour = "direct"
- },
- domain = node.address
- }
- result.domain_resolver.server = dns_tag
+ local dns_key = dns_proto .. "|" .. tostring(server_address) .. "|" .. tostring(server_port) .. "|" .. tostring(server_path or "")
+ if not GLOBAL.DNS_SERVER[dns_key] then
+ GLOBAL.DNS_SERVER[dns_key] = {
+ server = {
+ tag = "dns-node-" .. api.gen_short_uuid(),
+ type = dns_proto,
+ server = server_address,
+ server_port = server_port,
+ path = server_path,
+ domain_resolver = "direct",
+ detour = "direct"
+ },
+ domain = {}
+ }
+ end
+ local exists
+ for _, d in ipairs(GLOBAL.DNS_SERVER[dns_key].domain) do
+ if d == node.address then exists = true; break end
+ end
+ if not exists then table.insert(GLOBAL.DNS_SERVER[dns_key].domain, node.address) end
+ result.domain_resolver.server = GLOBAL.DNS_SERVER[dns_key].server.tag
+ GLOBAL.VPS_EXCLUDE[node.address] = true
end
local tls = nil
@@ -1766,12 +1771,8 @@ function gen_config(var)
remote_server.type = "h3"
end
remote_server.server = _a.hostname
- if _a.port then
- remote_server.server_port = _a.port
- else
- remote_server.server_port = 443
- end
- remote_server.path = _a.pathname
+ remote_server.server_port = _a.port or 443
+ remote_server.path = _a.pathname or ""
end
if remote_dns_doh_ip and remote_dns_doh_host ~= remote_dns_doh_ip and not api.is_ip(remote_dns_doh_host) then
local domains = {}
@@ -1825,9 +1826,11 @@ function gen_config(var)
if direct_dns_udp_server or direct_dns_tcp_server then
local domain = {}
- local nodes_domain_text = sys.exec('uci show passwall | grep ".address=" | cut -d "\'" -f 2 | grep "[a-zA-Z]$" | sort -u')
+ local nodes_domain_text = sys.exec([[uci show passwall | sed -n "s/.*\.address='\([^']*\)'/\1/p" | sort -u]])
string.gsub(nodes_domain_text, '[^' .. "\r\n" .. ']+', function(w)
- table.insert(domain, w)
+ if w and w ~= "" and api.datatypes.hostname(w) and not GLOBAL.VPS_EXCLUDE[w] then
+ table.insert(domain, w)
+ end
end)
if #domain > 0 then
table.insert(dns_domain_rules, 1, {
@@ -1970,9 +1973,11 @@ function gen_config(var)
for i, v in pairs(GLOBAL.DNS_SERVER) do
table.insert(dns.servers, v.server)
if not dns.rules then dns.rules = {} end
- table.insert(dns.rules, {
+ table.insert(dns.rules, 1, {
action = "route",
server = v.server.tag,
+ disable_cache = false,
+ rewrite_ttl = 30,
domain = v.domain,
})
end
diff --git a/luci-app-passwall/luasrc/passwall/util_xray.lua b/luci-app-passwall/luasrc/passwall/util_xray.lua
index 7e010993..634b32a2 100644
--- a/luci-app-passwall/luasrc/passwall/util_xray.lua
+++ b/luci-app-passwall/luasrc/passwall/util_xray.lua
@@ -8,7 +8,8 @@ local fs = api.fs
local GLOBAL = {
DNS_SERVER = {},
- DNS_HOSTNAME = {}
+ DNS_HOSTNAME = {},
+ VPS_EXCLUDE = {}
}
local xray_version = api.get_app_version("xray")
@@ -405,7 +406,6 @@ function gen_outbound(flag, node, tag, proxy_table)
end
if api.datatypes.hostname(node.address) and node.domain_resolver and (node.domain_resolver_dns or node.domain_resolver_dns_https) then
- local dns_tag = node_id .. "_dns"
local dns_proto = node.domain_resolver
local config_address
local config_port
@@ -413,20 +413,14 @@ function gen_outbound(flag, node, tag, proxy_table)
local _a = api.parseURL(node.domain_resolver_dns_https)
if _a then
config_address = node.domain_resolver_dns_https
- if _a.port then
- config_port = _a.port
- else
- config_port = 443
- end
- if _a.hostname then
- if api.datatypes.hostname(_a.hostname) then
- GLOBAL.DNS_HOSTNAME[_a.hostname] = true
- end
+ config_port = _a.port or 443
+ if _a.hostname and api.datatypes.hostname(_a.hostname) then
+ GLOBAL.DNS_HOSTNAME[_a.hostname] = true
end
end
else
local server_address = node.domain_resolver_dns
- local config_port = 53
+ config_port = 53
local split = api.split(server_address, ":")
if #split > 1 then
server_address = split[1]
@@ -437,13 +431,27 @@ function gen_outbound(flag, node, tag, proxy_table)
config_address = dns_proto .. "://" .. server_address .. ":" .. config_port
end
end
- GLOBAL.DNS_SERVER[node_id] = {
- tag = dns_tag,
- queryStrategy = node.domain_strategy or "UseIP",
- address = config_address,
- port = config_port,
- domains = {"full:" .. node.address}
- }
+ local dns_key = dns_proto .. "|" .. config_address .. "|" .. tostring(config_port)
+ if not GLOBAL.DNS_SERVER[dns_key] then
+ GLOBAL.DNS_SERVER[dns_key] = {
+ tag = "dns-node-" .. api.gen_short_uuid(),
+ queryStrategy = node.domain_strategy or "UseIP",
+ address = config_address,
+ port = config_port,
+ finalQuery = true,
+ disableCache = false,
+ serveStale = true,
+ serveExpiredTTL = 30,
+ domains = {}
+ }
+ end
+ local exists
+ local domain = "full:" .. node.address
+ for _, d in ipairs(GLOBAL.DNS_SERVER[dns_key].domains) do
+ if d == domain then exists = true; break end
+ end
+ if not exists then table.insert(GLOBAL.DNS_SERVER[dns_key].domains, domain) end
+ GLOBAL.VPS_EXCLUDE[node.address] = true
end
end
return result
@@ -1509,7 +1517,8 @@ function gen_config(var)
disableFallbackIfMatch = true,
servers = {},
clientIp = (remote_dns_client_ip and remote_dns_client_ip ~= "") and remote_dns_client_ip or nil,
- queryStrategy = "UseIP"
+ queryStrategy = "UseIP",
+ useSystemHosts = true
}
local _direct_dns = {
@@ -1521,9 +1530,11 @@ function gen_config(var)
if direct_dns_udp_server or direct_dns_tcp_server then
local domain = {}
- local nodes_domain_text = sys.exec('uci show passwall | grep ".address=" | cut -d "\'" -f 2 | grep "[a-zA-Z]$" | sort -u')
+ local nodes_domain_text = sys.exec([[uci show passwall | sed -n "s/.*\.\(address\|download_address\)='\([^']*\)'/\2/p" | sort -u]])
string.gsub(nodes_domain_text, '[^' .. "\r\n" .. ']+', function(w)
- table.insert(domain, w)
+ if w and w ~= "" and api.datatypes.hostname(w) and not GLOBAL.VPS_EXCLUDE[w] then
+ table.insert(domain, "full:" .. w)
+ end
end)
if #domain > 0 then
table.insert(dns_domain_rules, 1, {
@@ -1763,9 +1774,10 @@ function gen_config(var)
if #node_dns > 0 and #dns.servers < 1 then
dns.servers = { "localhost" }
end
+ local idx = dns_listen_port and 2 or 1
for i = #node_dns, 1, -1 do
local value = node_dns[i]
- table.insert(routing.rules, 1, {
+ table.insert(routing.rules, idx, {
inboundTag = {
value.server.tag
},
@@ -1784,7 +1796,7 @@ function gen_config(var)
queryStrategy = "UseIPv4",
domains = hostname
})
- table.insert(routing.rules, 1, {
+ table.insert(routing.rules, idx, {
inboundTag = { "bootstrap" },
outboundTag = "direct"
})
diff --git a/naiveproxy/Makefile b/naiveproxy/Makefile
index 60876538..8c92c3ac 100644
--- a/naiveproxy/Makefile
+++ b/naiveproxy/Makefile
@@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=naiveproxy
-PKG_VERSION:=143.0.7499.109
-PKG_RELEASE:=2
+PKG_VERSION:=147.0.7727.49
+PKG_RELEASE:=1
ARCH_PREBUILT:=$(ARCH_PACKAGES)
diff --git a/netdata/Makefile b/netdata/Makefile
index 68c86a6b..f8cf5f18 100644
--- a/netdata/Makefile
+++ b/netdata/Makefile
@@ -8,8 +8,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=netdata
-PKG_VERSION:=2.10.0
-PKG_RELEASE:=7
+PKG_VERSION:=2.10.1
+PKG_RELEASE:=8
PKG_MAINTAINER:=Josef Schlehofer , Daniel Engberg
PKG_LICENSE:=GPL-3.0-or-later