aboutsummaryrefslogtreecommitdiff
path: root/net/openconnect/files/openconnect.sh
diff options
context:
space:
mode:
authorMengyang Li <mayli.he@gmail.com>2020-10-24 21:00:40 -0700
committerNikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>2020-10-25 21:44:32 +0100
commitb6119433a512aa35a740708c0aaa941e8bf07fea (patch)
tree77cdddf07e3188181d9f8a2d51f07cf8c5b61c70 /net/openconnect/files/openconnect.sh
parent80ac8dac11bb71c74a09535b3d43d04541449de3 (diff)
openconnect: allow specify --protocol from config
openconnect v8.10 supports 4 VPN protocols --protocol=anyconnect Compatible with Cisco AnyConnect SSL VPN, as well as ocserv (default) --protocol=nc Compatible with Juniper Network Connect --protocol=gp Compatible with Palo Alto Networks (PAN) GlobalProtect SSL VPN --protocol=pulse Compatible with Pulse Connect Secure SSL VPN This patch allows user to specify protocol use the new "vpn_protocol" option and deprecate the old option "juniper" which seems to be missing in the current openconnect client. Signed-off-by: Mengyang Li <mayli.he@gmail.com>
Diffstat (limited to 'net/openconnect/files/openconnect.sh')
-rwxr-xr-xnet/openconnect/files/openconnect.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh
index aef13a3c3..d310cf5c1 100755
--- a/net/openconnect/files/openconnect.sh
+++ b/net/openconnect/files/openconnect.sh
@@ -15,6 +15,7 @@ proto_openconnect_init_config() {
proto_config_add_int "port"
proto_config_add_int "mtu"
proto_config_add_int "juniper"
+ proto_config_add_string "vpn_protocol"
proto_config_add_boolean "no_dtls"
proto_config_add_string "interface"
proto_config_add_string "username"
@@ -46,6 +47,7 @@ proto_openconnect_setup() {
form_entry \
interface \
juniper \
+ vpn_protocol \
mtu \
no_dtls \
os \
@@ -93,6 +95,10 @@ proto_openconnect_setup() {
append_args --juniper
fi
+ [ -n "$vpn_protocol" ] && {
+ append_args --protocol "$vpn_protocol"
+ }
+
[ -n "$serverhash" ] && {
append_args "--servercert=$serverhash"
append_args --no-system-trust