mirror of https://github.com/OpenVPN/openvpn-gui
Support for OpenVPN 3
This adds optional support for using OpenVPN3 client as an alternative to openvpn2. Just replacing one client with another will not work: - OpenVPN3 doesn't use interactive service, it uses "agent" service with completely different protocol. OpenVPN GUI needs to talk to agent using HTTP and JSON. - OpenVPN3 management interface realtime notifications must be explicitly turned on in order for GUI to work. To enable using openvpn3: - use any of *-ovpn3 presets (cmake build system) - ./configure --enable-ovpn3 (mingw) To switch betweet openvpn2 and openvpn3, see "OpenVPN Engine" radiobutton group in Settings -> Advanced dialog. OnReady() implementation was slighly changed - "log all on" replaced with "log on all" - according to management interface documentation this is the right way to do it, and also OpenVPN3 only supports "on all" order. Management interface - enabled OpenVPN3 client (omiclient.exe) and agent (ovpnagent.exe) are now part of openvpn3 repo. Co-authored-by: Christopher Ng <facboy@gmail.com> Signed-off-by: Christopher Ng <facboy@gmail.com> Signed-off-by: Lev Stipakov <lev@openvpn.net>pull/418/head
parent
8f3c7a0b38
commit
d60325acde
|
@ -8,12 +8,19 @@ jobs:
|
|||
matrix:
|
||||
arch: [x86, x64, arm64]
|
||||
ossl: [ossl1.1.1, ossl3]
|
||||
ovpn3:
|
||||
- preset: ""
|
||||
name: ""
|
||||
upload_name: ""
|
||||
- preset: -ovpn3
|
||||
name: " - ovpn3"
|
||||
upload_name: "_ovpn3"
|
||||
|
||||
env:
|
||||
# Indicates the location of the vcpkg as a Git submodule of the project repository.
|
||||
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
||||
|
||||
name: 'msvc - ${{matrix.arch}} - ${{ matrix.ossl }}'
|
||||
name: 'msvc - ${{matrix.arch}} - ${{ matrix.ossl }}${{ matrix.ovpn3.name }}'
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -28,15 +35,15 @@ jobs:
|
|||
- name: Run CMake consuming CMakePreset.json and vcpkg.json by mean of vcpkg.
|
||||
uses: lukka/run-cmake@v10
|
||||
with:
|
||||
configurePreset: '${{ matrix.arch }}-release-${{ matrix.ossl }}'
|
||||
buildPreset: '${{ matrix.arch }}-release-${{ matrix.ossl }}'
|
||||
configurePreset: '${{ matrix.arch }}-release-${{ matrix.ossl }}${{ matrix.ovpn3.preset }}'
|
||||
buildPreset: '${{ matrix.arch }}-release-${{ matrix.ossl }}${{ matrix.ovpn3.preset }}'
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: openvpn-gui_${{ matrix.arch }}_${{ matrix.ossl }}
|
||||
name: openvpn-gui_${{ matrix.arch }}_${{ matrix.ossl }}${{ matrix.ovpn3.upload_name }}
|
||||
path: |
|
||||
out/build/${{ matrix.arch }}-release-${{ matrix.ossl }}/*.dll
|
||||
out/build/${{ matrix.arch }}-release-${{ matrix.ossl }}/*.exe
|
||||
out/build/${{ matrix.arch }}-release-${{ matrix.ossl }}${{ matrix.ovpn3.preset }}/*.dll
|
||||
out/build/${{ matrix.arch }}-release-${{ matrix.ossl }}${{ matrix.ovpn3.preset }}/*.exe
|
||||
|
||||
mingw:
|
||||
strategy:
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
option(CLI_OVPN3 "Build ${PROJECT_NAME} with OpenVPN3 support" OFF)
|
||||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
if(NOT VCPKG_MANIFEST_DIR)
|
||||
|
@ -32,7 +34,7 @@ find_package(OpenSSL REQUIRED)
|
|||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||
OpenSSL::SSL
|
||||
Wtsapi32.lib
|
||||
Netapi32.lib
|
||||
|
@ -71,6 +73,16 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE
|
|||
WIN32_LEAN_AND_MEAN
|
||||
HAVE_CONFIG_H)
|
||||
|
||||
if (${CLI_OVPN3})
|
||||
find_package(json-c REQUIRED)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||
json-c::json-c)
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
ENABLE_OVPN3)
|
||||
endif ()
|
||||
|
||||
if(MSVC)
|
||||
# work around msvc generator Debug/Release directory ugliness, doesn't apply for Ninja
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
|
|
|
@ -63,6 +63,13 @@
|
|||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ovpn3",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CLI_OVPN3": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x64-debug-ossl3",
|
||||
"inherits": [ "base", "ossl3", "x64", "debug" ]
|
||||
|
@ -110,6 +117,54 @@
|
|||
{
|
||||
"name": "x86-release-ossl1.1.1",
|
||||
"inherits": [ "base", "ossl1.1.1", "x86", "release" ]
|
||||
},
|
||||
{
|
||||
"name": "x64-debug-ossl3-ovpn3",
|
||||
"inherits": [ "x64-debug-ossl3", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "x64-debug-ossl1.1.1-ovpn3",
|
||||
"inherits": [ "x64-debug-ossl1.1.1", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "arm64-debug-ossl3-ovpn3",
|
||||
"inherits": [ "arm64-debug-ossl3", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "arm64-debug-ossl1.1.1-ovpn3",
|
||||
"inherits": [ "arm64-debug-ossl1.1.1", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "x86-debug-ossl3-ovpn3",
|
||||
"inherits": [ "x86-debug-ossl3", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "x86-debug-ossl1.1.1-ovpn3",
|
||||
"inherits": [ "x86-debug-ossl1.1.1", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "x64-release-ossl3-ovpn3",
|
||||
"inherits": [ "x64-release-ossl3", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "x64-release-ossl1.1.1-ovpn3",
|
||||
"inherits": [ "x64-release-ossl1.1.1", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "arm64-release-ossl3-ovpn3",
|
||||
"inherits": [ "arm64-release-ossl3", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "arm64-release-ossl1.1.1-ovpn3",
|
||||
"inherits": [ "arm64-release-ossl1.1.1", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "x86-release-ossl3-ovpn3",
|
||||
"inherits": [ "x86-release-ossl3", "ovpn3" ]
|
||||
},
|
||||
{
|
||||
"name": "x86-release-ossl1.1.1-ovpn3",
|
||||
"inherits": [ "x86-release-ossl1.1.1", "ovpn3" ]
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
|
@ -172,6 +227,67 @@
|
|||
"name": "arm64-debug-ossl1.1.1",
|
||||
"configurePreset": "arm64-debug-ossl1.1.1",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "x64-release-ossl3-ovpn3",
|
||||
"configurePreset": "x64-release-ossl3-ovpn3",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "x64-release-ossl1.1.1-ovpn3",
|
||||
"configurePreset": "x64-release-ossl1.1.1-ovpn3",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "x86-release-ossl3-ovpn3",
|
||||
"configurePreset": "x86-release-ossl3-ovpn3",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "x86-release-ossl1.1.1-ovpn3",
|
||||
"configurePreset": "x86-release-ossl1.1.1-ovpn3",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "arm64-release-ossl3-ovpn3",
|
||||
"configurePreset": "arm64-release-ossl3-ovpn3",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "arm64-release-ossl1.1.1-ovpn3",
|
||||
"configurePreset": "arm64-release-ossl1.1.1-ovpn3",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "x64-debug-ossl3-ovpn3",
|
||||
"configurePreset": "x64-debug-ossl3-ovpn3",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "x64-debug-ossl1.1.1-ovpn3",
|
||||
"configurePreset": "x64-debug-ossl1.1.1-ovpn3",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "x86-debug-ossl3-ovpn3",
|
||||
"configurePreset": "x86-debug-ossl3-ovpn3",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "x86-debug-ossl1.1.1-ovpn3",
|
||||
"configurePreset": "x86-debug-ossl1.1.1-ovpn3",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "arm64-debug-ossl3-ovpn3",
|
||||
"configurePreset": "arm64-debug-ossl3-ovpn3",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "arm64-debug-ossl1.1.1-ovpn3",
|
||||
"configurePreset": "arm64-debug-ossl1.1.1-ovpn3",
|
||||
"configuration": "Debug"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ dist_doc_DATA = \
|
|||
COPYRIGHT.GPL \
|
||||
COPYING
|
||||
|
||||
AM_CPPFLAGS = $(OPENSSL_CRYPTO_CFLAGS) -D_UNICODE
|
||||
AM_CPPFLAGS = $(OPENSSL_CRYPTO_CFLAGS) -D_UNICODE $(JSON_CFLAGS)
|
||||
AM_CFLAGS = -municode
|
||||
|
||||
openvpn_gui_RESOURCES = \
|
||||
|
@ -110,7 +110,8 @@ openvpn_gui_LDADD = \
|
|||
-lole32 \
|
||||
-lshlwapi \
|
||||
-lsecur32 \
|
||||
-lwininet
|
||||
-lwininet \
|
||||
$(JSON_LIBS)
|
||||
|
||||
openvpn-gui-res.o: $(openvpn_gui_RESOURCES) $(srcdir)/openvpn-gui-res.h
|
||||
$(RCCOMPILE) -i $< -o $@
|
||||
|
|
|
@ -49,6 +49,15 @@ AC_ARG_ENABLE(
|
|||
[enable_password_change="yes"]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[ovpn3],
|
||||
[AS_HELP_STRING([--enable-ovpn3], [enable openvpn3 agent and client @<:@default=no@:>@])],
|
||||
[
|
||||
AC_DEFINE([ENABLE_OVPN3], 1, [Use openvpn3 agent instead of interactive service])
|
||||
PKG_CHECK_MODULES([JSON], [json-c])
|
||||
]
|
||||
)
|
||||
|
||||
case "$host" in
|
||||
*-mingw*)
|
||||
CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN"
|
||||
|
|
1
manage.c
1
manage.c
|
@ -271,6 +271,7 @@ OnManagement(SOCKET sk, LPARAM lParam)
|
|||
{
|
||||
ManagementCommand(c, c->manage.password, NULL, regular);
|
||||
*c->manage.password = '\0';
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,6 +137,9 @@
|
|||
#define ID_EDT_MGMT_PORT 285
|
||||
#define ID_TXT_FOLDER1 286
|
||||
#define ID_EDT_POPUP_MUTE 287
|
||||
#define ID_RB_ENGINE_SELECTION 288
|
||||
#define ID_RB_ENGINE_OVPN2 289
|
||||
#define ID_RB_ENGINE_OVPN3 290
|
||||
|
||||
/* Connections dialog */
|
||||
#define ID_DLG_CONNECTIONS 290
|
||||
|
|
132
openvpn.c
132
openvpn.c
|
@ -40,6 +40,10 @@
|
|||
#define WM_DPICHANGED 0x02E0
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_OVPN3
|
||||
#include <json-c/json.h>
|
||||
#endif
|
||||
|
||||
#include "tray.h"
|
||||
#include "main.h"
|
||||
#include "openvpn.h"
|
||||
|
@ -57,6 +61,9 @@
|
|||
#include "env_set.h"
|
||||
#include "echo.h"
|
||||
|
||||
#define OPENVPN_SERVICE_PIPE_NAME_OVPN2 L"\\\\.\\pipe\\openvpn\\service"
|
||||
#define OPENVPN_SERVICE_PIPE_NAME_OVPN3 L"\\\\.\\pipe\\ovpnagent"
|
||||
|
||||
extern options_t o;
|
||||
|
||||
static BOOL
|
||||
|
@ -110,8 +117,8 @@ void
|
|||
OnReady(connection_t *c, UNUSED char *msg)
|
||||
{
|
||||
ManagementCommand(c, "state on", NULL, regular);
|
||||
ManagementCommand(c, "log all on", OnLogLine, combined);
|
||||
ManagementCommand(c, "echo all on", OnEcho, combined);
|
||||
ManagementCommand(c, "log on all", OnLogLine, combined);
|
||||
ManagementCommand(c, "echo on all", OnEcho, combined);
|
||||
ManagementCommand(c, "bytecount 5", NULL, regular);
|
||||
}
|
||||
|
||||
|
@ -1492,7 +1499,8 @@ CloseServiceIO (service_io_t *s)
|
|||
static BOOL
|
||||
InitServiceIO (service_io_t *s)
|
||||
{
|
||||
DWORD dwMode = PIPE_READMODE_MESSAGE;
|
||||
DWORD dwMode = o.ovpn_engine == OPENVPN_ENGINE_OVPN3 ? PIPE_READMODE_BYTE : PIPE_READMODE_MESSAGE;
|
||||
|
||||
CLEAR(*s);
|
||||
|
||||
/* auto-reset event used for signalling i/o completion*/
|
||||
|
@ -1502,8 +1510,9 @@ InitServiceIO (service_io_t *s)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
s->pipe = CreateFile(_T("\\\\.\\pipe\\openvpn\\service"),
|
||||
GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
|
||||
s->pipe = CreateFile (o.ovpn_engine == OPENVPN_ENGINE_OVPN3 ?
|
||||
OPENVPN_SERVICE_PIPE_NAME_OVPN3 : OPENVPN_SERVICE_PIPE_NAME_OVPN2,
|
||||
GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
|
||||
|
||||
if ( !s->pipe ||
|
||||
s->pipe == INVALID_HANDLE_VALUE ||
|
||||
|
@ -2055,6 +2064,58 @@ SetProcessPriority(DWORD *priority)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_OVPN3
|
||||
inline static
|
||||
struct json_object* json_object_new_utf16_string(wchar_t *utf16)
|
||||
{
|
||||
DWORD input_size = WideCharToMultiByte(CP_UTF8, 0, utf16, -1, NULL, 0, NULL, NULL);
|
||||
struct json_object* jobj = NULL;
|
||||
char *utf8 = malloc(input_size);
|
||||
if (!utf8)
|
||||
{
|
||||
goto out;
|
||||
}
|
||||
|
||||
WideCharToMultiByte(CP_UTF8, 0, utf16, -1, utf8, input_size, NULL, NULL);
|
||||
|
||||
jobj = json_object_new_string(utf8);
|
||||
free(utf8);
|
||||
|
||||
out:
|
||||
return jobj;
|
||||
}
|
||||
|
||||
static char* PrepareStartJsonRequest(connection_t *c, wchar_t *exit_event_name)
|
||||
{
|
||||
const char *request_header = "POST /start HTTP/1.1\r\nContent-Type: application/json\r\nContent-Length: %zd\r\n\r\n";
|
||||
json_object *jobj = json_object_new_object();
|
||||
|
||||
json_object_object_add(jobj, "config_file", json_object_new_utf16_string(c->config_file));
|
||||
json_object_object_add(jobj, "config_dir", json_object_new_utf16_string(c->config_dir));
|
||||
json_object_object_add(jobj, "exit_event_name", json_object_new_utf16_string(exit_event_name));
|
||||
json_object_object_add(jobj, "management_password", json_object_new_string(c->manage.password));
|
||||
json_object_object_add(jobj, "management_host", json_object_new_string(inet_ntoa(c->manage.skaddr.sin_addr)));
|
||||
json_object_object_add(jobj, "management_port", json_object_new_int(ntohs(c->manage.skaddr.sin_port)));
|
||||
json_object_object_add(jobj, "log", json_object_new_utf16_string(c->log_path));
|
||||
json_object_object_add(jobj, "log-append", json_object_new_int(o.log_append));
|
||||
|
||||
const char *body = json_object_to_json_string(jobj);
|
||||
|
||||
int len = snprintf(NULL, 0, request_header, strlen(body)) + strlen(body) + 1;
|
||||
char* request = calloc(1, len);
|
||||
if (request == NULL)
|
||||
{
|
||||
goto out;
|
||||
}
|
||||
sprintf_s(request, len, request_header, strlen(body));
|
||||
strcat_s(request, len, body);
|
||||
|
||||
out:
|
||||
json_object_put(jobj);
|
||||
return request;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Launch an OpenVPN process and the accompanying thread to monitor it
|
||||
*/
|
||||
|
@ -2123,28 +2184,44 @@ StartOpenVPN(connection_t *c)
|
|||
/* Try to open the service pipe */
|
||||
if (use_iservice && InitServiceIO(&c->iserv))
|
||||
{
|
||||
DWORD size = _tcslen(c->config_dir) + _tcslen(options) + sizeof(c->manage.password) + 3;
|
||||
TCHAR startup_info[1024];
|
||||
BOOL res = FALSE;
|
||||
|
||||
if ( !AuthorizeConfig(c))
|
||||
if (o.ovpn_engine == OPENVPN_ENGINE_OVPN3)
|
||||
{
|
||||
CloseHandle(c->exit_event);
|
||||
CloseServiceIO(&c->iserv);
|
||||
goto out;
|
||||
#ifdef ENABLE_OVPN3
|
||||
char *request = PrepareStartJsonRequest(c, exit_event_name);
|
||||
|
||||
res = (request != NULL) && WritePipe(c->iserv.pipe, request, strlen(request));
|
||||
free(request);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
DWORD size = _tcslen(c->config_dir) + _tcslen(options) + sizeof(c->manage.password) + 3;
|
||||
TCHAR startup_info[1024];
|
||||
|
||||
if (!AuthorizeConfig(c))
|
||||
{
|
||||
CloseHandle(c->exit_event);
|
||||
CloseServiceIO(&c->iserv);
|
||||
goto out;
|
||||
}
|
||||
|
||||
c->hProcess = NULL;
|
||||
c->manage.password[sizeof(c->manage.password) - 1] = '\n';
|
||||
|
||||
/* Ignore pushed route-method when service is in use */
|
||||
const wchar_t* extra_options = L" --pull-filter ignore route-method";
|
||||
size += wcslen(extra_options);
|
||||
|
||||
_sntprintf_0(startup_info, L"%ls%lc%ls%ls%lc%.*hs", c->config_dir, L'\0',
|
||||
options, extra_options, L'\0', sizeof(c->manage.password), c->manage.password);
|
||||
c->manage.password[sizeof(c->manage.password) - 1] = '\0';
|
||||
|
||||
res = WritePipe(c->iserv.pipe, startup_info, size * sizeof(TCHAR));
|
||||
}
|
||||
|
||||
c->hProcess = NULL;
|
||||
c->manage.password[sizeof(c->manage.password) - 1] = '\n';
|
||||
|
||||
/* Ignore pushed route-method when service is in use */
|
||||
const wchar_t *extra_options = L" --pull-filter ignore route-method";
|
||||
size += wcslen(extra_options);
|
||||
|
||||
_sntprintf_0(startup_info, L"%ls%lc%ls%ls%lc%.*hs", c->config_dir, L'\0',
|
||||
options, extra_options, L'\0', sizeof(c->manage.password), c->manage.password);
|
||||
c->manage.password[sizeof(c->manage.password) - 1] = '\0';
|
||||
|
||||
if (!WritePipe(c->iserv.pipe, startup_info, size * sizeof (TCHAR)))
|
||||
if (!res)
|
||||
{
|
||||
ShowLocalizedMsg (IDS_ERR_WRITE_SERVICE_PIPE);
|
||||
CloseHandle(c->exit_event);
|
||||
|
@ -2152,6 +2229,15 @@ StartOpenVPN(connection_t *c)
|
|||
goto out;
|
||||
}
|
||||
}
|
||||
#ifdef ENABLE_OVPN3
|
||||
else if (o.ovpn_engine == OPENVPN_ENGINE_OVPN3)
|
||||
{
|
||||
ShowLocalizedMsg(IDS_ERR_WRITE_SERVICE_PIPE);
|
||||
CloseHandle(c->exit_event);
|
||||
CloseServiceIO(&c->iserv);
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
/* Start OpenVPN directly */
|
||||
|
|
|
@ -651,6 +651,9 @@ SaveAdvancedDlgParams (HWND hdlg)
|
|||
tmp = GetDlgItemInt (hdlg, ID_EDT_POPUP_MUTE, &status, FALSE);
|
||||
if (status) o.popup_mute_interval = tmp;
|
||||
|
||||
o.ovpn_engine = IsDlgButtonChecked(hdlg, ID_RB_ENGINE_OVPN3) ?
|
||||
OPENVPN_ENGINE_OVPN3 : OPENVPN_ENGINE_OVPN2;
|
||||
|
||||
SaveRegistryKeys ();
|
||||
ExpandOptions ();
|
||||
|
||||
|
@ -680,6 +683,11 @@ LoadAdvancedDlgParams (HWND hdlg)
|
|||
CheckRadioButton (hdlg, ID_RB_BALLOON3, ID_RB_BALLOON4, ID_RB_BALLOON4);
|
||||
else
|
||||
CheckRadioButton (hdlg, ID_RB_BALLOON3, ID_RB_BALLOON4, ID_RB_BALLOON3);
|
||||
|
||||
#ifdef ENABLE_OVPN3
|
||||
CheckRadioButton(hdlg, ID_RB_ENGINE_OVPN2, ID_RB_ENGINE_OVPN3,
|
||||
o.ovpn_engine == OPENVPN_ENGINE_OVPN3 ? ID_RB_ENGINE_OVPN3 : ID_RB_ENGINE_OVPN2);
|
||||
#endif
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK
|
||||
|
|
|
@ -92,6 +92,9 @@ typedef struct {
|
|||
#define CONFIG_VIEW_FLAT (1)
|
||||
#define CONFIG_VIEW_NESTED (2)
|
||||
|
||||
#define OPENVPN_ENGINE_OVPN2 (0)
|
||||
#define OPENVPN_ENGINE_OVPN3 (1)
|
||||
|
||||
typedef struct {
|
||||
unsigned short major, minor, build, revision;
|
||||
} version_t;
|
||||
|
@ -210,6 +213,7 @@ typedef struct {
|
|||
DWORD popup_mute_interval; /* Interval in hours to suppress repeated echo messages */
|
||||
DWORD mgmt_port_offset; /* management interface port = this offset + index of connection profile */
|
||||
|
||||
DWORD ovpn_engine; /* 0 - openvpn2, 1 - openvpn3 */
|
||||
#ifdef DEBUG
|
||||
FILE *debug_fp;
|
||||
#endif
|
||||
|
|
|
@ -66,6 +66,7 @@ struct regkey_int {
|
|||
{L"popup_mute_interval", &o.popup_mute_interval, 24},
|
||||
{L"disable_popup_messages", &o.disable_popup_messages, 0},
|
||||
{L"management_port_offset", &o.mgmt_port_offset, 25340},
|
||||
{L"ovpn_engine", &o.ovpn_engine, OPENVPN_ENGINE_OVPN2}
|
||||
};
|
||||
|
||||
static int
|
||||
|
|
|
@ -169,7 +169,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Pokročilé"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -211,6 +211,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -170,7 +170,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Erweitert"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -212,6 +212,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -169,7 +169,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Avanceret"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -211,6 +211,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -183,7 +183,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Advanced"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -225,6 +225,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -167,7 +167,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Advanced"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -209,6 +209,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -171,7 +171,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "پیشرفته"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -213,6 +213,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -168,7 +168,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Lisäasetukset"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -210,6 +210,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -168,7 +168,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Avancé"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -210,6 +210,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -168,7 +168,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Avanzate"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -210,6 +210,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -169,7 +169,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "詳細設定"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -211,6 +211,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "時間", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -170,7 +170,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "상세"
|
||||
FONT 9, "맑은 고딕"
|
||||
|
@ -212,6 +212,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -169,7 +169,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Geavanceerd"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -211,6 +211,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -168,7 +168,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Avansert"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -210,6 +210,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -169,7 +169,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Zaawansowane"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -211,6 +211,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -167,7 +167,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Avançado"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -209,6 +209,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -170,7 +170,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Расширенные"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -212,6 +212,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -167,7 +167,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Advanced"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -209,6 +209,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -169,7 +169,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Advanced"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -211,6 +211,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -168,7 +168,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "Додаткові"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -210,6 +210,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -171,7 +171,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "高级"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -213,6 +213,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -171,7 +171,7 @@ BEGIN
|
|||
END
|
||||
|
||||
/* Advanced Dialog */
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, 280
|
||||
ID_DLG_ADVANCED DIALOGEX 6, 18, 252, ADVANCED_DIALOG_HEIGHT
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CENTER
|
||||
CAPTION "進階"
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
|
@ -213,6 +213,12 @@ BEGIN
|
|||
EDITTEXT ID_EDT_POPUP_MUTE, 150, 258, 30, 12, ES_AUTOHSCROLL
|
||||
LTEXT "hours", 209, 190, 260, 40, 10
|
||||
|
||||
#if ENABLE_OVPN3
|
||||
GROUPBOX "OpenVPN Engine", ID_RB_ENGINE_SELECTION, 6, 283, 235, 30
|
||||
AUTORADIOBUTTON "OpenVPN2", ID_RB_ENGINE_OVPN2, 18, 296, 50, 10, WS_GROUP | WS_TABSTOP
|
||||
AUTORADIOBUTTON "OpenVPN3 (experimental)", ID_RB_ENGINE_OVPN3, 76, 296, 90, 10
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
/* About Dialog */
|
||||
|
|
|
@ -39,6 +39,12 @@ ID_ICO_CONNECTED ICON DISCARDABLE "connected.ico"
|
|||
ID_ICO_CONNECTING ICON DISCARDABLE "connecting.ico"
|
||||
ID_ICO_DISCONNECTED ICON DISCARDABLE "disconnected.ico"
|
||||
|
||||
#ifdef ENABLE_OVPN3
|
||||
#define ADVANCED_DIALOG_HEIGHT 320
|
||||
#else
|
||||
#define ADVANCED_DIALOG_HEIGHT 280
|
||||
#endif
|
||||
|
||||
#include "openvpn-gui-res-cs.rc"
|
||||
#include "openvpn-gui-res-de.rc"
|
||||
#include "openvpn-gui-res-dk.rc"
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
#include "openvpn-gui-res.h"
|
||||
#include "localization.h"
|
||||
|
||||
#define OPENVPN_SERVICE_NAME_OVPN3 L"ovpnagent"
|
||||
#define OPENVPN_SERVICE_NAME_OVPN2 L"OpenVPNServiceInteractive"
|
||||
|
||||
extern options_t o;
|
||||
|
||||
int MyStartService()
|
||||
|
@ -266,8 +269,9 @@ CheckIServiceStatus(BOOL warn)
|
|||
if (NULL == schSCManager)
|
||||
return(false);
|
||||
|
||||
schService = OpenService(schSCManager, _T("OpenVPNServiceInteractive"),
|
||||
SERVICE_QUERY_STATUS);
|
||||
schService = OpenService(schSCManager, o.ovpn_engine == OPENVPN_ENGINE_OVPN3 ?
|
||||
OPENVPN_SERVICE_NAME_OVPN3 : OPENVPN_SERVICE_NAME_OVPN2, SERVICE_QUERY_STATUS);
|
||||
|
||||
if (schService == NULL &&
|
||||
GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
"name": "openvpn-gui",
|
||||
"version-string": "0.0.1",
|
||||
"dependencies": [
|
||||
"openssl"
|
||||
"openssl",
|
||||
"json-c"
|
||||
],
|
||||
"builtin-baseline": "4b766c1cd17205e1b768c4fadfd5f867c1d0510e",
|
||||
"overrides": [
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"name": "openvpn-gui",
|
||||
"version-string": "0.0.1",
|
||||
"dependencies": [
|
||||
"openssl"
|
||||
"openssl",
|
||||
"json-c"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue