From ac97aa196dc036c6995265b15ce89ed223d6ecd1 Mon Sep 17 00:00:00 2001 From: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Thu, 23 Apr 2026 20:30:30 +0800 Subject: [PATCH] Add files via upload --- .github/diy/patches/luci-base.patch | 208 +++++++++++++++++++++ .github/diy/patches/luci-mod-network.patch | 12 ++ .github/diy/patches/luci-mod-status.patch | 107 +++++++++++ .github/diy/patches/luci-mod-system.patch | 48 +++++ 4 files changed, 375 insertions(+) create mode 100644 .github/diy/patches/luci-base.patch create mode 100644 .github/diy/patches/luci-mod-network.patch create mode 100644 .github/diy/patches/luci-mod-status.patch create mode 100644 .github/diy/patches/luci-mod-system.patch diff --git a/.github/diy/patches/luci-base.patch b/.github/diy/patches/luci-base.patch new file mode 100644 index 000000000..77021edac --- /dev/null +++ b/.github/diy/patches/luci-base.patch @@ -0,0 +1,208 @@ +--- a/luci-base/root/usr/share/rpcd/ucode/luci ++++ b/luci-base/root/usr/share/rpcd/ucode/luci +@@ -223,6 +223,7 @@ const methods = { + + getFeatures: { + call: function() { ++ let kernel_version = popen('echo -n `uname -r`').read('all'); + let result = { + firewall: access('/sbin/fw3') == true, + firewall4: access('/sbin/fw4') == true, +@@ -230,7 +231,7 @@ const methods = { + bonding: access('/sys/module/bonding'), + mii_tool: access('/usr/sbin/mii-tool'), + offloading: access('/sys/module/xt_FLOWOFFLOAD/refcnt') == true || access('/sys/module/nft_flow_offload/refcnt') == true, +- fullcone: access('/sys/module/xt_FULLCONENAT/refcnt') == true || access('/sys/module/nft_fullcone/refcnt') == true, ++ fullcone: access(`/lib/modules/${kernel_version}/xt_FULLCONENAT.ko`) == true || access(`/lib/modules/${kernel_version}/nft_fullcone.ko`) == true, + br2684ctl: access('/usr/sbin/br2684ctl') == true, + swconfig: access('/sbin/swconfig') == true, + zram: access('/sys/class/zram-control') == true, + +--- a/luci-base/htdocs/luci-static/resources/network.js ++++ b/luci-base/htdocs/luci-static/resources/network.js +@@ -4376,4 +4376,10 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */ + } + }); + ++setTimeout(function(){ ++try{ ++ document.getElementsByClassName('cbi-button-apply')[0].children[3].children[0].value='1' ++}catch(err) { ++}},1000) ++ + return Network; + +--- a/luci-base/ucode/dispatcher.uc ++++ b/luci-base/ucode/dispatcher.uc +@@ -939,7 +939,12 @@ dispatch = function(_http, path) { + let cookie_name = (http.getenv('HTTPS') == 'on') ? 'sysauth_https' : 'sysauth_http', + cookie_secure = (http.getenv('HTTPS') == 'on') ? '; secure' : ''; + +- http.header('Set-Cookie', `${cookie_name}=${session.sid}; path=${build_url()}; SameSite=strict; HttpOnly${cookie_secure}`); ++ let cookie_p = uci.get('wizard', 'default', 'cookie_p'); ++ if (cookie_p == '0') { ++ http.header('Set-Cookie', `${cookie_name}=${session.sid}; path=${build_url()}; SameSite=strict; HttpOnly${cookie_secure}`); ++ } else { ++ http.header('Set-Cookie', `${cookie_name}=${session.sid}; Max-Age=2147483647; path=${build_url()}; SameSite=strict; HttpOnly${cookie_secure}`); ++ } + http.redirect(build_url(...resolved.ctx.request_path)); + + return; + +--- a/luci-base/root/www/index.html ++++ b/luci-base/root/www/index.html +@@ -15,6 +15,5 @@ + + +
+- LuCI - Lua Configuration Interface + +