fix(network): скрыть GRE PSK и сохранить признак IPsec
This commit is contained in:
1 parent
a404da768d
commit
3f3f06f147
24 files changed
+1570
-23
No files matched your search
+4
-1
@@ -17,7 +17,10 @@ export function generateGreRsc(t: GreTunnel, servers: Record<string, Server>): s
|
||||
"comment=" + quoteRosString(t.comment),
|
||||
]
|
||||
if (t.localAddress && t.localAddress !== "0.0.0.0") args.push("local-address=" + quoteRosString(t.localAddress))
|
||||
if (t.ipsec) args.push("ipsec-secret=" + quoteRosString(t.ipsec.secret))
|
||||
if (t.ipsec) {
|
||||
if (!t.ipsec.secret) lines.push("# Шаблон: ключ IPsec не раскрыт. Перед применением замените <IPSEC_PSK> своим ключом.")
|
||||
args.push("ipsec-secret=" + quoteRosString(t.ipsec.secret || "<IPSEC_PSK>"))
|
||||
}
|
||||
lines.push("/interface/gre/add " + args.join(" "))
|
||||
if (t.localInnerIp) lines.push("/ip/address/add address=" + quoteRosString(t.localInnerIp) + " interface=" + quoteRosString(t.name))
|
||||
if (t.ipsec) lines.push("# Peer/policy создаёт RouterOS по ipsec-secret; ручные объекты IPsec не экспортируются")
|
||||
|
||||
Reference in new issue
Block a user