@ -13,6 +13,7 @@ proto_openconnect_init_config() {
proto_config_add_string "token_mode"
proto_config_add_string "token_secret"
proto_config_add_string "interface"
proto_config_add_string "os"
no_device = 1
available = 1
}
@ -20,7 +21,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
json_get_vars server port username serverhash authgroup password interface token_mode token_secret os
grep -q tun /proc/modules || insmod tun
@ -68,6 +69,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 "
proto_export INTERFACE = " $config "
logger -t openconnect " executing 'openconnect $cmdline ' "