0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00
Commit Graph

57 Commits

Author SHA1 Message Date
Lev Stipakov
48f2b5100b wintun: support for privilege separation
This allows to run openvpn under normal user account,
in which case ring buffers registration is performed
by a separate privileged process.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-08-21 19:09:11 +03:00
Lev Stipakov
6f266be3d8 wintun: ring buffers support
Implemented according to Wintun documentation
and reference client code.

For send and receive ring, client allocates buffer,
creates event and passes it to Wintun under LocalSystem
privileges. When data is availabe for read, Wintun
moves tail pointer of send ring and signals via
send ring's event. To write, client writes to tail
pointer of receive ring and signals via receive ring's event.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-08-21 17:58:37 +03:00
Lev Stipakov
baa1ce2ccf vcxproj: bump VS version to 2019 2019-08-21 17:58:37 +03:00
Lev Stipakov
98bfd037e3 tun/win: factor out ClientConfig into separate header
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-08-21 17:58:37 +03:00
Lev Stipakov
aeb5ce0ad7 wintun: open device with SetupAPI
With introduction of ring buffers Wintun device
must be opened via SetupAPI.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-08-21 17:58:37 +03:00
Lev Stipakov
61794b0efd win: link OpenSSL dynamically
During Wintun performance testing it turned out that
dynamic linking provides better performance.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-06-20 10:34:38 +03:00
Lev Stipakov
03a906771e win: add OpenSSL as solution configuration
This also removes unittest.vcxproj from solution, since
it is deprecated in favor of CMake-based unit tests.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-06-05 13:54:13 +03:00
Lev Stipakov
89cc11b300 win: enable building Windows client with OpenSSL
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-06-05 13:54:12 +03:00
Lev Stipakov
3e3f2078e6 win: rename env var in project file
Use $O3 instead of $OVPN3_ROOT to be consistent
with other platforms.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-05-29 22:15:45 +03:00
Lev Stipakov
a2496a3616 Wintun: experimental support
This introduces experimental support for Wintun
as an alternative for tap-windows6.

In order to use wintun, set "ClientAPI::Config::wintun"
flag to "true" or use "-w" option in test client.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-05-29 20:21:28 +03:00
Arne Schwabe
964662bacb Add /bigobj to build.py
The asio upgrade of 0.1.13 brought us over the limit of 65k
entitities in a single compilation unit. /bigobj allows more
methods

The ovpn3-core.vcxproj already uses this flag
2019-05-01 14:04:34 +02:00
Lev Stipakov
0c0af6781e [OVPN3-342] Generate ICMP "packet too big" reply
When receiving packed from tun which size exceeds
mssfix value minus encap overhead, send ICMP
"destination unreachable" / "fragmentation needed"
(for IPv4) or "packet too big" (for IPv6) response.

This is required for non-TCP based protocols, since
for TCP we alter MSS in SYN segments.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-01-31 10:34:33 +02:00
Antonio Quartulli
04de9c4259
Merge branch 'qa' 2019-01-29 21:12:59 +10:00
Lev Stipakov
2c0dbc6c30 buildep.py: add asio patching
By some reasons, Windows dependencies build script
didn't apply patches for ASIO.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-01-23 11:09:54 +02:00
Lev Stipakov
6608878d57 [OVPN3-341] implement mssfix support
Adds mssfix support including optional
transport overhead. Some code has been ported
from openvpn2.

mssfix sets MSS option in TCP SYN to
a calculated value which guarantees that
size of UDP/TCP packet (which may or may not
include headers, see below) encapsulating
TCP segments won't exceed mssfix value.

If mssfix is used with optional "mtu" parameter,
then IP and UDP/TCP headers are also taken into account.

It is set in config like this:

    mssfix 1300 mtu

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-12-21 10:30:31 +02:00
Lev Stipakov
1bf3fc0e4a win: update project files
Remove Win32 target, set platform version to Windows 10 and set platform toolset to v141.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-12-21 10:30:31 +02:00
Lev Stipakov
cc90cde576 win: use 'MSVC 2017 Professional' as default compiler
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-09-06 11:13:10 +03:00
Lev Stipakov
fc52fd8a58 [OC-78] proxy: support PROXY_AUTO_CONFIG_URL on Windows
Set proxy settings in registry:

HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings

If process is running under SYSTEM account, we impersonate to
logged-in user to access HKEY_CURRENT_USER.

After modifying proxy setting we need to tell Windows to refresh those,
we do it if process is running under user account. Unfortunately WinInet API
we use is not available for services, even with impersonation, so
user application should take care of refreshing settings.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-08-31 17:56:16 +03:00
Lev Stipakov
a0416ed92a
[OVPN3-209] win: add dependencies checksum verification
Also reuse existing lib_version.sh as a source of versions and checksums.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:34 +08:00
Lev Stipakov
f6eadbc4d7
[OVPN3-206] Refactor Windows build system
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:34 +08:00
Antonio Quartulli
98fa555764
deps: update asio to 1.12.0
At the same time rebase patches on top of latets version.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-03-26 23:58:34 +08:00
Lev Stipakov
c892f41fb0
win: tune dependencies build
By default link standard libraries dynamically.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:33 +08:00
Lev Stipakov
0edec4a097
[OVPN3-206] win: update directories in VS projects
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:33 +08:00
Lev Stipakov
758ae98c67
[OVPN3-209] win: add dependencies checksum verification
Also reuse existing lib_version.sh as a source of versions and checksums.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:33 +08:00
Lev Stipakov
a7642ee822
[OVPN3-205] win: apply mbedTLS patches
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:33 +08:00
Lev Stipakov
ac94b6eb7c
[OVPN3-206] Refactor Windows build system
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:32 +08:00
Lev Stipakov
7a71ba17b7 win: get 'arch' param value from environment
Required for by Connect build system.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
61bb21b369 win: make parameter optional
Added mandatory parameter broke Connect build.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
15d66c49d5 [OVPN3-141] win: disable WPO
Whole Program Optimization is broken on VS2017.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
92a62169d4 build win: read certain params from env
Required for Jenkins multibrach pipeline build.

OVPN3-99

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:38 +08:00
Lev Stipakov
8ae2a3f7cf Integrate Google Test framework
Implemented sample test for LogInfo class.

OVPN3-27
2017-09-27 16:16:18 +08:00
Lev Stipakov
67c49897a1 Visual Studio 2015 solution and project files
This requires following environment variables defined:

OVPN3_BUILD - path where dependencies are build (BUILD in parms.py)
OVPN3_CORE - path where ovpn3-core was checked out (OVPN3 in parms.py)
OVPN3_TAP_WINDOWS - path where tap-windows was checked out (TAP in parms.py)

OVPN3-18

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-08-02 17:00:31 +03:00
Lev Stipakov
3213c48e77 Support for local build settings
Local settings are added to parms_local.py.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-08-01 17:16:06 +03:00
Lev Stipakov
b3ec01bb65 Support for gpl version of mbedtls
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-08-01 17:15:58 +03:00
Lev Stipakov
903abc868e Support for zipballs
Since GitHub offers to download repo as zipball, it makes sense to support it along with tarball.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-08-01 12:58:26 +03:00
James Yonan
da99df6949 Windows: added /DUSE_ASIO to build script.
Because Asio use is now optional, USE_ASIO must be
explicitly defined by Windows build script.
2017-04-03 15:21:23 -06:00
James Yonan
0b1be12135 windows : updated build system to latest dependencies,
including mbedTLS 2.4.
2017-03-18 12:24:54 -06:00
James Yonan
c2131bc009 Windows : updated vcvarsall.patch for Visual Studio 2015.
vcvarsall.patch updates the Visual Studio vcvarsall.bat
file to understand new x86_xp target.
2016-04-05 12:57:15 -06:00
James Yonan
ac4b5734ba ovpn3 windows : updated PolarSSL to mbedtls-1.3.16 2016-03-28 14:06:15 -06:00
James Yonan
df4c095ebe Minor changes to Windows build scripts due to reorganization
of asio and lz4 dependencies which are now based on github
snapshots.
2015-12-29 00:07:22 -07:00
James Yonan
eca7f36565 In Windows build scripts, updated dependency versions:
asio-20151228
  mbedtls-1.3.15
  lz4-20150629
2015-12-29 00:05:20 -07:00
James Yonan
c1a86d4e35 Show full wiped base path in expand() method in
win/utils.py.
2015-12-29 00:03:36 -07:00
James Yonan
18d01a1f55 In Windows build script (win/build.py), added a flag for
building OpenVPN Connect.
2015-11-10 23:10:00 -07:00
James Yonan
2a3a73bfe1 Windows build system changes:
* Support static linking via "STATIC" parm.

* New methods in utils.py: rm, rm_obj, vc_parms, zipdir.
2015-11-03 13:11:16 -07:00
James Yonan
f162a5b491 Windows: added WFP-based packet filter to prevent DNS leaks
when tunnel is active.

Based on ValdikSS's C patch for OpenVPN 2.x:
  3bd4d503d2
2015-11-02 20:19:04 -07:00
James Yonan
64087b88e5 In win/utils.py, changed wipetree() signature to:
wipetree(dir, wipe=True)

where wipetree always recreates the directory
but the actual wiping is optional.
2015-11-01 15:05:53 -07:00
James Yonan
8cacebfd7a Modularize Windows build system to make it easier for external
scripts to drive it.
2015-11-01 00:46:55 -06:00
James Yonan
5c76a94bf2 Moved deps/win to win for ease of reference. 2015-10-30 20:06:49 -06:00
James Yonan
9373f515ee Cleaned up top-level directory by moving vars-* and dependency
build scripts to vars and deps.
2014-08-27 16:40:34 -06:00
James Yonan
46035eff57 Windows build system config changes:
* Update TAP driver source path to point to NDIS 6 version.

* By default, build community version that binds to "tap0901"
  instance of TAP driver.
2014-04-04 10:02:33 -06:00