diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 1abe1eb..c856ceb 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -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: diff --git a/CMakeLists.txt b/CMakeLists.txt index befbf4e..ebb80fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/CMakePresets.json b/CMakePresets.json index df4efd0..3373111 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -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" } ] } diff --git a/Makefile.am b/Makefile.am index d694fb2..afdf729 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 $@ diff --git a/configure.ac b/configure.ac index 0b14637..117a09e 100644 --- a/configure.ac +++ b/configure.ac @@ -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" diff --git a/manage.c b/manage.c index 8d80b87..cfd96f9 100644 --- a/manage.c +++ b/manage.c @@ -271,6 +271,7 @@ OnManagement(SOCKET sk, LPARAM lParam) { ManagementCommand(c, c->manage.password, NULL, regular); *c->manage.password = '\0'; + continue; } diff --git a/openvpn-gui-res.h b/openvpn-gui-res.h index 8a64018..1380ccc 100644 --- a/openvpn-gui-res.h +++ b/openvpn-gui-res.h @@ -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 diff --git a/openvpn.c b/openvpn.c index 89f5d01..81d457d 100644 --- a/openvpn.c +++ b/openvpn.c @@ -40,6 +40,10 @@ #define WM_DPICHANGED 0x02E0 #endif +#ifdef ENABLE_OVPN3 +#include +#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 */ diff --git a/options.c b/options.c index 41af25c..3844430 100644 --- a/options.c +++ b/options.c @@ -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 diff --git a/options.h b/options.h index 5166d12..3a93ffb 100644 --- a/options.h +++ b/options.h @@ -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 diff --git a/registry.c b/registry.c index 3853eca..e36a8be 100644 --- a/registry.c +++ b/registry.c @@ -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 diff --git a/res/openvpn-gui-res-cs.rc b/res/openvpn-gui-res-cs.rc index b96fd83..3c26657 100644 --- a/res/openvpn-gui-res-cs.rc +++ b/res/openvpn-gui-res-cs.rc @@ -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 */ diff --git a/res/openvpn-gui-res-de.rc b/res/openvpn-gui-res-de.rc index cb3f00c..27d8681 100644 --- a/res/openvpn-gui-res-de.rc +++ b/res/openvpn-gui-res-de.rc @@ -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 */ diff --git a/res/openvpn-gui-res-dk.rc b/res/openvpn-gui-res-dk.rc index 3779129..38a1caa 100644 --- a/res/openvpn-gui-res-dk.rc +++ b/res/openvpn-gui-res-dk.rc @@ -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 */ diff --git a/res/openvpn-gui-res-en.rc b/res/openvpn-gui-res-en.rc index 5e371dc..4d27425 100644 --- a/res/openvpn-gui-res-en.rc +++ b/res/openvpn-gui-res-en.rc @@ -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 */ diff --git a/res/openvpn-gui-res-es.rc b/res/openvpn-gui-res-es.rc index 04aebcc..489b03a 100644 --- a/res/openvpn-gui-res-es.rc +++ b/res/openvpn-gui-res-es.rc @@ -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 */ diff --git a/res/openvpn-gui-res-fa.rc b/res/openvpn-gui-res-fa.rc index 7f225a9..a4b8bdb 100644 --- a/res/openvpn-gui-res-fa.rc +++ b/res/openvpn-gui-res-fa.rc @@ -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 */ diff --git a/res/openvpn-gui-res-fi.rc b/res/openvpn-gui-res-fi.rc index 5239a08..8009c4d 100644 --- a/res/openvpn-gui-res-fi.rc +++ b/res/openvpn-gui-res-fi.rc @@ -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 */ diff --git a/res/openvpn-gui-res-fr.rc b/res/openvpn-gui-res-fr.rc index 33da072..7ba3c8a 100644 --- a/res/openvpn-gui-res-fr.rc +++ b/res/openvpn-gui-res-fr.rc @@ -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 */ diff --git a/res/openvpn-gui-res-it.rc b/res/openvpn-gui-res-it.rc index 3479ad6..1d5fd82 100644 --- a/res/openvpn-gui-res-it.rc +++ b/res/openvpn-gui-res-it.rc @@ -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 */ diff --git a/res/openvpn-gui-res-jp.rc b/res/openvpn-gui-res-jp.rc index 21aeff8..e280930 100644 --- a/res/openvpn-gui-res-jp.rc +++ b/res/openvpn-gui-res-jp.rc @@ -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 */ diff --git a/res/openvpn-gui-res-kr.rc b/res/openvpn-gui-res-kr.rc index d2375ca..344536d 100644 --- a/res/openvpn-gui-res-kr.rc +++ b/res/openvpn-gui-res-kr.rc @@ -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 */ diff --git a/res/openvpn-gui-res-nl.rc b/res/openvpn-gui-res-nl.rc index 891d244..11f7eba 100644 --- a/res/openvpn-gui-res-nl.rc +++ b/res/openvpn-gui-res-nl.rc @@ -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 */ diff --git a/res/openvpn-gui-res-no.rc b/res/openvpn-gui-res-no.rc index 43cd059..852efa6 100644 --- a/res/openvpn-gui-res-no.rc +++ b/res/openvpn-gui-res-no.rc @@ -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 */ diff --git a/res/openvpn-gui-res-pl.rc b/res/openvpn-gui-res-pl.rc index eafcb7c..0f471c6 100644 --- a/res/openvpn-gui-res-pl.rc +++ b/res/openvpn-gui-res-pl.rc @@ -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 */ diff --git a/res/openvpn-gui-res-pt.rc b/res/openvpn-gui-res-pt.rc index b43ad9f..2cddb15 100644 --- a/res/openvpn-gui-res-pt.rc +++ b/res/openvpn-gui-res-pt.rc @@ -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 */ diff --git a/res/openvpn-gui-res-ru.rc b/res/openvpn-gui-res-ru.rc index 5689512..320fa31 100644 --- a/res/openvpn-gui-res-ru.rc +++ b/res/openvpn-gui-res-ru.rc @@ -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 */ diff --git a/res/openvpn-gui-res-se.rc b/res/openvpn-gui-res-se.rc index 9fe57a1..69c8a24 100644 --- a/res/openvpn-gui-res-se.rc +++ b/res/openvpn-gui-res-se.rc @@ -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 */ diff --git a/res/openvpn-gui-res-tr.rc b/res/openvpn-gui-res-tr.rc index 0fe4c04..2fbb5f1 100644 --- a/res/openvpn-gui-res-tr.rc +++ b/res/openvpn-gui-res-tr.rc @@ -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 */ diff --git a/res/openvpn-gui-res-ua.rc b/res/openvpn-gui-res-ua.rc index 1d13826..3524608 100644 --- a/res/openvpn-gui-res-ua.rc +++ b/res/openvpn-gui-res-ua.rc @@ -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 */ diff --git a/res/openvpn-gui-res-zh-hans.rc b/res/openvpn-gui-res-zh-hans.rc index 448603e..d2a1e04 100644 --- a/res/openvpn-gui-res-zh-hans.rc +++ b/res/openvpn-gui-res-zh-hans.rc @@ -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 */ diff --git a/res/openvpn-gui-res-zh-hant.rc b/res/openvpn-gui-res-zh-hant.rc index 3d85819..71204a2 100644 --- a/res/openvpn-gui-res-zh-hant.rc +++ b/res/openvpn-gui-res-zh-hant.rc @@ -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 */ diff --git a/res/openvpn-gui-res.rc b/res/openvpn-gui-res.rc index d72197f..c4fbc31 100644 --- a/res/openvpn-gui-res.rc +++ b/res/openvpn-gui-res.rc @@ -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" diff --git a/service.c b/service.c index 276c010..c32e694 100644 --- a/service.c +++ b/service.c @@ -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) { diff --git a/vcpkg_manifests/openssl_1.1.1/vcpkg.json b/vcpkg_manifests/openssl_1.1.1/vcpkg.json index a9764bb..2f515e6 100644 --- a/vcpkg_manifests/openssl_1.1.1/vcpkg.json +++ b/vcpkg_manifests/openssl_1.1.1/vcpkg.json @@ -2,7 +2,8 @@ "name": "openvpn-gui", "version-string": "0.0.1", "dependencies": [ - "openssl" + "openssl", + "json-c" ], "builtin-baseline": "4b766c1cd17205e1b768c4fadfd5f867c1d0510e", "overrides": [ diff --git a/vcpkg_manifests/openssl_3/vcpkg.json b/vcpkg_manifests/openssl_3/vcpkg.json index 96db2ed..804f9bf 100644 --- a/vcpkg_manifests/openssl_3/vcpkg.json +++ b/vcpkg_manifests/openssl_3/vcpkg.json @@ -2,6 +2,7 @@ "name": "openvpn-gui", "version-string": "0.0.1", "dependencies": [ - "openssl" + "openssl", + "json-c" ] } \ No newline at end of file