From 99213e631179437c6209b651c97c05511bceda9a Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sat, 28 May 2022 23:21:10 +0100 Subject: [PATCH] openconnect: Allow reconnect timeout to be specified Signed-off-by: Michael Brown --- net/openconnect/README | 3 +++ net/openconnect/files/openconnect.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/net/openconnect/README b/net/openconnect/README index 1a645773a3..0647916fd8 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 449ce8bc3b..25fb7d5424 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