Skip to content

Wintun support

Lev Stipakov openvpn-devel 2 versions – In review

Get series with b4
b4 am [email protected]...

Versions newest first · linked by author and title

  1. v2 Latest7 patches 27 repliesIn review
  2. v17 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- rebased on top of latest master (2b11e57)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7Visual Studio: upgrade project files to VS2019src/compat/compat.vcxproj src/openvpn/openvpn.vcxproj src/openvpnmsica/openvpnmsica.vcxproj +2 more+32 -325 replies
2/7wintun: add --windows-driver config optionsrc/openvpn/init.c src/openvpn/options.c src/openvpn/options.h +1 more+46 -012 replies
3/7wintun: implement opening wintun devicesrc/openvpn/Makefile.am src/openvpn/openvpn.vcxproj src/openvpn/tun.c +1 more+223 -4314 replies
4/7wintun: ring buffers based I/Osrc/openvpn/forward.c src/openvpn/forward.h src/openvpn/mtcp.c +7 more+458 -1126 replies
5/7wintun: interactive service supportinclude/openvpn-msg.h src/openvpn/Makefile.am src/openvpn/openvpn.vcxproj +11 more+375 -926 replies
6/7wintun: set adapter properties via interactive servicesrc/openvpn/route.c src/openvpn/route.h src/openvpn/tun.c+63 -193 replies
7/7wintun: clear adapter settings on tun closesrc/openvpn/tun.c+50 -294 replies

Reviews trailers per patch

6 of 7 patches have a Reviewed-by or Acked-by.

PatchSimon RozmanSteffan Karger
1/7A-b
2/7A-b
3/7A-b
4/7A-b A-b
5/7A-b A-b
6/7A-b A-b
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Openvpn-devel] [PATCH v2 0/7] Wintun support

This set of patches adds support of wintun kernel driver
(https://www.wintun.net) to OpenVPN Windows client and server.

While wintun is in beta (currently used version is 0.7), it performs significantly faster comparison to tap-windows6.

Below are download bandwidth stats reported by iperf3 running on client:

Quoted 1 line

iperf3 -c <server-vpn-ip> -t 60

Server - community openvpn2 (2.4.4)

tap-windows6 - 396Mbit/s
wintun - 677Mbit/s

Server - propietary openvpn3 with kernel acceleration (in development)

tap-windows6 - 386Mbit/s
wintun - 840Mbit/s

Client version used for tap-windows6 tests is 2.4.8.

To use wintun driver instead of tap-window6, add "windows-driver wintun" to your VPN config file or openvpn.exe command line.

Ready-made Windows client installer (signed by OpenVPN Inc)
with wintun support could be found here: from http://staging.openvpn.net/openvpn2/.

To build installer yourself, you need a patched version of openvpn-build, see https://github.com/OpenVPN/openvpn-build/pull/154.

Changes from v1:

- rebased on top of latest master (2b11e57)

Lev Stipakov (7):
Visual Studio: upgrade project files to VS2019
wintun: add --windows-driver config option
wintun: implement opening wintun device
wintun: ring buffers based I/O
wintun: interactive service support
wintun: set adapter properties via interactive service
wintun: clear adapter settings on tun close

 include/openvpn-msg.h                       |  10 +
 src/compat/compat.vcxproj                   |  12 +-
 src/openvpn/Makefile.am                     |   4 +-
 src/openvpn/forward.c                       |  42 ++-
 src/openvpn/forward.h                       |  47 ++-
 src/openvpn/init.c                          |   7 +
 src/openvpn/mtcp.c                          |  28 +-
 src/openvpn/mudp.c                          |  14 +
 src/openvpn/openvpn.vcxproj                 |  16 +-
 src/openvpn/openvpn.vcxproj.filters         |   8 +-
 src/openvpn/options.c                       |  37 ++
 src/openvpn/options.h                       |   1 +
 src/openvpn/ring_buffer.c                   |  54 +++
 src/openvpn/ring_buffer.h                   |  79 +++++
 src/openvpn/route.c                         |   2 +-
 src/openvpn/route.h                         |   3 +-
 src/openvpn/syshead.h                       |   1 +
 src/openvpn/tun.c                           | 504 +++++++++++++++++++++++-----
 src/openvpn/tun.h                           | 139 +++++++-
 src/openvpn/win32.c                         |  95 ++++++
 src/openvpn/win32.h                         |   4 +
 src/openvpnmsica/openvpnmsica.vcxproj       |  14 +-
 src/openvpnserv/Makefile.am                 |   3 +-
 src/openvpnserv/interactive.c               | 141 +++++++-
 src/openvpnserv/openvpnserv.vcxproj         |  14 +-
 src/openvpnserv/openvpnserv.vcxproj.filters |   6 +
 src/tapctl/tapctl.vcxproj                   |  14 +-
 27 files changed, 1160 insertions(+), 139 deletions(-)
 create mode 100644 src/openvpn/ring_buffer.c
 create mode 100644 src/openvpn/ring_buffer.h
Signature · 1 line
2.7.4