Update On Wed Nov 12 19:37:33 CET 2025

This commit is contained in:
github-action[bot]
2025-11-12 19:37:33 +01:00
parent 923627574b
commit cd9974abe8
283 changed files with 59529 additions and 2168 deletions

View File

@@ -134,10 +134,10 @@ local api = require "luci.passwall2.api"
setTimeout(function () {
if (confirm("<%: Are you sure you want to restore the client to default settings?%>")) {
var xhr1 = new XMLHttpRequest();
xhr1.open("GET",'<%= api.url("clear_log") %>', true);
xhr1.open("GET",'<%= api.url("clear_log") %>', false);
xhr1.send();
var xhr2 = new XMLHttpRequest();
xhr2.open("GET",'<%= api.url("reset_config") %>', true);
xhr2.open("GET",'<%= api.url("reset_config") %>', false);
xhr2.send();
window.location.href = '<%= api.url("log") %>'
}

View File

@@ -659,6 +659,21 @@ table td, .table .td {
cbi_t_switch("passwall2.nodes", default_group)
}
//clear expire data
if (localStorage && localStorage.length > 0) {
const now = Date.now();
for (let i = 0; i < localStorage.length; i++) {
let key = localStorage.key(i);
if (key && (key.startsWith("icmp") || key.startsWith("tcping"))) {
let value_str = localStorage.getItem(key);
const value = JSON.parse(value_str);
if (!(value && value.savetime && (now - value.timestamp) < value.savetime)) {
localStorage.removeItem(key);
}
}
}
}
get_now_use_node();
pingAllNodes();