Commit d873d159 authored by nanahira's avatar nanahira

add bad udp

parent 62af34a4
......@@ -49,6 +49,7 @@ interface Gateway {
pccRules?: Rule[];
noOut: boolean;
hidden: boolean;
badUdp: boolean;
redirectAllPorts: boolean;
}
......@@ -138,7 +139,7 @@ class InventoryBuilder {
const gateways = await this.load('gateways2');
for (let gateway of gateways) {
gateway.isCN = this.hosts[gateway.router] && this.hosts[gateway.router].location.startsWith('CN');
for (const boolField of ['hidden', 'redirectAllPorts', 'noOut']) {
for (const boolField of ['hidden', 'redirectAllPorts', 'noOut', 'badUdp']) {
gateway[boolField] = !!gateway[boolField]
}
if (gateway.mark) {
......@@ -544,7 +545,7 @@ class InventoryBuilder {
if (ocType === 'client') {
let startupCommand = `echo "${this.vars.ocservPassword}" | openconnect --user=${remoteName} --passwd-on-stdin --passtos --interface=${name} --mtu=${mtu} ${remoteAddress}:${remoteOcservPort}`;
if (params.p === "tcp") {
if (params.p === "tcp" || remoteGateway.badUdp) {
startupCommand += ' --no-dtls';
}
const containerName = `openconnect-${name}`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment