Hide wireguard keys in base config (#1112)

This commit is contained in:
Tim Wilkinson 2024-03-06 10:24:03 -08:00 committed by GitHub
parent 2cda75e7ba
commit afbd22a5e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -80,7 +80,8 @@ local files = {
local sensitive = { local sensitive = {
"/etc/config/vtun", "/etc/config/vtun",
"/etc/config.mesh/vtun", "/etc/config.mesh/vtun",
"/etc/config/network" "/etc/config/network",
"/etc/config.mesh/wireguard"
} }
local cmds = { local cmds = {
"cat /proc/cpuinfo", "cat /proc/cpuinfo",
@ -158,6 +159,7 @@ do
line = line:gsub("option passwd.+", "option passwd '***HIDDEN***'\n") line = line:gsub("option passwd.+", "option passwd '***HIDDEN***'\n")
line = line:gsub("option public_key.+", "option public_key '***HIDDEN***'\n") line = line:gsub("option public_key.+", "option public_key '***HIDDEN***'\n")
line = line:gsub("option private_key.+", "option private_key '***HIDDEN***'\n") line = line:gsub("option private_key.+", "option private_key '***HIDDEN***'\n")
line = line:gsub("option key.+", "option key '***HIDDEN***'\n")
nlines[#nlines + 1] = line nlines[#nlines + 1] = line
end end
write_all(file, table.concat(nlines, "")) write_all(file, table.concat(nlines, ""))