Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7522710
  • 博文数量: 637
  • 博客积分: 10265
  • 博客等级: 上将
  • 技术积分: 6165
  • 用 户 组: 普通用户
  • 注册时间: 2004-12-12 22:00
文章分类

全部博文(637)

文章存档

2011年(1)

2010年(1)

2009年(3)

2008年(12)

2007年(44)

2006年(156)

2005年(419)

2004年(1)

分类: 网络与安全

2005-03-20 13:17:23

OpenVPN

Notes -- Building from source

This section is for developers only.

You will need the following:

  1. MinGW/MSYS environment
  2. OpenSSL library
  3. LZO library
  4. Windows DDK (available only from Microsoft)
  5. Nullsoft Install System (optional)

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:

  • .openvpn.exe -- openvpn daemon
  • . ap-win32i386 ap0801.sys -- TAP-Win32 kernel driver

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.

阅读(875) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~