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

37 Commits

Author SHA1 Message Date
Samuli Seppänen
04b2a3c9b7 Switch from AGPLv3 to GPLv3
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
2017-03-16 14:43:55 +02:00
James Yonan
971abda88f copyright : updated to 2016 2016-09-03 23:29:23 -06:00
James Yonan
134ba710f2 ovpn3 core globals cleanup:
1. move all const globals into anonymous namespace
2. make sure that all non-class functions are inline
3. refactor class static data members
2015-11-25 11:34:41 -07:00
James Yonan
b75c780cab Renamed boost::intrusive_ptr<T> usage to RCPtr<T>. 2015-05-17 21:26:53 -06:00
James Yonan
35ac9f6229 Renamed types.hpp to size.hpp since it now only defines
size_t and ssize_t.
2015-05-17 13:27:34 -06:00
James Yonan
fe6fcefa61 C++11 : rename NULL to nullptr 2015-05-17 02:53:37 -06:00
James Yonan
0fde33173a C++11 update: mass replace of boost::uint/int to std::uint/int. 2015-04-23 17:55:07 -06:00
James Yonan
c2c7292a70 Updated copyright to 2015. 2015-01-06 12:56:21 -07:00
James Yonan
8482f7f76d Misc changes to dynamically support OpenVPN protocols V1 and V2:
1. force_aes_cbc_ciphersuites flag will disable V2.

2. Added class CryptoDCSettings to Manage cipher/digest settings,
   DC factory, and DC context.  A CryptoDCSettings instance is
   now declared as a member of ProtoContext::Config and is used
   to define the cipher/digest pair of the config.

3. ProtoContext::Config::load now parses the "tun-mtu" directive.

Server-side changes:

1. Parse "keepalive" directive, using the same logic
   as OpenVPN 2.x.

2. Added ProtoContext::init_data_channel() method for initializing
   the data channel after IV_x peer info received from client.
2014-12-29 22:20:50 -07:00
James Yonan
7e1d159cee Major protocol upgrades:
* peer_id/DATA_V2/op32
  client -> server:
    IV_PROTO=2
  server -> client :
    push "peer-id 1234"
    push "peer-id -1"

* AEAD/GCM support
  client -> server:
    IV_NCP=2
  server -> client:
    push "cipher AES-256-GCM"

* Compression V2
  client -> server:
    IV_LZ4v2=1
    IV_COMP_STUBv2=1
  server -> client:
    push "compress stub-v2"
    push "compress lz4-v2"

* TCP non-linear packet ID
  client -> server:
    IV_TCPNL=1
  server -> client:
    [always enabled]
2014-12-21 10:32:37 -07:00
James Yonan
2c6d972ad6 Added AGPL copyright/licensing language. 2014-07-20 21:22:06 -06:00
James Yonan
08e6937cc5 Core: workaround for LZO integer overflow bug. Don't accept
decompressed payloads larger than 64KB.
2014-07-09 17:44:47 -06:00
James Yonan
2cbe310f35 OpenVPN 1.0.4 build 114 (iOS)
Dusted off LZ4 implementation and enabled in iOS
and cli.cpp builds.

Tested LZ4 as well with OpenVPN 3 acting as the client,
with a hacked AS and OpenVPN 2.3 (JY) acting as the server
(see lz4hack patches).
2013-12-27 22:21:22 -07:00
James Yonan
1481327d72 OpenVPN 1.0.2 build 98 (iOS)
Ported iOS client and OpenVPN 3 core to ARM-64.
Now building a "fat binary" with Xcode 5.0.1 that
targets arm7, arm7s, and arm64.

Outstanding issues:

* IPv6 doesn't route through tunnel on iOS7
* Client doesn't install on iOS 5.1.1.
2013-11-11 12:33:35 -07:00
James Yonan
4d9a751af2 Added head comments to all source files.
Minor reorganization of unicode code.
2012-11-23 06:18:43 +00:00
James Yonan
d647a07b24 Minor changes. 2012-09-26 23:41:16 +00:00
James Yonan
6366c848d2 LZO-Asym: Fixed possible signed/unsigned issue on CHECK_x macros. 2012-09-26 23:39:18 +00:00
James Yonan
2bd85245d6 LZO-Asym optimizations for ARM. 2012-09-26 07:20:42 +00:00
James Yonan
e19137013c Reimplemented lzoasym_impl.hpp using improved primitives for incremental
and regular memory copy operations.
2012-09-26 01:37:11 +00:00
James Yonan
e64f429095 When reporting client compression capabilities to server, include
IV_COMP_STUB whenever IV_LZO_STUB is reported.
2012-09-17 21:41:41 +00:00
James Yonan
1ba895a6a0 Added NO_LZO preprocessor flag to disable inclusion of all LZO
functionality (including LZO-Asym) except for LZO stub:

NO_LZO   -- disable all LZO functionality except for stub
HAVE_LZO -- use LZO library for compression/decompression
default  -- use LZO-Asym decompressor (no compression)

Added init_process call to start of test/ovpncli/cli.cpp
2012-09-11 08:45:27 +00:00
James Yonan
930630ee15 Minor changes to LZOAsym decompressor. 2012-09-11 07:56:01 +00:00
James Yonan
b7cf79fed9 Added test tool for compression code. 2012-09-10 08:00:32 +00:00
James Yonan
505b7d6d7f Minor changes to compressor classes to facilitate testing. 2012-09-10 00:01:49 +00:00
James Yonan
70220595ca Minor debug verbosity fix to LZOAsym. 2012-09-09 22:57:35 +00:00
James Yonan
0caeeb533e Turned on snappy compression support in mobile clients. 2012-09-08 23:02:09 +00:00
James Yonan
4136c1d618 Compression selector in mobile clients is now 3-state:
yes -- support compression on both uplink and downlink
asym -- support compression on downlink only
no (default) -- no compression (stubs only)

Added our own internal LZO decompressor, which is enabled when
HAVE_LZO is undefined and the standard LZO library is not linked.
This allows clients to support LZO in downlink mode only
if the library isn't available.
2012-09-08 01:36:54 +00:00
James Yonan
8b7b797ef5 iOS version: 1.0 Beta 17
Android version: 1.1 beta 1

More alignment of iOS and Android clients:

* Normalized building of dependencies for Android and iOS:

  This build adds some new library dependencies:
  The library versions required are enumerated in
  ovpn3/lib-versions, currently:

    export BOOST_VERSION=boost_1_51_0
    export OPENSSL_VERSION=openssl-1.0.1c
    export POLARSSL_VERSION=polarssl-1.1.4
    export LZO_VERSION=lzo-2.06

  To build, first mkdir ~/src/android and ~/src/mac if they don't
  already exist.  Set the env var O3 to point to the ovpn3 dir,
  usually ~/src/ovpn3.

  Build on iOS:

    [set PATH to include NDK]
    cd ~/src/android
    $O3/scripts/android/build-boost
    $O3/scripts/android/build-minicrypto
    $O3/scripts/android/build-polarssl
    $O3/scripts/android/build-lzo

  Build on Android:

    [set PATH to include NDK]
    cd ~/src/android
    $O3/scripts/android/build-boost
    $O3/scripts/android/build-minicrypto
    $O3/scripts/android/build-polarssl
    $O3/scripts/android/build-lzo

* Integrated Minicrypto library (an assembly language library
  of low-level crypto functions adapted from OpenSSL).

* Added LZO compression with a preference/settings item
  to enable or disable.

* Added special compression handling to support older servers
  that ignore compression handshake -- this will handle receiving
  compressed packets even if we didn't ask for them.

* Normalized profile naming conventions.

iOS changes:

* Log tunnel performance stats immediately on disconnection
  of tunnel.

Android changes:

* Client now supports loading profiles as attachments
  opened from other apps.

* Added Import Private Tunnel menu item, however current
  Private Tunnel download page needs to be adapted to fit
  requirements of Android download manager.

* Enter key should advance to the next input field,
  or connect if entered from the last field.

* Import from Access Server now provides the option to
  download autologin vs. userlogin profiles.

* "About" page now shows copyright text for included
  libraries/content (except for LZO and PolarSSL
  which will presumably be commercially licensed).
2012-09-05 01:09:34 +00:00
James Yonan
a6b6d487ef Global edit to add copyright notice at head of each source file. 2012-08-24 21:13:42 +00:00
James Yonan
582c8f3977 OpenVPN 1.0 Beta 13 (iOS)
* Fixed issue with non-pushed "comp-lzo" statically declared in
  config file.

* Show Peer info in log.

* Increment core version number to 1.0.
2012-08-23 14:25:50 +00:00
James Yonan
a421d5a202 OpenVPN 1.0 Beta 12 (iOS)
* Added LZO compression

* Updated Boost to 1_51_0

* Cleaned up build scripts so that dependencies can be built
  more easily:

  cd ~/src/mac
  $O3/scripts/mac/build-boost
  $O3/scripts/mac/build-polarssl
  $O3/scripts/mac/build-lzo

* Build scripts now build for OS X as well as iOS
2012-08-23 02:08:46 +00:00
James Yonan
e7a5d9f55b Start process of moving client logic out of cli.cpp into
general-purpose classes.

Rename ProtoStats to SessionStats and make it more flexible
by using an abstract base class model.

Add a client event queue for the beginnings of a client-backend
API.

Added logic to ProtoContext to invalidate session on certain
kinds of errors in TCP that would be normally be okay in UDP
such as HMAC_ERROR, DECRYPT_ERROR, etc.

Add some alignment adjustment logic for READ_LINK_TCP (3 bytes)
and READ_LINK_UDP (1 byte).
2012-02-04 10:24:54 +00:00
James Yonan
b31a80da6b Added compression methods LZO, LZ4, and Snappy.
Note that only LZO has been tested yet.
2012-01-31 11:15:21 +00:00
James Yonan
7371bd8e14 First working version of cli that can be entirely driven from config
file.  Currently limited to UDP, runs only on Linux, and supports
pushed redirect-gateway but not route directives.
2011-12-18 10:50:08 +00:00
James Yonan
990231b226 First successful negotiation with AS.
Still need to parse and apply PUSH_REPLY options.
2011-12-16 10:02:15 +00:00
James Yonan
c8f7b0ff2f Keepalive implementation. 2011-12-15 08:48:14 +00:00
James Yonan
44ee74f374 Added compression framework.
Implemented LZO_STUB compressor.

Added methods to generate options and peer info strings.
2011-12-14 11:34:33 +00:00