update 2024-11-26 00:26:20

This commit is contained in:
kenzok8 2024-11-26 00:26:20 +08:00
parent 3a508acfcd
commit 226c6e14d8
8 changed files with 67 additions and 10 deletions

View File

@ -1,14 +1,20 @@
msgid ""
msgstr ""
"PO-Revision-Date: 2024-11-19 09:25+0000\n"
"Last-Translator: Phantomwise <phantomwise67@protonmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationsfilebrowser/fr/>\n"
"Language: fr\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 5.9-dev\n"
#: applications/luci-app-filebrowser/htdocs/luci-static/resources/view/system/filebrowser.js:16
#: applications/luci-app-filebrowser/root/usr/share/luci/menu.d/luci-app-filebrowser.json:3
msgid "File Browser"
msgstr ""
msgstr "Explorateur de fichiers"
#: applications/luci-app-filebrowser/root/usr/share/rpcd/acl.d/luci-app-filebrowser.json:3
msgid "Grant access to File Browser"
msgstr ""
msgstr "Autoriser l'accès à l'explorateur de fichiers"

View File

@ -1,13 +1,19 @@
msgid ""
msgstr ""
"PO-Revision-Date: 2024-11-18 14:09+0000\n"
"Last-Translator: 少年ウィンド <k236michaeimm@gmail.com>\n"
"Language-Team: Chinese (Traditional Han script) <https://hosted.weblate.org/"
"projects/openwrt/luciapplicationsfilebrowser/zh_Hant/>\n"
"Language: zh_Hant\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 5.9-dev\n"
#: applications/luci-app-filebrowser/htdocs/luci-static/resources/view/system/filebrowser.js:16
#: applications/luci-app-filebrowser/root/usr/share/luci/menu.d/luci-app-filebrowser.json:3
msgid "File Browser"
msgstr ""
msgstr "檔案瀏覽器"
#: applications/luci-app-filebrowser/root/usr/share/rpcd/acl.d/luci-app-filebrowser.json:3
msgid "Grant access to File Browser"

View File

@ -45,6 +45,10 @@ if ($return_var !== 0 || !file_exists($local_file)) {
}
echo "<script>appendLog('下载完成。');</script>";
echo "<script>appendLog('更新软件包列表...');</script>";
$output = shell_exec("opkg update");
echo "<pre>$output</pre>";
echo "<script>appendLog('开始安装...');</script>";
$output = shell_exec("opkg install --force-reinstall " . escapeshellarg($local_file));
echo "<pre>$output</pre>";

View File

@ -3,6 +3,7 @@
CLCyan="\033[36m"
CLWhite="\033[37m"
CLYellow="\033[33m"
CLGreen="\033[32m"
GREEN="\033[32m"
RED="\033[31m"
NC="\033[0m"
@ -609,6 +610,15 @@ main_menu() {
local language=${1:-"en"}
while true; do
show_menu "$language"
if [ "$language" = "cn" ]; then
echo -e "${CLGreen}注意: 执行 1. 安装 NeKoBox 后,正常情况下无需单独安装 UI 控制面板和 PHP8只有缺少依赖时才需要安装。${NC}"
else
echo -e "${CLGreen}Note: After executing 1. Install NeKoBox, you generally do not need to install UI Control Panel and PHP8, unless dependencies are missing.${NC}"
fi
echo -e "${CLCyan}╠════════════════════════════════════════════════════════╣"
if [ "$language" = "cn" ]; then
read -p "请输入选项并按回车: " choice
else

View File

@ -141,6 +141,16 @@ function stream_splithttp(server) {
return null;
}
function stream_httpupgrade(server) {
if (server["transport"] == "httpupgrade") {
return {
path: server["httpupgrade_path"],
host: server["httpupgrade_host"],
};
}
return null;
}
export function port_array(i) {
if (type(i) === 'array') {
return map(i, v => int(v));
@ -168,7 +178,6 @@ export function stream_settings(server, protocol, tag) {
stream_settings: {
network: server["transport"],
sockopt: {
mark: 253,
domainStrategy: server["domain_strategy"] || "UseIP",
dialerProxy: dialer_proxy_tag
},
@ -181,7 +190,8 @@ export function stream_settings(server, protocol, tag) {
wsSettings: stream_ws(server),
grpcSettings: stream_grpc(server),
httpSettings: stream_h2(server),
splithttpSettings: stream_splithttp(server)
splithttpSettings: stream_splithttp(server),
httpupgradeSettings: stream_httpupgrade(server)
},
dialer_proxy: dialer_proxy
};

View File

@ -7,6 +7,9 @@ import { trojan_outbound } from "../protocol/trojan.mjs";
import { vless_outbound } from "../protocol/vless.mjs";
import { vmess_outbound } from "../protocol/vmess.mjs";
const direct_mark = 252;
const outbound_mark = 253;
function override_custom_config_recursive(x, y) {
if (type(x) != "object" || type(y) != "object") {
return y;
@ -41,12 +44,17 @@ function server_outbound_recursive(t, server, tag, config) {
if (custom_config_outbound_string != null && custom_config_outbound_string != "") {
const custom_config_outbound = json(custom_config_outbound_string);
for (let k in custom_config_outbound) {
if (k == "tag") {
continue;
}
outbound[k] = override_custom_config_recursive(outbound[k], custom_config_outbound[k]);
}
}
outbound["tag"] = tag;
if (type(outbound["streamSettings"]) != "object") {
outbound["streamSettings"] = {};
}
if (type(outbound["streamSettings"]["sockopt"]) != "object") {
outbound["streamSettings"]["sockopt"] = {};
}
outbound["streamSettings"]["sockopt"]["mark"] = outbound_mark;
const dialer_proxy = outbound_result["dialer_proxy"];
const result = [...t, outbound];
@ -68,7 +76,7 @@ export function direct_outbound(tag, redirect) {
},
streamSettings: {
sockopt: {
mark: 252,
mark: direct_mark,
}
}
};

View File

@ -252,7 +252,7 @@ return view.extend({
ss.tab('custom', _('Custom Options'));
o = ss.taboption('custom', form.TextValue, 'custom_config', _('Custom Configurations'), _('Configurations here override settings in the previous tabs with the following rules: <ol><li>Object values will be replaced recursively so settings in previous tabs matter.</li><li>Arrays will be replaced entirely instead of being merged.</li><li>Tag <code>tag</code> is ignored. </li></ol>Override rules here may be changed later. Use this only for experimental or pre-release features.'));
o = ss.taboption('custom', form.TextValue, 'custom_config', _('Custom Configurations'), _('Configurations here override settings in the previous tabs with the following rules: <ol><li>Object values will be replaced recursively so settings in previous tabs matter.</li><li>Arrays will be replaced entirely instead of being merged.</li><li>Tag <code>tag</code> and mark <code>streamSettings.sockopt.mark</code> is ignored. </li></ol>Override rules here may be changed later. Use this only for experimental or pre-release features.'));
o.modalonly = true;
o.monospace = true;
o.rows = 10;

View File

@ -184,6 +184,18 @@ function transport_grpc(transport, sub_section, tab_name) {
grpc_initial_windows_size.datatype = 'integer';
}
function transport_httpupgrade(transport, sub_section, tab_name) {
transport.value("httpupgrade", "HTTPUpgrade");
let httpupgrade_host = sub_section.taboption(tab_name, form.Value, "httpupgrade_host", _("[httpupgrade] Host"));
httpupgrade_host.depends("transport", "httpupgrade");
httpupgrade_host.modalonly = true;
let httpupgrade_path = sub_section.taboption(tab_name, form.Value, "httpupgrade_path", _("[httpupgrade] Path"));
httpupgrade_path.depends("transport", "httpupgrade");
httpupgrade_path.modalonly = true;
}
function transport_splithttp(transport, sub_section, tab_name) {
transport.value("splithttp", "SplitHTTP");
@ -205,5 +217,6 @@ return baseclass.extend({
transport_quic(transport, sub_section, tab_name);
transport_grpc(transport, sub_section, tab_name);
transport_splithttp(transport, sub_section, tab_name);
transport_httpupgrade(transport, sub_section, tab_name);
}
});