aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mbrown@fensystems.co.uk>2022-05-28 23:21:10 +0100
committerMichael Brown <mbrown@fensystems.co.uk>2022-08-07 16:20:21 +0100
commit99213e631179437c6209b651c97c05511bceda9a (patch)
treef4814defb430b354eff622be1e7d20649cc8596a
parent5c84d8ceba83b7f017f631a2fed1900b5926869a (diff)
openconnect: Allow reconnect timeout to be specified
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
-rw-r--r--net/openconnect/README3
-rwxr-xr-xnet/openconnect/files/openconnect.sh3
2 files changed, 6 insertions, 0 deletions
diff --git a/net/openconnect/README b/net/openconnect/README
index 1a645773a..0647916fd 100644
--- a/net/openconnect/README
+++ b/net/openconnect/README
@@ -16,6 +16,9 @@ config interface 'MYVPN'
# usergroup option, if required by some servers
# option usergroup 'USERGROUP'
+ # Reconnect after a temporary network down time (in seconds)
+ #option reconnect_timeout '30'
+
# For second factor auth:
# when a fixed 2FA password can be used
diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh
index 449ce8bc3..25fb7d542 100755
--- a/net/openconnect/files/openconnect.sh
+++ b/net/openconnect/files/openconnect.sh
@@ -18,6 +18,7 @@ proto_openconnect_init_config() {
proto_config_add_int "port"
proto_config_add_int "mtu"
proto_config_add_int "juniper"
+ proto_config_add_int "reconnect_timeout"
proto_config_add_string "vpn_protocol"
proto_config_add_boolean "no_dtls"
proto_config_add_string "interface"
@@ -59,6 +60,7 @@ proto_openconnect_setup() {
password2 \
port \
proxy \
+ reconnect_timeout \
server \
serverhash \
token_mode \
@@ -134,6 +136,7 @@ proto_openconnect_setup() {
[ -n "$os" ] && append_args "--os=$os"
[ -n "$csd_wrapper" ] && [ -x "$csd_wrapper" ] && append_args "--csd-wrapper=$csd_wrapper"
[ -n "$proxy" ] && append_args "--proxy=$proxy"
+ [ -n "$reconnect_timeout" ] && append_args "--reconnect-timeout=$reconnect_timeout"
json_for_each_item proto_openconnect_add_form_entry form_entry