瀏覽代碼

Merge pull request #1080 from ffainelli/openconnect

openconnect: allow specifying os, csd-wrapper and no-cert-check
Nikos Mavrogiannopoulos 10 年之前
父節點
當前提交
67232bbd66
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      net/openconnect/files/openconnect.sh

+ 5
- 1
net/openconnect/files/openconnect.sh 查看文件

@@ -13,6 +13,8 @@ proto_openconnect_init_config() {
13 13
 	proto_config_add_string "token_mode"
14 14
 	proto_config_add_string "token_secret"
15 15
 	proto_config_add_string "interface"
16
+	proto_config_add_string "os"
17
+	proto_config_add_string "csd_wrapper"
16 18
 	no_device=1
17 19
 	available=1
18 20
 }
@@ -20,7 +22,7 @@ proto_openconnect_init_config() {
20 22
 proto_openconnect_setup() {
21 23
 	local config="$1"
22 24
 
23
-	json_get_vars server port username serverhash authgroup password interface token_mode token_secret
25
+	json_get_vars server port username serverhash authgroup password interface token_mode token_secret os csd_wrapper
24 26
 
25 27
 	grep -q tun /proc/modules || insmod tun
26 28
 
@@ -68,6 +70,8 @@ proto_openconnect_setup() {
68 70
 
69 71
 	[ -n "$token_mode" ] && append cmdline "--token-mode=$token_mode"
70 72
 	[ -n "$token_secret" ] && append cmdline "--token-secret=$token_secret"
73
+	[ -n "$os" ] && append cmdline "--os=$os"
74
+	[ -n "$csd_wrapper" ] && [ -x "$csd_wrapper" ] && append cmdline "--csd-wrapper=$csd_wrapper"
71 75
 
72 76
 	proto_export INTERFACE="$config"
73 77
 	logger -t openconnect "executing 'openconnect $cmdline'"