[Openvpn-devel,1/7] Visual Studio: upgrade project files to VS2019

Message ID 1568724293-5069-1-git-send-email-lstipakov@gmail.com
State Superseded
Headers show
Series [Openvpn-devel,1/7] Visual Studio: upgrade project files to VS2019 | expand

Commit Message

Lev Stipakov Sept. 17, 2019, 2:44 a.m. UTC
From: Lev Stipakov <lev@openvpn.net>

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

While wintun is in beta, it performs significantly faster comparison to tap-windows6.

Here are some performance numbers (download bandwidth):

Server - community openvpn2

mingw, tap-windows6   - 340Mbit/s
mingw, wintun         - 675Mbit/s
VS2019, tap-windows6  - 425Mbit/s
VS2019, wintun        - 750Mbit/s

Server - propietary openvpn3 with kernel acceleration (in development)

mingw, tap-windows6   - 360Mbit/s
mingw, wintun         - 840Mbit/s
VS2019, tap-windows6  - 430Mbit/s
VS2019, wintun        - 1,14Gbit/s

And for the reference
openvpn3 test client, VS2019, wintun - 1,71Gbit/s

Some observations from those numbers:

    * wintun performs more than twice faster comparison to tap-windows6 agains community server (750Mbit/s vs 340Mbit/s)
    * Visual Studio provides noticeable performance boost (up to 25%)
        * we should build Windows clients with VS, not with mingw
    * There's room for improvement in openvpn2, since under best conditions openvpn3 performs 50% faster

Steps to try out new client:

    * Install Wintun driver
        * since driver is not signed, you need to enable test mode to install unsigned driver
            * run in administrative command prompt:
              bcdedit /set testsigning on
            * restart
        * download and unpack https://staging.openvpn.net/openvpn2/wintun-0.6-unsigned.zip to C:\Temp\wintun (for example)
        * if you have OpenVPN GUI client installed, run under administrative command prompt:
          c:\Program Files\TAP-Windows\bin>tapinstall.exe install c:\Temp\wintun\wintun.inf wintun
        * alternatively you can install driver via windows device manager -> action ->add legacy hardware -> install manually ->
          point to wintun.inf in C:\Temp\wintun

    * Install openvpn client with wintun support
        * download and unpack https://staging.openvpn.net/openvpn2/openvpn2-wintun-support.zip to C:\Temp\openvpn (for example)
        * if you use OpenVPN GUI, copy all files from C:\Temp\openvpn to C:\Program Files\OpenVPN\bin. Don't forget to 
          stop OpenVPN Interactive Service before copying and start it back afterwards (net stop/start OpenVPNServiceInteractive in admin command prompt)

    * Connect to VPN from command line
        * run from administrative command prompt
          c:\Temp\openvpn>openvpn.exe --config client.ovpn --windows-driver wintun
        * you should see something around these lines in log
          Tue Sep 17 15:09:58 2019 us=296000 interactive service msg_channel=0
          Tue Sep 17 15:09:58 2019 us=312000 open_tun
          Tue Sep 17 15:09:58 2019 us=312000 Wintun device [Lähiverkkoyhteys] opened: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}
          Tue Sep 17 15:09:58 2019 us=312000 do_ifconfig, ipv4=1, ipv6=0
          Tue Sep 17 15:09:59 2019 us=312000 NETSH: C:\Windows\system32\netsh.exe interface ip set address Lähiverkkoyhteys static 10.8.0.2 255.255.255.0
          Tue Sep 17 15:10:00 2019 us=406000 NETSH: C:\Windows\system32\netsh.exe interface ip delete dns Lähiverkkoyhteys all
          Tue Sep 17 15:10:01 2019 us=484000 NETSH: C:\Windows\system32\netsh.exe interface ip set dns Lähiverkkoyhteys static 10.8.0.1
          Tue Sep 17 15:10:14 2019 us=578000 NETSH: C:\Windows\system32\netsh.exe interface ip delete wins Lähiverkkoyhteys all
          Tue Sep 17 15:10:19 2019 us=296000 TEST ROUTES: 0/0 succeeded len=0 ret=1 a=0 u/d=up
          Tue Sep 17 15:10:19 2019 us=296000 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
          Tue Sep 17 15:10:19 2019 us=296000 Initialization Sequence Completed
        * congratulations!

    * Connect to VPN from OpenVPN GUI
        * right click on tray icon -> profile name -> Edit Config
        * add "windows-driver wintun" to profile, save and close
        * right click on tray icon -> profile name -> Connect
        * you should see something around these lines in log
          Tue Sep 17 15:15:46 2019 interactive service msg_channel=676
          Tue Sep 17 15:15:46 2019 open_tun
          Tue Sep 17 15:15:46 2019 Wintun device [Lähiverkkoyhteys] opened: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}
          Tue Sep 17 15:15:46 2019 Ring buffers registered via service
          Tue Sep 17 15:15:46 2019 do_ifconfig, ipv4=1, ipv6=0
          Tue Sep 17 15:15:46 2019 MANAGEMENT: >STATE:1568722546,ASSIGN_IP,,10.8.0.2,,,,
          Tue Sep 17 15:15:46 2019 Setting IPv4 dns servers on 'Lähiverkkoyhteys' (if_index = 3) using service
          Tue Sep 17 15:15:46 2019 IPv4 dns servers set using service
          Tue Sep 17 15:15:51 2019 TEST ROUTES: 0/0 succeeded len=0 ret=1 a=0 u/d=up
          Tue Sep 17 15:15:51 2019 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
          Tue Sep 17 15:15:51 2019 Initialization Sequence Completed
        * congratulations!

Signed-off-by: Lev Stipakov <lev@openvpn.net>
---
 src/compat/compat.vcxproj             | 12 ++++++------
 src/openvpn/openvpn.vcxproj           | 12 ++++++------
 src/openvpnmsica/openvpnmsica.vcxproj | 14 +++++++-------
 src/openvpnserv/openvpnserv.vcxproj   | 12 ++++++------
 src/tapctl/tapctl.vcxproj             | 14 +++++++-------
 5 files changed, 32 insertions(+), 32 deletions(-)

Comments

Selva Nair Sept. 18, 2019, 4:38 a.m. UTC | #1
Hi,

On Tue, Sep 17, 2019 at 8:45 AM Lev Stipakov <lstipakov@gmail.com> wrote:
>
> From: Lev Stipakov <lev@openvpn.net>
>
> This set of patches adds support of wintun kernel driver (https://www.wintun.net) to OpenVPN.
>
> While wintun is in beta, it performs significantly faster comparison to tap-windows6.
>
> Here are some performance numbers (download bandwidth):
>
> Server - community openvpn2
>
> mingw, tap-windows6   - 340Mbit/s
> mingw, wintun         - 675Mbit/s
> VS2019, tap-windows6  - 425Mbit/s
> VS2019, wintun        - 750Mbit/s
>
> Server - propietary openvpn3 with kernel acceleration (in development)
>
> mingw, tap-windows6   - 360Mbit/s
> mingw, wintun         - 840Mbit/s
> VS2019, tap-windows6  - 430Mbit/s
> VS2019, wintun        - 1,14Gbit/s
>
> And for the reference
> openvpn3 test client, VS2019, wintun - 1,71Gbit/s

No doubt this is interesting and surprising given mingw (unlike
cygwin) uses stock Windows runtime. Does the VS build target a more
recent Windows runtime than the legacy one (msvcrt.dll) that mingw
would link against?

With some effort it may be possible to make mingw use a newer CRT (say
mscrt110.dll) and test whether that helps. Also, do we have to
distribute a recent CRT with this executable?

Even if we manage to change the release process to support building on
Windows, it will have to remain a hybrid process for a while at least.
OpenVPN-GUI doesn't build with visual studio and making it do so will
need some work -- especially with the resource file formats. Nothing
complicated but cumbersome. Unless someone volunteers.


Selva
Lev Stipakov Sept. 18, 2019, 10:27 a.m. UTC | #2
Hi,

Turns out that our build script for windows-nsis/generic doesn't specify
any optimization flags.

I added -O2 and got 400Mbit/s with mingw, which is better than 340 but
worse than VS's 425.

Haven't yet checked which flags are used for openssl build.

Also adding "-O2" to CFLAGS breaks rc build:

libtool: compile:  i686-w64-mingw32-windres -DHAVE_CONFIG_H -I. -I../..
-I../../include -I../../include -I../../src/compat -DWIN32_LEAN_AND_MEAN
-DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA -O2 -i
openvpnmsica_resources.rc  -o .libs/openvpnmsica_resources.o
i686-w64-mingw32-windres: unknown format type `2'
i686-w64-mingw32-windres: supported formats: rc res coff
Makefile:827: recipe for target 'openvpnmsica_resources.lo' failed

This happens because windres treats "-O" as own option, so I removed .rc
files from Makefile(s).am for testing.

I'll play with optimizations flags and find a proper solution for rc build.
I think this has to be fixed also in the next 2.4 release.
Lev Stipakov Sept. 19, 2019, 4:32 a.m. UTC | #3
Hello,

> Does the VS build target a more
> recent Windows runtime than the legacy one (msvcrt.dll) that mingw
> would link against?

Yes, VS build targets Universal CRT, while mingw targets "classis",
pre-Visual Studio 2015 CRT.

Answering to Gert's question in IRC - CPU load was 25% on 4-core machine,
so I assume that
client is CPU-bound.

I enabled optimization (-O2 -flto) for mingw builds

https://github.com/OpenVPN/openvpn-build/pull/153/commits/570bbbb27ec33f06995400b19da5db2af8b0d58a

and problem seems to be fixed, I see no big difference with Visual Studio
anymore.

I performed series of tests - for each configuration I ran

> iperf3.exe -c 10.8.0.1 -t 60 -V

five times and used average download bandwidth value.

Results below (don't know why they're bit lower comparison to previous
runs, probably AWS datacenter has a bad day today):

Server - openvpn 2.4.4, client tun driver - tap-windows6
mingw, no optimization   - 334Mbit/s (that's what we have in windows
release now)
mingw, optimized            - 390Mbit/s
VS2019 release              - 394Mbit/s

Server - openvpn 2.4.4, client tun driver - wintun
mingw, no optimization   - 650Mbit/s
mingw, optimized            - 731Mbit/s
VS2019 release              - 721Mbit/s

Server - openvpn3 with kernel module, client tun driver - wintun
mingw, no optimization   - 772Mbit/s
mingw, optimized            - 924Mbit/s
VS2019 release              - 901Mbit/s

As you can see, using wintun and mingw optimization increases
download bandwidth more than twice (334Mbit/s -> 731Mbit)

So for the next release we need to build client with optimization enabled
and
it would be nice to have wintun support in 2.5 (see
https://patchwork.openvpn.net/project/openvpn2/list/?series=545)
Lev Stipakov Sept. 20, 2019, 4:44 a.m. UTC | #4
Hello,

Wintun driver is now signed for Windows 10,

https://staging.openvpn.net/openvpn2/wintun-0.6-signed.zip

So if you want to try out super fast openvpn2, no need to meddle anymore
with test mode / disabling signature checks.

ti 17. syysk. 2019 klo 15.45 Lev Stipakov (lstipakov@gmail.com) kirjoitti:

> From: Lev Stipakov <lev@openvpn.net>
>
> This set of patches adds support of wintun kernel driver (
> https://www.wintun.net) to OpenVPN.
>
> While wintun is in beta, it performs significantly faster comparison to
> tap-windows6.
>
> Here are some performance numbers (download bandwidth):
>
> Server - community openvpn2
>
> mingw, tap-windows6   - 340Mbit/s
> mingw, wintun         - 675Mbit/s
> VS2019, tap-windows6  - 425Mbit/s
> VS2019, wintun        - 750Mbit/s
>
> Server - propietary openvpn3 with kernel acceleration (in development)
>
> mingw, tap-windows6   - 360Mbit/s
> mingw, wintun         - 840Mbit/s
> VS2019, tap-windows6  - 430Mbit/s
> VS2019, wintun        - 1,14Gbit/s
>
> And for the reference
> openvpn3 test client, VS2019, wintun - 1,71Gbit/s
>
> Some observations from those numbers:
>
>     * wintun performs more than twice faster comparison to tap-windows6
> agains community server (750Mbit/s vs 340Mbit/s)
>     * Visual Studio provides noticeable performance boost (up to 25%)
>         * we should build Windows clients with VS, not with mingw
>     * There's room for improvement in openvpn2, since under best
> conditions openvpn3 performs 50% faster
>
> Steps to try out new client:
>
>     * Install Wintun driver
>         * since driver is not signed, you need to enable test mode to
> install unsigned driver
>             * run in administrative command prompt:
>               bcdedit /set testsigning on
>             * restart
>         * download and unpack
> https://staging.openvpn.net/openvpn2/wintun-0.6-unsigned.zip to
> C:\Temp\wintun (for example)
>         * if you have OpenVPN GUI client installed, run under
> administrative command prompt:
>           c:\Program Files\TAP-Windows\bin>tapinstall.exe install
> c:\Temp\wintun\wintun.inf wintun
>         * alternatively you can install driver via windows device manager
> -> action ->add legacy hardware -> install manually ->
>           point to wintun.inf in C:\Temp\wintun
>
>     * Install openvpn client with wintun support
>         * download and unpack
> https://staging.openvpn.net/openvpn2/openvpn2-wintun-support.zip to
> C:\Temp\openvpn (for example)
>         * if you use OpenVPN GUI, copy all files from C:\Temp\openvpn to
> C:\Program Files\OpenVPN\bin. Don't forget to
>           stop OpenVPN Interactive Service before copying and start it
> back afterwards (net stop/start OpenVPNServiceInteractive in admin command
> prompt)
>
>     * Connect to VPN from command line
>         * run from administrative command prompt
>           c:\Temp\openvpn>openvpn.exe --config client.ovpn
> --windows-driver wintun
>         * you should see something around these lines in log
>           Tue Sep 17 15:09:58 2019 us=296000 interactive service
> msg_channel=0
>           Tue Sep 17 15:09:58 2019 us=312000 open_tun
>           Tue Sep 17 15:09:58 2019 us=312000 Wintun device
> [Lähiverkkoyhteys] opened:
> \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}
>           Tue Sep 17 15:09:58 2019 us=312000 do_ifconfig, ipv4=1, ipv6=0
>           Tue Sep 17 15:09:59 2019 us=312000 NETSH:
> C:\Windows\system32\netsh.exe interface ip set address Lähiverkkoyhteys
> static 10.8.0.2 255.255.255.0
>           Tue Sep 17 15:10:00 2019 us=406000 NETSH:
> C:\Windows\system32\netsh.exe interface ip delete dns Lähiverkkoyhteys all
>           Tue Sep 17 15:10:01 2019 us=484000 NETSH:
> C:\Windows\system32\netsh.exe interface ip set dns Lähiverkkoyhteys static
> 10.8.0.1
>           Tue Sep 17 15:10:14 2019 us=578000 NETSH:
> C:\Windows\system32\netsh.exe interface ip delete wins Lähiverkkoyhteys all
>           Tue Sep 17 15:10:19 2019 us=296000 TEST ROUTES: 0/0 succeeded
> len=0 ret=1 a=0 u/d=up
>           Tue Sep 17 15:10:19 2019 us=296000 WARNING: this configuration
> may cache passwords in memory -- use the auth-nocache option to prevent this
>           Tue Sep 17 15:10:19 2019 us=296000 Initialization Sequence
> Completed
>         * congratulations!
>
>     * Connect to VPN from OpenVPN GUI
>         * right click on tray icon -> profile name -> Edit Config
>         * add "windows-driver wintun" to profile, save and close
>         * right click on tray icon -> profile name -> Connect
>         * you should see something around these lines in log
>           Tue Sep 17 15:15:46 2019 interactive service msg_channel=676
>           Tue Sep 17 15:15:46 2019 open_tun
>           Tue Sep 17 15:15:46 2019 Wintun device [Lähiverkkoyhteys]
> opened: \\?\ROOT#NET#0004#{cac88484-7515-4c03-82e6-71a87abac361}
>           Tue Sep 17 15:15:46 2019 Ring buffers registered via service
>           Tue Sep 17 15:15:46 2019 do_ifconfig, ipv4=1, ipv6=0
>           Tue Sep 17 15:15:46 2019 MANAGEMENT:
> >STATE:1568722546,ASSIGN_IP,,10.8.0.2,,,,
>           Tue Sep 17 15:15:46 2019 Setting IPv4 dns servers on
> 'Lähiverkkoyhteys' (if_index = 3) using service
>           Tue Sep 17 15:15:46 2019 IPv4 dns servers set using service
>           Tue Sep 17 15:15:51 2019 TEST ROUTES: 0/0 succeeded len=0 ret=1
> a=0 u/d=up
>           Tue Sep 17 15:15:51 2019 WARNING: this configuration may cache
> passwords in memory -- use the auth-nocache option to prevent this
>           Tue Sep 17 15:15:51 2019 Initialization Sequence Completed
>         * congratulations!
>
> Signed-off-by: Lev Stipakov <lev@openvpn.net>
> ---
>  src/compat/compat.vcxproj             | 12 ++++++------
>  src/openvpn/openvpn.vcxproj           | 12 ++++++------
>  src/openvpnmsica/openvpnmsica.vcxproj | 14 +++++++-------
>  src/openvpnserv/openvpnserv.vcxproj   | 12 ++++++------
>  src/tapctl/tapctl.vcxproj             | 14 +++++++-------
>  5 files changed, 32 insertions(+), 32 deletions(-)
>
> diff --git a/src/compat/compat.vcxproj b/src/compat/compat.vcxproj
> index 111dacd..e388008 100644
> --- a/src/compat/compat.vcxproj
> +++ b/src/compat/compat.vcxproj
> @@ -22,30 +22,30 @@
>      <ProjectGuid>{4B2E2719-E661-45D7-9203-F6F456B22F19}</ProjectGuid>
>      <RootNamespace>compat</RootNamespace>
>      <Keyword>Win32Proj</Keyword>
> -
> <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
> +    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"
> Label="Configuration">
>      <ConfigurationType>StaticLibrary</ConfigurationType>
>      <CharacterSet>MultiByte</CharacterSet>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'"
> Label="Configuration">
>      <ConfigurationType>StaticLibrary</ConfigurationType>
>      <CharacterSet>MultiByte</CharacterSet>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
> Label="Configuration">
>      <ConfigurationType>StaticLibrary</ConfigurationType>
>      <CharacterSet>MultiByte</CharacterSet>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"
> Label="Configuration">
>      <ConfigurationType>StaticLibrary</ConfigurationType>
>      <CharacterSet>MultiByte</CharacterSet>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
>    <ImportGroup Label="ExtensionSettings">
> @@ -115,4 +115,4 @@
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
>    <ImportGroup Label="ExtensionTargets">
>    </ImportGroup>
> -</Project>
> +</Project>
> \ No newline at end of file
> diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
> index 92d7e32..3422b64 100644
> --- a/src/openvpn/openvpn.vcxproj
> +++ b/src/openvpn/openvpn.vcxproj
> @@ -22,30 +22,30 @@
>      <ProjectGuid>{29DF226E-4D4E-440F-ADAF-5829CFD4CA94}</ProjectGuid>
>      <RootNamespace>openvpn</RootNamespace>
>      <Keyword>Win32Proj</Keyword>
> -
> <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
> +    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
>    <ImportGroup Label="ExtensionSettings">
> @@ -299,4 +299,4 @@
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
>    <ImportGroup Label="ExtensionTargets">
>    </ImportGroup>
> -</Project>
> +</Project>
> \ No newline at end of file
> diff --git a/src/openvpnmsica/openvpnmsica.vcxproj
> b/src/openvpnmsica/openvpnmsica.vcxproj
> index 5f1d699..afa4fae 100644
> --- a/src/openvpnmsica/openvpnmsica.vcxproj
> +++ b/src/openvpnmsica/openvpnmsica.vcxproj
> @@ -31,32 +31,32 @@
>      <ProjectGuid>{D41AA9D6-B818-476E-992E-0E16EB86BEE2}</ProjectGuid>
>      <Keyword>Win32Proj</Keyword>
>      <RootNamespace>openvpnmsica</RootNamespace>
> -
> <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
> +    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"
> Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
>      <UseDebugLibraries>true</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
>      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
> Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
>      <UseDebugLibraries>true</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"
> Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
>      <UseDebugLibraries>true</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"
> Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
>      <UseDebugLibraries>false</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
>      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
> @@ -64,14 +64,14 @@
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"
> Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
>      <UseDebugLibraries>false</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'"
> Label="Configuration">
>      <ConfigurationType>DynamicLibrary</ConfigurationType>
>      <UseDebugLibraries>false</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
>    </PropertyGroup>
> diff --git a/src/openvpnserv/openvpnserv.vcxproj
> b/src/openvpnserv/openvpnserv.vcxproj
> index 7407757..7061b7b 100644
> --- a/src/openvpnserv/openvpnserv.vcxproj
> +++ b/src/openvpnserv/openvpnserv.vcxproj
> @@ -22,30 +22,30 @@
>      <ProjectGuid>{9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}</ProjectGuid>
>      <RootNamespace>openvpnserv</RootNamespace>
>      <Keyword>Win32Proj</Keyword>
> -
> <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
> +    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <CharacterSet>Unicode</CharacterSet>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
>    <ImportGroup Label="ExtensionSettings">
> @@ -139,4 +139,4 @@
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
>    <ImportGroup Label="ExtensionTargets">
>    </ImportGroup>
> -</Project>
> +</Project>
> \ No newline at end of file
> diff --git a/src/tapctl/tapctl.vcxproj b/src/tapctl/tapctl.vcxproj
> index 5c1983b..1d593fc 100644
> --- a/src/tapctl/tapctl.vcxproj
> +++ b/src/tapctl/tapctl.vcxproj
> @@ -31,32 +31,32 @@
>      <ProjectGuid>{A06436E7-D576-490D-8BA0-0751D920334A}</ProjectGuid>
>      <Keyword>Win32Proj</Keyword>
>      <RootNamespace>tapctl</RootNamespace>
> -
> <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
> +    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
>    </PropertyGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <UseDebugLibraries>true</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
>      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <UseDebugLibraries>true</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
>    </PropertyGroup>
>    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <UseDebugLibraries>true</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <CharacterSet>Unicode</CharacterSet>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <UseDebugLibraries>false</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
>      <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
> @@ -64,14 +64,14 @@
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <UseDebugLibraries>false</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
>    </PropertyGroup>
>    <PropertyGroup
> Condition="'$(Configuration)|$(Platform)'=='Release|x64'"
> Label="Configuration">
>      <ConfigurationType>Application</ConfigurationType>
>      <UseDebugLibraries>false</UseDebugLibraries>
> -    <PlatformToolset>v141</PlatformToolset>
> +    <PlatformToolset>v142</PlatformToolset>
>      <WholeProgramOptimization>true</WholeProgramOptimization>
>      <CharacterSet>Unicode</CharacterSet>
>    </PropertyGroup>
> --
> 2.7.4
>
>
Steffan Karger Sept. 20, 2019, 6:26 a.m. UTC | #5
Hi,

On Fri, Sep 20, 2019, 15:47 Lev Stipakov <lstipakov@gmail.com> wrote:

> Wintun driver is now signed for Windows 10,
>
> https://staging.openvpn.net/openvpn2/wintun-0.6-signed.zip
>
> So if you want to try out super fast openvpn2, no need to meddle anymore
> with test mode / disabling signature checks.
>

Out of curiosity: does the (signed) driver from wintun.net not work? Of so,
why?

-Steffan

>
<div dir="auto">Hi,<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Fri, Sep 20, 2019, 15:47 Lev Stipakov &lt;<a href="mailto:lstipakov@gmail.com">lstipakov@gmail.com</a>&gt; wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Wintun driver is now signed for Windows 10,</div><div><br></div><div><a href="https://staging.openvpn.net/openvpn2/wintun-0.6-signed.zip" target="_blank" rel="noreferrer">https://staging.openvpn.net/openvpn2/wintun-0.6-signed.zip</a></div><div><br></div><div>So if you want to try out super fast openvpn2, no need to meddle anymore with test mode / disabling signature checks.</div></div></blockquote></div><div dir="auto"><br></div><div dir="auto">Out of curiosity: does the (signed) driver from <a href="http://wintun.net">wintun.net</a> not work? Of so, why?</div><div dir="auto"><br></div><div dir="auto">-Steffan</div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div>
Lev Stipakov Sept. 20, 2019, 7:54 a.m. UTC | #6
Hi Steffan,

Out of curiosity: does the (signed) driver from wintun.net not work? Of so,
> why?
>

It does. It is just not usable for openvpn yet because:

1)  Wintun is distributed as msm module, which is supposed to be integrated
into MSI installer.
Our MSI installer doesn't support wintun yet.

2) One can install wireguard client, which installs wintun, however it
still won't work
for openvpn out of the box. Wireguard creates tun adapter on demand, and
openvpn
expects it to already exist. So if you try to use openvpn with wintun after
installing wireguard
you'll get error "no tun adapters found" (or something). This is not a
problem, since
we have "tapctl" tool which can create/list/delete tun/tap adapters. It
does not work with
wintun, though, since it has hardcoded "tap0901" hardware id. I plan to
make it customizable
so one could create wintun adapter by running something like "tapctl.exe
create --name openvpn-wintun --hwid wintun".
We could consider creating tun adapter on demand, but this increases
connection time by a few seconds.
Selva Nair Sept. 20, 2019, 8:05 a.m. UTC | #7
Hi,

On Fri, Sep 20, 2019 at 1:55 PM Lev Stipakov <lstipakov@gmail.com> wrote:
>
> Hi Steffan,
>
>> Out of curiosity: does the (signed) driver from wintun.net not work? Of so, why?
>
>
> It does. It is just not usable for openvpn yet because:
>
> 1)  Wintun is distributed as msm module, which is supposed to be integrated into MSI installer.
> Our MSI installer doesn't support wintun yet.
>
> 2) One can install wireguard client, which installs wintun, however it still won't work
> for openvpn out of the box. Wireguard creates tun adapter on demand, and openvpn
> expects it to already exist. So if you try to use openvpn with wintun after installing wireguard
> you'll get error "no tun adapters found" (or something). This is not a problem, since
> we have "tapctl" tool which can create/list/delete tun/tap adapters. It does not work with
> wintun, though, since it has hardcoded "tap0901" hardware id. I plan to make it customizable
> so one could create wintun adapter by running something like "tapctl.exe create --name openvpn-wintun --hwid wintun".
> We could consider creating tun adapter on demand, but this increases connection time by a few seconds.
>

The last time I tried, I could use the driver that comes with
wireguard by "activatin" an adapter from its GUI but not add a
tunnel so that the device remains free. Then the pacthed openvpn
could open it.

How does one install the driver in the zip file you posted -- using
devcon with the hardware id of wintun?


Selva
Lev Stipakov Sept. 20, 2019, 8:14 a.m. UTC | #8
Double checked that it was in my original email :)

> * if you have OpenVPN GUI client installed, run under administrative
command prompt:
>          c:\Program Files\TAP-Windows\bin>tapinstall.exe install
c:\Temp\wintun\wintun.inf wintun
> * alternatively you can install driver via windows device manager ->
action ->add legacy hardware -> install manually ->
>          point to wintun.inf in C:\Temp\wintun

If I am not mistaken, tapinstall is a renamed devcon, so same arguments
might work.

You could also patch our own tapctl tool:

diff --git a/src/tapctl/tap.c b/src/tapctl/tap.c
index e75db354..905fef66 100644
--- a/src/tapctl/tap.c
+++ b/src/tapctl/tap.c
@@ -41,7 +41,7 @@

 const static GUID GUID_DEVCLASS_NET = { 0x4d36e972L, 0xe325, 0x11ce, {
0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 } };

-const static TCHAR szzHardwareIDs[] = TEXT("root\\")
TEXT(TAP_WIN_COMPONENT_ID) TEXT("\0");
+const static TCHAR szzHardwareIDs[] = TEXT("wintun") TEXT("\0");

 const static TCHAR szInterfaceRegKeyPathTemplate[] =
TEXT("SYSTEM\\CurrentControlSet\\Control\\Network\\%") TEXT(PRIsLPOLESTR)
TEXT("\\%") TEXT(PRIsLPOLESTR) TEXT("\\Connection");
 #define INTERFACE_REGKEY_PATH_MAX
(_countof(TEXT("SYSTEM\\CurrentControlSet\\Control\\Network\\")) - 1 + 38 +
_countof(TEXT("\\")) - 1 + 38 + _countof(TEXT("\\Connection")))

and then run:

> tapctl.exe create --name openvpn-wintun
Lev Stipakov Sept. 22, 2019, 11:26 p.m. UTC | #9
Since distributing own wintun binaries goes against recommended way (which
is MSM modules), here are steps to try out openvpn with wintun (which is
even simpler than previous way):

 - Install wireguard windows client from https://www.wireguard.com/install/
 - Download patched openvpn binaries from
https://staging.openvpn.net/openvpn2/openvpn2-wintun-support.zip
 - Unpack downloaded archive and run in administrative command prompt:
    c:\Temp\openvpn>tapctl.exe create --hwid wintun
 - That's it! You have created wintun network adapter and ready to use
openvpn with wintun.

This uses tapctl, which is openvpn 2.5+ tool to manipulate tun/tap
adapters, which I have patched to work with wintun (
https://patchwork.openvpn.net/patch/833/).

See more detailed instruction here: http://staging.openvpn.net/openvpn2/
Lev Stipakov Sept. 28, 2019, 11:27 p.m. UTC | #10
I have added wintun's MSM (official distribution way) to windows client
installer:

https://staging.openvpn.net/openvpn2/openvpn-install-2.5_git-I607-Win10.exe

To use wintun driver instead of tap-window6, add "windows-driver wintun" to
your VPN profile.

Fresh performance numbers (with recent -O2 fix to windows build system):

Server - openvpn 2.4.4
    tap-windows6: 390Mbit/s
    wintun: 730Mbit/s

Server - openvpn3 with kernel acceleration
    tap-windows6: 405Mbit/s
    wintun: 1.05Gbit/s

Patch

diff --git a/src/compat/compat.vcxproj b/src/compat/compat.vcxproj
index 111dacd..e388008 100644
--- a/src/compat/compat.vcxproj
+++ b/src/compat/compat.vcxproj
@@ -22,30 +22,30 @@ 
     <ProjectGuid>{4B2E2719-E661-45D7-9203-F6F456B22F19}</ProjectGuid>
     <RootNamespace>compat</RootNamespace>
     <Keyword>Win32Proj</Keyword>
-    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
@@ -115,4 +115,4 @@ 
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
index 92d7e32..3422b64 100644
--- a/src/openvpn/openvpn.vcxproj
+++ b/src/openvpn/openvpn.vcxproj
@@ -22,30 +22,30 @@ 
     <ProjectGuid>{29DF226E-4D4E-440F-ADAF-5829CFD4CA94}</ProjectGuid>
     <RootNamespace>openvpn</RootNamespace>
     <Keyword>Win32Proj</Keyword>
-    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
@@ -299,4 +299,4 @@ 
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/openvpnmsica/openvpnmsica.vcxproj b/src/openvpnmsica/openvpnmsica.vcxproj
index 5f1d699..afa4fae 100644
--- a/src/openvpnmsica/openvpnmsica.vcxproj
+++ b/src/openvpnmsica/openvpnmsica.vcxproj
@@ -31,32 +31,32 @@ 
     <ProjectGuid>{D41AA9D6-B818-476E-992E-0E16EB86BEE2}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>openvpnmsica</RootNamespace>
-    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
     <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
@@ -64,14 +64,14 @@ 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
diff --git a/src/openvpnserv/openvpnserv.vcxproj b/src/openvpnserv/openvpnserv.vcxproj
index 7407757..7061b7b 100644
--- a/src/openvpnserv/openvpnserv.vcxproj
+++ b/src/openvpnserv/openvpnserv.vcxproj
@@ -22,30 +22,30 @@ 
     <ProjectGuid>{9C91EE0B-817D-420A-A1E6-15A5A9D98BAD}</ProjectGuid>
     <RootNamespace>openvpnserv</RootNamespace>
     <Keyword>Win32Proj</Keyword>
-    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
@@ -139,4 +139,4 @@ 
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/tapctl/tapctl.vcxproj b/src/tapctl/tapctl.vcxproj
index 5c1983b..1d593fc 100644
--- a/src/tapctl/tapctl.vcxproj
+++ b/src/tapctl/tapctl.vcxproj
@@ -31,32 +31,32 @@ 
     <ProjectGuid>{A06436E7-D576-490D-8BA0-0751D920334A}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>tapctl</RootNamespace>
-    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
     <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
@@ -64,14 +64,14 @@ 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>