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

22 Commits

Author SHA1 Message Date
David Sommerseth
4996c38ed4
Merge lastest changes from Core v3.7.2 2022-12-14 17:34:29 +01:00
Lev Stipakov
fca6465e92
tunwin: support for adapter state in TunSetup
In case of dco-win persist tun, adapter state (index and name)
persists over lifetime on TunSetup object. Add setter/getter
for adapter state to TunSetup.

While on it, ensure that TunSetup::establish() doesn't
acquire adapter handle for dco - this is done by another
dco-specific "get_handle" method. The handle is not
really used by establish() method when using dco-win.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-10-13 15:16:23 +02:00
David Sommerseth
8c94a8f774
copyright: Update to 2022
Signed-off-by: David Sommerseth <davids@openvpn.net>
2022-09-29 12:00:26 +02:00
Christopher Ng
452e7cb625
ovpnagent: fix quoting of omiclient parameters
Signed-off-by: Christopher Ng <facboy@gmail.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Patchwork-Id: 2510
URL: https://patchwork.openvpn.net/patch/2510/
Message-Id: <20220607163049.10056-1-facboy@gmail.com>
Signed-off-by: David Sommerseth <davids@openvpn.net>
2022-06-09 01:53:22 +02:00
Arne Schwabe
568f6615cf Update build instruction for macOS and cleanup/remove build var
Remove the vars-osx64 and vars-iossim files which are no longer used.
The IOS simulator does not support the VPN API and builds for the
IOS simulator have not been done in a very long time nor are they
particular useful.

Also switch to pkg-config for jsoncpp by default.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-02-10 18:59:01 +01:00
Lev Stipakov
fd0655969d
Merge release of OpenVPN Core library 3.6.4 to master 2021-09-22 13:56:37 +02:00
Lev Stipakov
613aa6bf7a
Win: support for local DNS resolvers
Local DNS resolvers, such as Umbrella Roaming Client,
change DNS settings on adapters to 127.0.0.1.

This may not work with openvpn3 because:

 - NRPT rule might be created for "." zone,
which redirects all DNS requests to the server
specified in rule. This takes precendence over adapters'
DNS settings.

 - DNS requests might be blocked on all adapters
except TAP (tap-windows6/wintun/ovpn-dco-win) to prevent
DNS leaks.

To enable compatibility with local DNS resolvers, add
"allowLocalDnsResolvers" core config option, which,
when enabled, makes core to

 - avoid creating NRPT rule for "." zone

 - permit DNS requests to 127.0.0.1 / ::1

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2021-08-10 15:00:58 +03:00
David Sommerseth
6530f876c8 OpenVPN 3 Core library version 3.6.3
Jira: VULREP-15
 URL: https://openvpn.atlassian.net/browse/VULREP-15
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEgDq5E1p1aZrNLFFkhs+UTJZx/fIFAmDHst8THGRhdmlkc0Bv
 cGVudnBuLm5ldAAKCRCGz5RMlnH98pEaD/9VaUW4M9q7hpwzoCDqktrdaUzpRgvx
 hCYLSzAuIkAgPO1UXQTL6DWazTAI+vUAfuV+a4dgPmSs52qQ3K1UNUtuuQLurBiQ
 AopeNYY2VVZeVhAzDQDQTPsqCLn0Bigy4m4quJZBVOir+hGoSNnK7XTllNDCc8Li
 6PBIzM408B+6ARISxmxIdqlpsYwthYhRSPRPGTFuYqrbaRC85seHeRUTHTTQ/LVi
 uoAikYHm/IuY/CCNQoYX26M9FAtLA6zKWpPtJ4RzB+Muw8kToT5tpsKVZvjgwvN7
 YvcipYeALqQTf/WX7q8BKF24XzOYaZ1DHEuS8H3KLx66ESXHWZlfsb0uoj0Nv0AV
 HDloyhK5W7l+IfNmW4ZrPm2YZnvemLWYJwPQMZqfVkUiqqBmJIvidoAdiyWJUu5r
 YPkwidx3pjfoAqgWUZWYgEuW9hBkTgcj67HpyrCUvdDMby7yf9y+KKEu1hvVnYFw
 Mwq+UbEGagNBkQns5xAMCjhyIDaJhcXFmvIj7p3t4uTmotX2iybV3msdqTc5WEa+
 f5OuBskMhOUaL3DKhVmoUZL3IC7Wz9aoWnwXEUhcHnt7MYlIqL+k41hZZ4WDiIa3
 VsNMdW+dL63duLTfW1yaUSA7ptvni3Q8+6GCB9AWqO9ERdzxWBcXhufh4IO9L79j
 9QC60f/gPhjcnQ==
 =8Jg2
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEgDq5E1p1aZrNLFFkhs+UTJZx/fIFAmDHtPgTHGRhdmlkc0Bv
 cGVudnBuLm5ldAAKCRCGz5RMlnH98mX5D/4kBPuzRqYKxveM5jBZwV4sSM6rC7iS
 N5xAQr2HSVFPhKQFykxAjc5gAPqXEnxGScICCCjCj0a0LNlLT80HukeeClGZQtdC
 L/XwNjkxNUjaBXrqQKm7zehSKUAlmpG8cP+rs+qOKWRQwNfMXkYhMfXAnf7URk1C
 2uu0G8KfK46QyY5eRruNv/V5F2lvIu1Evux1ePVtp4X/kz6axEQFAC4O5ZCDJkZN
 QxbmXh2VJP3MOYO/vOh+OG47kAVxDb3b2eK5xGvwMVikcbqcA50hlX1oj/zntCBQ
 pP/lUPnym7C7xRmRL8v2RoDRLtLvmhld1D8bLOTFdeGrIbrFX0PXWIekHR3RnegG
 TP3CGvwga7iZDF1Ovn6i+fykxkMIxLe6bcVZZTr3oH2djl+LBoahy/wZIRmP1Fwv
 Pf9qyYEjkLcjueIiTPCygONJ5Bo6Q6VcZO8FPmKRzIMP5uFKqOPPlOqfYRsKrNAP
 m1YFFI8+j01bkvPayUgOSYjrHcgfSOm8VhB7EPg+twwcbYrGE4WQFRMAfpKVJd6a
 Cikjx/i79NDTqC6wk2FHm1/ViVlSP5qPZkludSKrK58xz9G6TA9Vhnp0SfWWhXIw
 KmG7sbe9moC3W7o8gQf1SnlK5r+grpNvh+IGAl4sMggvCiZIsxwCK1Ptet8ag5AQ
 rI99XAaeje6snQ==
 =KuRd
 -----END PGP SIGNATURE-----

Merge tag 'release/3.6.3'

OpenVPN 3 Core library version 3.6.3

Signed-off-by: David Sommerseth <davids@openvpn.net>
2021-06-14 21:58:27 +02:00
Lev Stipakov
7d33caef16
agent mac: Update license header
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2021-06-10 23:27:27 +02:00
Lev Stipakov
d31620d0c6
agent mac: move from common
Windows agent has been moved from common to core,
so for consistency move mac agent too.

Since agent and agent-enabled client depend on jsoncpp,
also move jsoncpp build scripts.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2021-06-10 23:06:24 +02:00
Lev Stipakov
0b02023a53
agent win: remove __DATE__ and __TIME__
This is required for deterministic builds.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2021-05-27 12:14:24 +03:00
David Sommerseth
38f2a08d2b
cmake: Clean up duplications
The CMakeLists.txt settings from the project root directory are
inherited by the defined subdirectories automatically.

Also switch to a simpler way of setting the CMAKE_MODULE_PATH.
According to the CMake documentation, this variable is empty by
default [1] and should not need to pull in existing settings.

Finally remove the comment regarding CMake's use case, as we are
moving towards full CMake support for OpenVPN 3.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2021-04-22 12:54:26 +02:00
Heiko Hund
32a32cf04c
add support for dco-win to agent service
Signed-off-by: Heiko Hund <heiko@openvpn.net>
2021-04-14 22:44:50 +02:00
Heiko Hund
dbd05f2562
add TunWin::Type enum for the used driver type
This is in preparation for supporting more than two
TAP driver types on Windows.

Signed-off-by: Heiko Hund <heiko@openvpn.net>
2021-04-14 22:44:48 +02:00
Lev Stipakov
faf9bd46c8
windows agent: install bypass route if host hasn't changed
We skipped bypass route installation if new host address is the same
as previous one. This didin't take into account case when network
has changed and gateway for the host could change.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-10-07 19:46:19 +02:00
Lev Stipakov
d8e99cf5c1 win: improve "add bypass route" logic
When adding bypass route to remote we always use
default gateway. This doesn't work when remote is not
reachable via default gateway (local network,
custom route - OVPN3-653).

Implement "get best gateway" logic by traversing routing
table and find gateway with longest prefix match and
highest metric.

In case of seamless tunnel and redirect-gw "get best gateway"
will return VPN gateway when adding bypass route during reconnect
to another remote. VPN tunnel is likely broken at this point
and bypass route via VPN make reconnect impossible.

Fix that by storing VPN interface index and, when finding best gateway,
filter routes which use VPN interface.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-09-16 18:08:15 +03:00
Arne Schwabe
012e7e8226
Refactor InitProcess to use refcounting
Although the init calls were protected by a mutex more than consumer of
the API will the second one if the uninit was called too early.

While at it, move from explicit init/uninit calls to RAII.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2020-09-02 20:37:01 +02:00
Lev Stipakov
7cf2e210d1
mingw: fix various warnings
- remove unused variable
 - replace deprecated JsonReader with CharReader
 - fix initialization order
 - fix signed-unsigned comparison
 - fix string constant to char* conversion
 - fix unknown (to mingw) format character
 - fix passing NULL to non-pointer agrument
 - remove unneeded #pragma once

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-03-11 19:44:40 +01:00
Lev Stipakov
67fb123b88
ovpnagent: start openvpn process
This is needed to make openvpn-gui client work with openpvn3.

openvpn-gui passes all information, required to start vpn session,
to agent via named pipe. Agent impersonates another end of pipe,
which is gui process, running under user privileges, and starts
openvpn process.

openvpn-gui generates a random password, which is written by agent
into openvpn process's stdin. That password is used by openvpn-gui to
connect to openvpn's management interface.

openvpn-gui creates an event with unique name, which it is passed
to openvpn via command line. When user disconnects VPN session, gui
sets event into signalled state. openvpn waits on event and, when it is signalled, quits.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-05 19:41:54 +01:00
Lev Stipakov
1976c639c1
cmake: add Windows agent build
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-03 11:38:17 +02:00
Lev Stipakov
10127e2bdd
Add GPL headers
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-01-31 10:24:38 +02:00
Lev Stipakov
21aa8b7c99
ovpnagent.cpp: move to another directory
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-01-31 10:24:14 +02:00