Browse Source

openconnect: allow specifying a custom CSD wrapper script

Some VPN servers might be configured in a way that a CSD wrapper script
is mandatory to complete the authentication process, allow that to be
specified for openconnect.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
lilik-openwrt-22.03
Florian Fainelli 10 years ago
parent
commit
b1f228f4cf
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      net/openconnect/files/openconnect.sh

+ 3
- 1
net/openconnect/files/openconnect.sh View File

@ -14,6 +14,7 @@ proto_openconnect_init_config() {
proto_config_add_string "token_secret"
proto_config_add_string "interface"
proto_config_add_string "os"
proto_config_add_string "csd_wrapper"
no_device=1
available=1
}
@ -21,7 +22,7 @@ proto_openconnect_init_config() {
proto_openconnect_setup() {
local config="$1"
json_get_vars server port username serverhash authgroup password interface token_mode token_secret os
json_get_vars server port username serverhash authgroup password interface token_mode token_secret os csd_wrapper
grep -q tun /proc/modules || insmod tun
@ -70,6 +71,7 @@ proto_openconnect_setup() {
[ -n "$token_mode" ] && append cmdline "--token-mode=$token_mode"
[ -n "$token_secret" ] && append cmdline "--token-secret=$token_secret"
[ -n "$os" ] && append cmdline "--os=$os"
[ -n "$csd_wrapper" ] && [ -x "$csd_wrapper" ] && append cmdline "--csd-wrapper=$csd_wrapper"
proto_export INTERFACE="$config"
logger -t openconnect "executing 'openconnect $cmdline'"


Loading…
Cancel
Save