失败:刚一开始使用window7 msys mingw64 编译openconnect,编译过程中会出现警告,test示例编译失败。虽然编译出来了openconnect,但是无法运行。
正确:在window10中安装msys2,使用mingw32 编译openconnect(openconnect-master),缺少什么就用pacman -S命令安装。安装的history如下,有的不一定用得上。
2 pacman -S mingw-w64-i686-openssl
5 pacman -S mingw-w64-i686-toolchain
7 pacman -S gnutls guntls-devel p11-kit libp11 libproxy trousers libstoken libxml2-devel libpskc
24 pacman -S mingw-w64-i686-openssl
25 pacman -S mingw-w64-i686-openssl-dddelvel
26 pacman -S mingw-w64-i686-openssl-devel
32 pacman -S gnutls guntls-devel p11-kit libp11 libproxy trousers libstoken libxml2-devel libpskc
33 pacman -S gnutls guntls-devel p11-kit libp11 libproxy trousers libstoken libxml2-devel libpskc
34 pacman -Sy gnutls guntls-devel p11-kit libp11 libproxy trousers libstoken libxml2-devel libpskc
35 pacman -S mingw32-gnutls mingw32-libxml2
36 pacman -S mingw32-gnutls mingw32-libxml2
37 pacman -S mingw32-gnutls mingw32-libxml2
38 pacman -Sy mingw32-gnutls mingw32-libxml2
39 pacman -Sy mingw32-gnutls mingw32-libxml2
40 pacman -S mingw-w64-i686-openssl-devel
41 pacman -S mingw-w64-i686-openssl-devel
42 pacman -S mingw-w64-i686-openssl-devel
43 pacman -S mingw-w64-i686-openssl-devel
44 pacman -S mingw-w64-i686-openssl-devel
45 pacman -S mingw32-gnutls mingw32-libxml2
46 pacman -S mingw32-gnutls mingw32-libxml2
47 pacman -S mingw32-gnutls mingw32-libxml2
48 pacman -Syu
49 pacman -Sy gnutls guntls-devel p11-kit libp11 libproxy trousers libstoken libxml2-devel libpskc
50 pacman -S mingw32-gnutls mingw32-libxml2
51 pacman -S mingw32-gnutls mingw32-libxml2
52 pacman -S gnutls libxml2
53 pacman -S gnutls-devel
54 pacman -S zlib
55 pacman -S libp11 p11-kit
56 pacman -S libproxy
57 pacman -S libtasn1
58 pacman -S tss2-esys
59 pacman -S libstoken
60 pacman -S stoken
61 pacman -S libpskc
66 pacman -S zip
68 pacman -S unzip
75 pacman -S autoconf
76 pacman -S automake
77 pacman -S m4
80 pacman -S libtool
82 pacman -S autoupdate
87 pacman -Sy libxml2
89 pacman -Sy libxml2
91 pacman -Sy mingw-w64-i686-libxml2
92 pacman -Sy libxml2-devel
93 pacman -Sy libxml2-python
94 pacman -Sy m4
95 pacman -Sy libiconv
96 pacman -Sy mingw-w64-i686-iconv
97 pacman -Sy lz4 liblz4-devel mingw-w64-i686-glib-openssl
98 pacman -Sy lz4 liblz4-devel
99 pacman -Sy mingw-w64-i686-tinyxml2
100 pacman -Sy openssl-devel
103 pacman -Sy guntls
107 pacman -S make
172 pacman -S vim
173 pacman -S vim
178 pacman -S vim
233 history |grep pacman
configure: ./configure CFLAGS="-g" --without-gnutls --disable-dependency-tracking
因为要使用openssl,所以禁用了gnutls。
运行:使用cmd运行命令:
openconnect.exe 172.16.1.168:443 --no-dtls -u username --passwd-on-stdin
刚开始遇到了错误:Set up tun device failed
后来重装openconnect客户端驱动就可以了。