Commit d873d159 authored by nanahira's avatar nanahira

add bad udp

parent 62af34a4
...@@ -49,6 +49,7 @@ interface Gateway { ...@@ -49,6 +49,7 @@ interface Gateway {
pccRules?: Rule[]; pccRules?: Rule[];
noOut: boolean; noOut: boolean;
hidden: boolean; hidden: boolean;
badUdp: boolean;
redirectAllPorts: boolean; redirectAllPorts: boolean;
} }
...@@ -138,7 +139,7 @@ class InventoryBuilder { ...@@ -138,7 +139,7 @@ class InventoryBuilder {
const gateways = await this.load('gateways2'); const gateways = await this.load('gateways2');
for (let gateway of gateways) { for (let gateway of gateways) {
gateway.isCN = this.hosts[gateway.router] && this.hosts[gateway.router].location.startsWith('CN'); 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] gateway[boolField] = !!gateway[boolField]
} }
if (gateway.mark) { if (gateway.mark) {
...@@ -544,7 +545,7 @@ class InventoryBuilder { ...@@ -544,7 +545,7 @@ class InventoryBuilder {
if (ocType === 'client') { if (ocType === 'client') {
let startupCommand = `echo "${this.vars.ocservPassword}" | openconnect --user=${remoteName} --passwd-on-stdin --passtos --interface=${name} --mtu=${mtu} ${remoteAddress}:${remoteOcservPort}`; 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'; startupCommand += ' --no-dtls';
} }
const containerName = `openconnect-${name}`; 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