fix(ipsec): обеспечить NAT и изоляцию политик для передачи данных
This commit is contained in:
1 parent
43b00e0740
commit
89de7e134b
17 files changed
+571
-25
No files matched your search
@@ -63,6 +63,7 @@ export interface RosIpsecIdentity {
|
||||
"remote-id"?: string
|
||||
"mode-config"?: string
|
||||
"generate-policy"?: string
|
||||
"policy-template-group"?: string
|
||||
disabled?: string
|
||||
comment?: string
|
||||
}
|
||||
@@ -102,6 +103,9 @@ export interface RosFirewallNat {
|
||||
action?: string
|
||||
"src-address"?: string
|
||||
comment?: string
|
||||
"out-interface"?: string
|
||||
"out-interface-list"?: string
|
||||
"ipsec-policy"?: string
|
||||
}
|
||||
|
||||
export interface RosIpsecActivePeer {
|
||||
@@ -456,6 +460,7 @@ export async function captureIpsecSnapshot(server: ServerRow): Promise<IpsecSnap
|
||||
remoteId: (i["remote-id"] ?? "").trim(),
|
||||
modeConfig: (i["mode-config"] ?? "").trim(),
|
||||
generatePolicy: (i["generate-policy"] ?? "").trim(),
|
||||
policyTemplateGroup: i["policy-template-group"],
|
||||
comment: (i.comment ?? "").trim(),
|
||||
disabled: asBool(i.disabled),
|
||||
})),
|
||||
@@ -489,6 +494,9 @@ export async function captureIpsecSnapshot(server: ServerRow): Promise<IpsecSnap
|
||||
chain: (n.chain ?? "").trim(),
|
||||
action: (n.action ?? "").trim(),
|
||||
srcAddress: (n["src-address"] ?? "").trim(),
|
||||
outInterface: n["out-interface"],
|
||||
outInterfaceList: n["out-interface-list"],
|
||||
ipsecPolicy: n["ipsec-policy"],
|
||||
comment: (n.comment ?? "").trim(),
|
||||
})),
|
||||
})
|
||||
@@ -534,6 +542,7 @@ export async function fetchIpsecRestoreState(server: ServerRow): Promise<{
|
||||
remoteId: (i["remote-id"] ?? "").trim(),
|
||||
modeConfig: (i["mode-config"] ?? "").trim(),
|
||||
generatePolicy: (i["generate-policy"] ?? "").trim(),
|
||||
policyTemplateGroup: i["policy-template-group"],
|
||||
comment: (i.comment ?? "").trim(),
|
||||
disabled: asBool(i.disabled),
|
||||
})),
|
||||
@@ -559,6 +568,9 @@ export async function fetchIpsecRestoreState(server: ServerRow): Promise<{
|
||||
chain: (n.chain ?? "").trim(),
|
||||
action: (n.action ?? "").trim(),
|
||||
srcAddress: (n["src-address"] ?? "").trim(),
|
||||
outInterface: n["out-interface"],
|
||||
outInterfaceList: n["out-interface-list"],
|
||||
ipsecPolicy: n["ipsec-policy"],
|
||||
comment: (n.comment ?? "").trim(),
|
||||
})),
|
||||
snapshot: await captureIpsecSnapshot(server),
|
||||
|
||||
Reference in new issue
Block a user