How to get or Build Openconnect for Windows

David Woodhouse dwmw2 at infradead.org
Tue Aug 11 06:11:36 EDT 2020


On Tue, 2020-08-11 at 10:21 +0100, Andrew Hogg wrote:
> I have been trying to figure out how to get openconnect for windows -
> and I really do apologise, but I cannot for the life of me figure out
> how to get it.
> 
> Do I have to build it? or can I just download it from somewhere?
> 
> I'm just really looking for the command line version of openconnect -
> I would install the graphical one, but it hasn't been updated since
> 2017 and all I really need is the command line utility to build the
> tunnel to my work VPN so I can control the routes in my routing table
> and have split tunneling.
> 
> On your website I have found the bit that says:
> 
> "Windows
> 
> The Fedora dwmw2/openconnect COPR mentioned above contains
> mingw-openconnect packages built for 32-bit and 64-bit Windows."
> 
> And I got to the following place:
> 
> https://copr-be.cloud.fedoraproject.org/results/dwmw2/openconnect/fedora-32-x86_64/01392924-mingw-openconnect/
> 
> And I think I might be on the right track, but honestly have no idea -
> that location appears to only have linux stuff in it - do I need to
> build the Windows exe etc from Linux?
> 
> Please can you point me in the right direction as I really don't want
> to be tied to the official anyconnect client as it hijacks my computer
> and forces everything through the VPN - I want to choose what goes
> through.
> 
> I'm not an idiot - but I'm lost - please help me.

MinGW gives us a way to build Windows DLLs and executables on a proper
computer. The Fedora packages are really supposed to be for DLLs, so
that you can cross-build your application on Fedora. In the COPR we
abuse that slightly because we build the actual openconnect.exe too, in
the mingw-openconnect package.

You can extract the openconnect.exe and libopenconnect-5.dll from the
mingw64-openconnect package, as well as the other required DLLs from
other packages. The easiest way to get them all is just to install
mingw64-openconnect on a Fedora system, and it'll pull in all the other
DLL packages you need as dependencies.

Obviously this would be nicer if we made an *installer* which included
in the DLLs you need, and you didn't need to pull them out of the
packages that are intended for building your own stuff.

It probably wouldn't be hard to put together a simple NSIS installer
script for that. Then we can automate the process and always have
installers for the latest version. Volunteers welcome :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5174 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20200811/bd8d4419/attachment.bin>


More information about the openconnect-devel mailing list