分类: 网络与安全
2005-03-20 13:17:23
This section is for developers only.
You will need the following:
It should be noted that Visual C++ is NOT required. The open-source MinGW compiler is used to build the userspace component of OpenVPN, and the DDK is used to build the driver component.
First build the usermode component of OpenVPN from the top-level directory of the OpenVPN source distribution:
Edit makefile.32 with the location of your OpenSSL and LZO distributions. Note that it is only necessary to build these distributions, not to install them.
Note that the makefile accepts a "dynamic" or "static" target, depending on the way you want to link with the OpenSSL library.
By default the makefile will attempt to dynamically link with OpenSSL.
Type:
make -f makefile.w32
This will build the user mode component of OpenVPN.
Now build the TAP-Win32 kernel driver:
Go to Start -> All Programs -> Development Kits -> Windows DDK -> Build Environments -> Win Free Build Environment
Use the Checked Build Environment if you want a debugging version.
A command prompt window will open. Go to the tap-win32 directory of the OpenVPN distribution.
Type:
build -cef
This will build the kernel driver in the i386 directory.
At this point you will have built:
Copy openvpn.exe to a directory in your path. If you build dynamically with OpenSSL, copy the OpenSSL DLLs to a directory in your path.
If you want to build a self-installing EXE, consult the NSIS install script (openvpn.nsi) in the install-win32 directory. You will need to edit openvpn.nsi to reflect the setup of your development environment.
See instructions below for installing the kernel driver.