openconnect: Allow reconnect timeout to be specified
authorMichael Brown <mbrown@fensystems.co.uk>
Sat, 28 May 2022 22:21:10 +0000 (23:21 +0100)
committerMichael Brown <mbrown@fensystems.co.uk>
Sun, 7 Aug 2022 15:20:21 +0000 (16:20 +0100)
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
net/openconnect/README
net/openconnect/files/openconnect.sh

index 1a645773a37305478d4e40f6998ceba8435ecf9f..0647916fd890275d89bd3ed55f4995cd2c8f74d2 100644 (file)
@@ -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
index 449ce8bc3bc82ab3715dbeeedb655814ec077bf9..25fb7d542468b2e4cf5a7446541a356a9936caec 100755 (executable)
@@ -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