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

2913 Commits

Author SHA1 Message Date
Lev Stipakov
e5f7fd55d8
cmake: disable agent path check for omiclient
This is useful for debugging.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-05 19:41:53 +01:00
David Sommerseth
5f092b80c1
Import AWS support code from internal Common library
This open sources support code used to interact with AWS from an
OpenVPN 3 implementation.  Prior to this change it, it was hosted in
a different git repository which was not open to the public.

The complete git history related to files being moved has been applied
to this repository.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2020-02-05 19:31:19 +01:00
Lev Stipakov
b2e8cb42f0
Add GPL headers
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-05 20:08:58 +02:00
James Yonan
f3c5a7a77e
json: added write_fast() method
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:57 +02:00
James Yonan
d9681076c1
json: read_fast(): added optional flag
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:57 +02:00
James Yonan
ce7dc7cad4
json::write_atomic: support mtime_ns parameter (nanoseconds-since-epoch)
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:56 +02:00
James Yonan
558cd3770a
json::write_atomic(): fixed bug where method was not writing actual JSON content
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:56 +02:00
James Yonan
45298001a0
json::read_fast: make optional flag implicit
Also interpret an empty file the same as a non-existent file.

Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:55 +02:00
James Yonan
f5dcb29b83
jsonfile.hpp: for read_fast() and read_binary_unix(), rename "must_exist" boolean to "optional" with reversal of value interpretation.
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:55 +02:00
James Yonan
4110d23d25
Added json::read_fast() and json::write_atomic()
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:54 +02:00
Lev Stipakov
b8ff04be75
aws: support for temporary credentials
- add optional token parameter, which is required when
using temporary credentials

 - add optional role parameter to fetch
temporary credentials

 - make route API param more fine grained

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-05 20:08:54 +02:00
James Yonan
fae6a3d62f
AWS::REST: support S3 request signing
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:53 +02:00
James Yonan
c21de25c1f
copyright: updated to 2017
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:53 +02:00
James Yonan
702b3a81b7
AWS: created mini-SDK for VPC routing API. 2020-02-05 20:08:52 +02:00
Lev Stipakov
1a4bff66af
aws: support for temporary credentials
- add optional token parameter, which is required when
using temporary credentials

 - add optional role parameter to fetch
temporary credentials

 - make route API param more fine grained

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-05 20:08:52 +02:00
James Yonan
b84345dfa6
AWS C++: AWS::Creds: added defined() and to_string() methods
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:51 +02:00
James Yonan
1324be80f6
copyright: updated to 2017
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:50 +02:00
James Yonan
86480f71f5
AWS: created mini-SDK for VPC routing API. 2020-02-05 20:08:50 +02:00
Lev Stipakov
d534049f5e
aws: support for temporary credentials
- add optional token parameter, which is required when
using temporary credentials

 - add optional role parameter to fetch
temporary credentials

 - make route API param more fine grained

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-05 20:08:49 +02:00
James Yonan
1af01f3e20
Minor SNI-related changes to code that depends on the SSL layer
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:49 +02:00
James Yonan
d186d8b66e
WS::ClientSet: misc changes
* HostRetry, which is essentially a string vector, now
  inherits directly from std::vector<std::string>

* WS::ClientSet doesn't need a crypto-grade RNG, so rename
  rng to prng.

* WS::ClientSet almost always contains a single client
  object, so use std::map instead of std::unordered_map
  to contain it so as to reduce overhead.

Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:48 +02:00
James Yonan
e895716717
Added i/o abstraction layer.
Created a lightweight abstraction layer so that another i/o
reactor can be dropped in place of asio.

This commit includes:

* Added ASIO=1 to many "go" scripts that require asio
* Renamed "asio::" to "openvpn_io::".

Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:48 +02:00
James Yonan
3d3e3ec767
copyright: updated to 2017
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:47 +02:00
James Yonan
8a08aba016
random : RandomAPI::assert_crypto() should now be called before any RNG is used for crypto purposes. 2020-02-05 20:08:47 +02:00
James Yonan
671c0beb99
AWS : minor changes to AWS::PCQuery:
1. added new method AWS::PCQuery::Info::instance_data_defined()
2. added some missing includes
2020-02-05 20:08:46 +02:00
James Yonan
1fab99f436
AWS : created AWS namespace for AWS API stuff. Created test/aws for AWS tests, and moved previous awspc test into it. 2020-02-05 20:08:46 +02:00
James Yonan
e46a3cb53f
copyright : updated to 2016 2020-02-05 20:08:45 +02:00
James Yonan
ee981f0bd3
AWS : added class AwsPCQuery and tests for fetching AWS instance data such as:
1. instanceId
2. region
3. privateIp
4. concurrentConnections
2020-02-05 20:08:45 +02:00
James Yonan
9667cbe3dd
AWS C++: don't hardcode CA in api_ca(), instead return /etc/ssl/certs/ca-certificates.crt
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:44 +02:00
James Yonan
203b833b92
copyright: updated to 2017
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:43 +02:00
James Yonan
4eb87ef38e
AWS: created mini-SDK for VPC routing API. 2020-02-05 20:08:43 +02:00
James Yonan
b87d69ec32
WS::ClientSet: HTTP persistence refactor
HTTP persistence across transaction sets can now be
simplified using assign_http_state()

Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:43 +02:00
James Yonan
8dd3c8fa9c
AWS: increase max_retries to 10 (from 5) and decrease retry delay to 1 sec (from 5)
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:42 +02:00
James Yonan
2a3be2fc87
AWS::HTTPContext: don't enable SSLConst::LOG_VERIFY_STATUS unless debug_level >= 2
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:41 +02:00
James Yonan
8d621c18e9
AWS::HTTPContext: increase frame size to 2048 (from 1024)
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:41 +02:00
James Yonan
5ca8077934
copyright: updated to 2017
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:40 +02:00
James Yonan
030b65a0cd
AWS: created mini-SDK for VPC routing API. 2020-02-05 20:08:39 +02:00
Lev Stipakov
5491b30657
xmlhelper.hpp: support for new tinyxml2 API
Since version 6.0.0, tinyxml2 has introduced an API change
which broke compatibility with previous versions, see
https://github.com/leethomason/tinyxml2/issues/635

The library doesn't provide macros to check its version
in compile time, so we use pkg-config to determine library
version and define our own macro which we use for compatibility
with old (Ubuntu 16) and new (Ubuntu 18) library versions.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-05 20:08:39 +02:00
James Yonan
4253b28896
xmlhelper: misc changes
* added next_sibling() methods
* fully specify tinyxml2::XMLDocument::Parse()
* use #pragma once

Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:38 +02:00
James Yonan
71c55b6e48
copyright: updated to 2017
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:38 +02:00
James Yonan
624f9d1467
license : this branch (common) is proprietary, so remove all GPL headers.
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:37 +02:00
James Yonan
92b9b51b30
library : added TinyXML2 dependency 2020-02-05 20:08:37 +02:00
Lev Stipakov
99d4fd2b85
aws: support for temporary credentials
- add optional token parameter, which is required when
using temporary credentials

 - add optional role parameter to fetch
temporary credentials

 - make route API param more fine grained

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-05 20:08:36 +02:00
Lev Stipakov
de91d4ad73
awsroute.hpp: refactor route management API
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-05 20:08:36 +02:00
Lev Stipakov
bc0c55af81
awsroute.hpp: use refactored TransactionSet API
TransactionSet API was refactored in commit fa35c78.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-05 20:08:35 +02:00
James Yonan
c60f27cc3b
copyright: updated to 2017
Signed-off-by: James Yonan <james@openvpn.net>
2020-02-05 20:08:35 +02:00
James Yonan
32875ee9b2
AWS: created mini-SDK for VPC routing API. 2020-02-05 20:08:34 +02:00
David Sommerseth
5f688d0972
Import Windows ovpnagent from internal Common library
This open sources the ovpnagent used in Windows to interact with an
OpenVPN 3 client.  Prior to this change it, it was hosted in a different
git repository which was not open to the public.

The complete git history related to files being moved has been applied
to this repository.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2020-02-05 19:01:08 +01:00
Lev Stipakov
b6fcca84c1
omiclient: remove msvc project files
We use cmake instead.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-03 11:38:17 +02:00
Lev Stipakov
7c08341284
appveyor: add agent build
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-02-03 11:38:17 +02:00