update 2024-11-13 00:25:36

This commit is contained in:
kenzok8 2024-11-13 00:25:36 +08:00
parent 9abb825643
commit e5cb6126a9
15 changed files with 98 additions and 64 deletions

View File

@ -66,7 +66,7 @@ Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
expr/socket.c \
--- /dev/null
+++ b/src/expr/fullcone.c
@@ -0,0 +1,165 @@
@@ -0,0 +1,172 @@
+/*
+ * (C) 2022 wongsyrone
+ *
@ -103,13 +103,13 @@ Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
+
+ switch (type) {
+ case NFTNL_EXPR_FULLCONE_FLAGS:
+ memcpy(&fullcone->flags, data, sizeof(fullcone->flags));
+ memcpy(&fullcone->flags, data, data_len);
+ break;
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MIN:
+ memcpy(&fullcone->sreg_proto_min, data, sizeof(fullcone->sreg_proto_min));
+ memcpy(&fullcone->sreg_proto_min, data, data_len);
+ break;
+ case NFTNL_EXPR_FULLCONE_REG_PROTO_MAX:
+ memcpy(&fullcone->sreg_proto_max, data, sizeof(fullcone->sreg_proto_max));
+ memcpy(&fullcone->sreg_proto_max, data, data_len);
+ break;
+ }
+ return 0;
@ -222,10 +222,17 @@ Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
+ return offset;
+}
+
+static struct attr_policy fullcone_attr_policy[__NFTNL_EXPR_FULLCONE_MAX] = {
+ [NFTNL_EXPR_FULLCONE_FLAGS] = { .maxlen = sizeof(uint32_t) },
+ [NFTNL_EXPR_FULLCONE_REG_PROTO_MIN] = { .maxlen = sizeof(uint32_t) },
+ [NFTNL_EXPR_FULLCONE_REG_PROTO_MAX] = { .maxlen = sizeof(uint32_t) },
+};
+
+struct expr_ops expr_ops_fullcone = {
+ .name = "fullcone",
+ .alloc_len = sizeof(struct nftnl_expr_fullcone),
+ .nftnl_max_attr = __NFTNL_EXPR_FULLCONE_MAX - 1,
+ .attr_policy = fullcone_attr_policy,
+ .set = nftnl_expr_fullcone_set,
+ .get = nftnl_expr_fullcone_get,
+ .parse = nftnl_expr_fullcone_parse,

View File

@ -113,7 +113,7 @@ return view.extend({
o.default = '0';
o.rmempty = false;
o = s.option(form.Flag, 'allow_wan', _('Allow Access From Internet'));
o = s.option(form.Flag, 'allow_wan', _('Open firewall port'));
o.rmempty = false;
o = s.option(form.Button, '_newpassword', _('Reset Password'),
@ -175,7 +175,7 @@ return view.extend({
o.rmempty = false;
o.depends('log', '1');
o = s.option(form.Value, 'log_max_size', _('Max Size'));
o = s.option(form.Value, 'log_max_size', _('Max Size (MB)'));
o.datatype = 'uinteger';
o.default = '10';
o.rmempty = false;

View File

@ -74,8 +74,8 @@ msgstr "网络存储"
msgid "User Manual"
msgstr "用户手册"
msgid "Allow Access From Internet"
msgstr "允许从外网访问"
msgid "Open firewall port"
msgstr "打开防火墙端口"
msgid "Enable Logs"
msgstr "启用日志"

View File

@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_MAINTAINER:=Thaolga <https://github.com/Thaolga/luci-app-nekobox>
PKG_NAME:=luci-app-nekobox
PKG_VERSION:=1.5.0
PKG_VERSION:=1.5.1
PKG_RELEASE:=cn
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@ -1,5 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v1.5.0">
<title>Current Version: v1.5.0</title>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v1.5.1">
<title>Current Version: v1.5.1</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
@ -15,7 +15,7 @@
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
<text aria-hidden="true" x="495" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="700" style="letter-spacing: -5;">Current Version</text>
<text x="495" y="140" transform="scale(.1)" fill="#fff" textLength="700" style="letter-spacing: -5;">Current Version</text>
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.5.0</text>
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.5.0</text>
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.5.1</text>
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.5.1</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

View File

@ -17,6 +17,8 @@ if (!file_exists($log_dir)) {
$start_script_template = <<<'EOF'
#!/bin/bash
export ENABLE_DEPRECATED_TUN_ADDRESS_X=true
SINGBOX_LOG="%s"
CONFIG_FILE="%s"
SINGBOX_BIN="%s"

View File

@ -187,7 +187,7 @@ $uiVersion = getUiVersion();
<div class="modal-body">
<div class="d-grid gap-2">
<button class="btn btn-info" onclick="showSingboxVersionSelector()">更新 Singbox 内核(官方稳定版)</button>
<button class="btn btn-success" onclick="selectOperation('sing-box')">更新 Singbox 内核(未编译版本</button>
<button class="btn btn-success" onclick="selectOperation('sing-box')">更新 Singbox 内核(官方测试版</button>
<button class="btn btn-success" onclick="selectOperation('puernya')">切换 Puernya 内核</button>
<button class="btn btn-primary" onclick="selectOperation('rule')">更新 Singbox 规则集</button>
<button class="btn btn-primary" onclick="selectOperation('config')">更新 Mihomo 配置文件</button>
@ -198,7 +198,7 @@ $uiVersion = getUiVersion();
</div>
<div class="modal fade" id="versionSelectionModal" tabindex="-1" aria-labelledby="versionSelectionModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="versionSelectionModalLabel">选择 Singbox 内核版本</h5>
@ -394,39 +394,59 @@ document.addEventListener('DOMContentLoaded', function() {
</script>
<script>
function checkVersion(buttonId, outputId, url) {
document.getElementById(outputId).innerHTML = '正在检查新版本...';
function checkVersion(buttonId, outputId, url) {
document.getElementById(outputId).innerHTML = '正在检查新版本...';
var xhr = new XMLHttpRequest();
xhr.open('GET', url + '?check_version=true', true);
xhr.onload = function() {
if (xhr.status === 200) {
document.getElementById(outputId).innerHTML = xhr.responseText;
var xhr = new XMLHttpRequest();
xhr.open('GET', url + '?check_version=true', true);
xhr.onload = function() {
if (xhr.status === 200) {
let responseText = xhr.responseText.trim();
const versionMatch = responseText.match(/最新版本:\s*([^\s]+)/);
if (versionMatch && versionMatch[1]) {
const newVersion = versionMatch[1];
document.getElementById(outputId).innerHTML = `最新版本: ${newVersion}`;
if (buttonId === 'checkSingboxButton') {
const select = document.getElementById('singboxVersionSelect');
let versionExists = Array.from(select.options).some(option => option.value === newVersion);
if (!versionExists) {
const newOption = document.createElement('option');
newOption.value = newVersion;
newOption.textContent = newVersion;
select.appendChild(newOption);
}
}
} else {
document.getElementById(outputId).innerHTML = '版本检测失败,请稍后重试。';
document.getElementById(outputId).innerHTML = '无法解析版本信息,请稍后重试。';
}
};
xhr.onerror = function() {
document.getElementById(outputId).innerHTML = '网络错误,请稍后重试';
};
xhr.send();
}
} else {
document.getElementById(outputId).innerHTML = '版本检测失败,请稍后重试。';
}
};
xhr.onerror = function() {
document.getElementById(outputId).innerHTML = '网络错误,请稍后重试';
};
xhr.send();
}
document.getElementById('checkCliverButton').addEventListener('click', function() {
checkVersion('checkCliverButton', 'NewCliver', 'update_script.php');
});
document.getElementById('checkSingboxButton').addEventListener('click', function() {
checkVersion('checkSingboxButton', 'NewSingbox', 'singbox.php');
});
document.getElementById('checkMihomoButton').addEventListener('click', function() {
checkVersion('checkMihomoButton', 'NewMihomo', 'core.php');
});
document.getElementById('checkCliverButton').addEventListener('click', function() {
checkVersion('checkCliverButton', 'NewCliver', 'update_script.php');
});
document.getElementById('checkSingboxButton').addEventListener('click', function() {
checkVersion('checkSingboxButton', 'NewSingbox', 'singbox.php');
});
document.getElementById('checkMihomoButton').addEventListener('click', function() {
checkVersion('checkMihomoButton', 'NewMihomo', 'core.php');
});
document.getElementById('checkUiButton').addEventListener('click', function() {
checkVersion('checkUiButton', 'NewUi', 'ui.php');
});
document.getElementById('checkUiButton').addEventListener('click', function() {
checkVersion('checkUiButton', 'NewUi', 'ui.php');
});
</script>
<script>

View File

@ -2,12 +2,6 @@
ini_set('memory_limit', '128M');
function logMessage($message) {
$logFile = '/var/log/sing-box_update.log';
$timestamp = date('Y-m-d H:i:s');
file_put_contents($logFile, "[$timestamp] $message\n", FILE_APPEND);
}
function getUiVersion() {
$versionFile = '/etc/neko/ui/metacubexd/version.txt';
@ -31,14 +25,12 @@ $curl_command = "curl -s -H 'User-Agent: PHP' --connect-timeout 10 " . escapeshe
$response = shell_exec($curl_command);
if ($response === false || empty($response)) {
logMessage("GitHub API 请求失败,可能是网络问题或 GitHub API 限制。");
die("GitHub API 请求失败。请检查网络连接或稍后重试。");
}
$data = json_decode($response, true);
if (json_last_error() !== JSON_ERROR_NONE) {
logMessage("解析 GitHub API 响应时出错: " . json_last_error_msg());
die("解析 GitHub API 响应时出错: " . json_last_error_msg());
}
@ -53,11 +45,7 @@ if (!is_dir($install_path)) {
$current_version = getUiVersion();
if (isset($_GET['check_version'])) {
if (trim($current_version) === trim($latest_version)) {
echo "当前版本已是最新: $current_version";
} else {
echo "最新版本: $latest_version";
}
echo "最新版本: $latest_version";
exit;
}

View File

@ -31,7 +31,7 @@ url_core="https://github.com/Thaolga/neko/releases/download/core_neko"
url_geo="https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest"
neko_ver(){
neko_version="1.5.0"
neko_version="1.5.1"
}
logs() {

View File

@ -16,7 +16,6 @@ s = m:section(TypedSection, "server_subscribe")
s.anonymous = true
o = s:option(Flag, "auto_update", translate("Auto Update"))
o.rmempty = false
o.description = translate("Auto Update Server subscription, GFW list and CHN route")
o = s:option(ListValue, "auto_update_week_time", translate("Update Time (Every Week)"))

View File

@ -9,7 +9,7 @@ require "luci.model.uci"
local icount = 0
local args = arg[1]
local uci = luci.model.uci.cursor()
local TMP_DNSMASQ_PATH = luci.sys.exec("find /tmp/dnsmasq*/dnsmasq-ssrplus.d -type d -print -quit 2>/dev/null")
local TMP_DNSMASQ_PATH = luci.sys.exec("find /tmp/dnsmasq.*/dnsmasq-ssrplus.d -type d -print 2>/dev/null"):gsub("%s+", "")
local TMP_PATH = "/var/etc/ssrplus"
-- match comments/title/whitelist/ip address/excluded_domain
local comment_pattern = "^[!\\[@]+"

View File

@ -3,8 +3,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-23 04:57+0200\n"
"PO-Revision-Date: 2022-05-15 17:03+0000\n"
"Last-Translator: MarioK239 <marios.k239@gmail.com>\n"
"PO-Revision-Date: 2024-11-09 08:59+0000\n"
"Last-Translator: Mac Mac <nofxmac@gmail.com>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationstransmission/el/>\n"
"Language: el\n"
@ -12,7 +12,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.13-dev\n"
"X-Generator: Weblate 5.8.2\n"
#: applications/luci-app-transmission/htdocs/luci-static/resources/view/transmission.js:65
msgid "Alternative download speed"
@ -195,7 +195,7 @@ msgstr ""
#: applications/luci-app-transmission/htdocs/luci-static/resources/view/transmission.js:38
msgid "Open Web Interface"
msgstr ""
msgstr "Άνοιγμα Ιστοσελίδας"
#: applications/luci-app-transmission/htdocs/luci-static/resources/view/transmission.js:153
msgid "PEX enabled"
@ -394,7 +394,7 @@ msgstr ""
#: applications/luci-app-transmission/root/usr/share/luci/menu.d/luci-app-transmission.json:3
msgid "Transmission"
msgstr ""
msgstr "Μετάδοση"
#: applications/luci-app-transmission/htdocs/luci-static/resources/view/transmission.js:42
msgid ""

View File

@ -0,0 +1,18 @@
--- a/tests/shell/run-tests.sh.rej
+++ /dev/null
@@ -1,15 +0,0 @@
---- run-tests.sh
-+++ run-tests.sh
-@@ -565,11 +565,8 @@ feature_probe()
- fi
-
- if [ -x "$with_path.sh" ] ; then
-- echo $with_path
- NFT="$NFT_REAL" $NFT_TEST_UNSHARE_CMD "$with_path.sh" &>/dev/null
-- RET=$?
-- echo $?
-- return $RET
-+ return $?
- fi
-
- return 1

View File

@ -21,13 +21,13 @@ define Download/geoip
HASH:=719260cdfc5b8d88e51a52d91cf5c9f8e89bdcc1820ba556bf1c8a10152f8496
endef
GEOSITE_VER:=20241111125054
GEOSITE_VER:=20241112092643
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
define Download/geosite
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
URL_FILE:=dlc.dat
FILE:=$(GEOSITE_FILE)
HASH:=78cd0aa72c131c4eb1296e77f3e95bf14b1dedb5d25bf9fa6564d30eec66e47b
HASH:=f04433837b88a3f49d7cd6517c91e8f5de4e4496f3d88ef3b7c6be5bb63f4c6f
endef
GEOSITE_IRAN_VER:=202411110034