mirror of https://github.com/openwrt/packages.git
openconnect: introduced script parameter
This allows specifying a custom vpnc-compatible config script. Signed-off-by: Yury Potapov <me@immensus.net>pull/25241/head
parent
1fcaf0ac1f
commit
185c5f0387
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=openconnect
|
||||
PKG_VERSION:=9.12
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://www.infradead.org/openconnect/download
|
||||
|
|
|
@ -18,6 +18,9 @@ config interface 'MYVPN'
|
|||
# Reconnect after a temporary network down time (in seconds)
|
||||
#option reconnect_timeout '30'
|
||||
|
||||
# Shell command line for using a vpnc-compatible config script (default: "/lib/netifd/vpnc-script")
|
||||
# option script '/lib/netifd/vpnc-script'
|
||||
|
||||
# For second factor auth:
|
||||
|
||||
# when a fixed 2FA password can be used
|
||||
|
|
|
@ -37,6 +37,7 @@ proto_openconnect_init_config() {
|
|||
proto_config_add_string "csd_wrapper"
|
||||
proto_config_add_string "proxy"
|
||||
proto_config_add_array 'form_entry:regex("[^:]+:[^=]+=.*")'
|
||||
proto_config_add_string "script"
|
||||
no_device=1
|
||||
available=1
|
||||
}
|
||||
|
@ -73,6 +74,7 @@ proto_openconnect_setup() {
|
|||
token_secret \
|
||||
usergroup \
|
||||
username \
|
||||
script \
|
||||
|
||||
ifname="vpn-$config"
|
||||
|
||||
|
@ -101,7 +103,8 @@ proto_openconnect_setup() {
|
|||
[ -n "$port" ] && port=":$port"
|
||||
[ -z "$uri" ] && uri="$server$port"
|
||||
|
||||
append_args "$uri" -i "$ifname" --non-inter --syslog --script /lib/netifd/vpnc-script
|
||||
append_args "$uri" -i "$ifname" --non-inter --syslog
|
||||
[ -n "$script" ] && append_args --script "$script"
|
||||
[ "$pfs" = 1 ] && append_args --pfs
|
||||
[ "$no_dtls" = 1 ] && append_args --no-dtls
|
||||
[ -n "$mtu" ] && append_args --mtu "$mtu"
|
||||
|
|
Loading…
Reference in New Issue