Содержание
- OpenVPN Support Forum
- mac m1 connect error:Transport Error: socket_protect error (UDP)
- mac m1 connect error:Transport Error: socket_protect error (UDP)
- Re: mac m1 connect error:Transport Error: socket_protect error (UDP)
- Error calling protect method on socket [Mac M1] #243
- Comments
- Footer
- bug for mac #139
- Comments
- Footer
- Socket protect error openvpn mac
OpenVPN Support Forum
Community Support Forum
mac m1 connect error:Transport Error: socket_protect error (UDP)
mac m1 connect error:Transport Error: socket_protect error (UDP)
Post by jagger » Mon Jun 06, 2022 1:15 pm
macos system monterey version 12.4
openvpn version: 3.3.6(4368)
error log:
⏎[Jun 6, 2022, 21:04:06] Transport Error: socket_protect error (UDP)
⏎[Jun 6, 2022, 21:04:06] Client terminated, restarting in 2000 ms.
⏎[Jun 6, 2022, 21:04:08] EVENT: RECONNECTING ⏎[Jun 6, 2022, 21:04:08] EVENT: RESOLVE ⏎[Jun 6, 2022, 21:04:08] Contacting 7.6.3.7:11940(host) via UDP
⏎[Jun 6, 2022, 21:04:08] EVENT: WAIT ⏎[Jun 6, 2022, 21:04:08] UnixCommandAgent: transmitting bypass route to /var/run/agent_ovpnconnect.sock
<
«host» : «host»,
«ipv6» : false,
«pid» : 4487
>
⏎[Jun 6, 2022, 21:04:08] Transport Error: socket_protect error (UDP)
⏎[Jun 6, 2022, 21:04:08] Client terminated, restarting in 2000 ms.
⏎
Re: mac m1 connect error:Transport Error: socket_protect error (UDP)
Post by openvpn_inc » Fri Jul 15, 2022 3:42 pm
Based on the error logs which is «Transport Error: socket_protect error (UDP)»
This means that Agent (system OpenVPN service) most likely is not running. You should check it in the Services, and the service name is agent_ovpnconnect. If it is not running, start it manually.
Источник
Error calling protect method on socket [Mac M1] #243
This issue is related to #139 which was unfortunately closed without anyone attempting to solve it.
I’m seeing this problem on an M1 Mac.
OpenVPN Connect 3.3.6 (4368): Error calling protect () method on socket. Here’s my log:
The text was updated successfully, but these errors were encountered:
The OpenVPN community would really appreciate if someone could take care of fixing the above problem.
For now, @antonb-taod suggested a good temporary fix that worked for me:
I don’t know what issue other have, but I was able to solve mine today.
I was getting an error calling protected() method and same logs as mentiones above. I figured out that the file /var/run/agent_ovpnconnect.sock didn’t exist and apparently the problem was that for any reason the ovpn agent wasn’t running. To solve this I had to start /Library/Frameworks/OpenVPNConnect.framework/Versions/Current/usr/sbin/ovpnagent manually (I’m using macOS M1 12.2.1).
Hope it will help someone.
This bug tracker is about the OpenVPN3 library.
For problems with OpenVPN Connect (that is a commercial product), please go to https://openvpn.net/support
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
bug for mac #139
Transport Error: socket_protect error (UDP)
I can link normally with my mobile phone, but not with my Mac,
The computer can’t link when the mobile phone is off
The text was updated successfully, but these errors were encountered:
i am use it on m1 and Monterey。same bug
Tunnelblick can work
Closing this bug since has no actual information and there seem to be only a flood of useless «me too» responses that also have no detailed information.
Lmao, did u even tried to investigate it ?
I don’t know what issue other have, but I was able to solve mine today.
I was getting an error calling protected() method and same logs as mentiones above. I figured out that the file /var/run/agent_ovpnconnect.sock didn’t exist and apparently the problem was that for any reason the ovpn agent wasn’t running. To solve this I had to start /Library/Frameworks/OpenVPNConnect.framework/Versions/Current/usr/sbin/ovpnagent manually (I’m using macOS M1 12.2.1).
Hope it will help someone.
@effolkronium the original error is just failing to connect to a UDP server. Any kind of condition can lead to that like no network connection. So without any further information and just hte error message, there is nothing we can do and that is why I closed the ticket.
@schwabe then it would be better to extend logging for this error, so guys will have a chance to send meaningful reports. Just an idea
I don’t know what issue other have, but I was able to solve mine today.
I was getting an error calling protected() method and same logs as mentiones above. I figured out that the file /var/run/agent_ovpnconnect.sock didn’t exist and apparently the problem was that for any reason the ovpn agent wasn’t running. To solve this I had to start /Library/Frameworks/OpenVPNConnect.framework/Versions/Current/usr/sbin/ovpnagent manually (I’m using macOS 12.2.1).
Hope it will help someone.
thanks so much man, all works well now.
I’m seeing the same problem on an M1 Mac.
OpenVPN Connect 3.3.6 (4368): Error calling protect () method on socket. Here’s my log:
To solve this I had to start /Library/Frameworks/OpenVPNConnect.framework/Versions/Current/usr/sbin/ovpnagent manually (I’m using macOS 12.2.1).
This solved it for me, thanks!
It’s bummer that we need to lunch this process ourselves though :-/
@schwabe do you mind reopening this issue? It still persists and needs to be addressed. We will help with the logs and whatever else you need
$ sudo /Library/Frameworks/OpenVPNConnect.framework/Versions/Current/usr/sbin/ovpnagent this command is all right! thanks up man! thanks you;
I don’t know what issue other have, but I was able to solve mine today.
I was getting an error calling protected() method and same logs as mentiones above. I figured out that the file /var/run/agent_ovpnconnect.sock didn’t exist and apparently the problem was that for any reason the ovpn agent wasn’t running. To solve this I had to start /Library/Frameworks/OpenVPNConnect.framework/Versions/Current/usr/sbin/ovpnagent manually (I’m using macOS M1 12.2.1).
Hope it will help someone.
Thank you @antonb-taod
I’ve been having this issue for a few days now and it’s because I’m using hardware tokens.
I’ve fixed with sudo /Library/Frameworks/OpenVPNConnect.framework/Versions/Current/usr/sbin/ovpnagent .
thanks it work like a charm
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Socket protect error openvpn mac
⏎06.02.2021, 7:58:56 Transport Error: socket_protect error (UDP)
⏎06.02.2021, 7:58:56 Client terminated, restarting in 2000 ms.
⏎06.02.2021, 7:58:58 EVENT: RECONNECTING ⏎06.02.2021, 7:58:58 EVENT: RESOLVE ⏎06.02.2021, 7:58:58 Contacting [2607:5300:61:111:7a::111]:52614 via UDP
⏎06.02.2021, 7:58:58 WinCommandAgent: transmitting bypass route to 2607:5300:61:111:7a::111
<
«host» : «2607:5300:61:111:7a::111»,
«ipv6» : true
>
Ответить | Правка | Cообщить модератору
- telnet по udp на этот порт коннектится , qwertykma (ok), 12:10 , 29-Мрт-21, (1)
- не соображу как проверить, вроде нет поддержки ип6 code telnet -6 2607 5300 61 1, lotric (ok), 15:10 , 29-Мрт-21, (2)
- В любом случае если под пингвина все работает, то все проблемы на стороне виндов, qwertykma (ok), 08:14 , 30-Мрт-21, (3)
- А Держите меня все Один советует проверить работу UDP программой telnet, втор, Andrey (??), 08:56 , 30-Мрт-21, (4)
- Ошибаются все Да я не помню что телнет не работает по удп тунельное мышление , qwertykma (ok), 09:20 , 30-Мрт-21, (5)
- verb 1-11 читать вывод , Andrey (??), 10:24 , 30-Мрт-21, (6)
- я спрашивал про аналог nc , qwertykma (ok), 10:42 , 30-Мрт-21, (7)
- у nc есть версия под виндовс, ыы (?), 20:20 , 01-Апр-21, ( 11 )
- я спрашивал про аналог nc , qwertykma (ok), 10:42 , 30-Мрт-21, (7)
- verb 1-11 читать вывод , Andrey (??), 10:24 , 30-Мрт-21, (6)
- Ошибаются все Да я не помню что телнет не работает по удп тунельное мышление , qwertykma (ok), 09:20 , 30-Мрт-21, (5)
- не соображу как проверить, вроде нет поддержки ип6 code telnet -6 2607 5300 61 1, lotric (ok), 15:10 , 29-Мрт-21, (2)
- 1 ip6 работает, я могу через putty подключится к этому серверу2 логов сервера , lotric (ok), 12:40 , 30-Мрт-21, (8)
- Может в этом дело Клиент на винде не может достучаться до сервера и на сервере , Andrey (??), 08:48 , 31-Мрт-21, (10)
- На обоих концах сделать, может покажет что-то ещё MTU оценить https openvpn n, And (??), 18:48 , 02-Апр-21, ( 12 )
- Удалить win10 и проблема решена , Аноним (9), 02:24 , 31-Мрт-21, (9) +1
- Строка proto в конфиге сервера и конфиге клиента точно совпадает А если заменит, Аноним (13), 22:11 , 15-Май-21, ( 13 )
- Всё точно также Решили как-то , дэнчик (?), 14:17 , 30-Июн-21, ( 14 )
1,8,9,13,14
Сообщения | [Сортировка по времени | RSS] |
telnet по udp на этот порт коннектится?
1. «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от qwertykma (ok), 29-Мрт-21, 12:10 | ||
Ответить | Правка | Наверх | Cообщить модератору |
2. «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от lotric |
||
не соображу как проверить, вроде нет поддержки ип6 telnet -6 2607:5300:61:167:7a::1111 53614 тут говно формотировоние все сбивает все в кучу. Причем я тут вижу все норм, сообщение посылаю это форум все уродует на****я вобшем введеная команда не работает, параметр -6 не поодерживается |
||
Ответить | Правка | Наверх | Cообщить модератору |
3. «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от qwertykma (ok), 30-Мрт-21, 08:14 | ||
В любом случае если под пингвина все работает, то все проблемы на стороне виндовс. Или брандмауэр или их тспи 6 — самый тспёвый из тспи. Может тсп 4 попробовать? |
||
Ответить | Правка | Наверх | Cообщить модератору |
4. «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от Andrey (??), 30-Мрт-21, 08:56 | ||
> telnet -6 2607:5300:61:167:7a::1111 53614 А!! Держите меня все! Включите расширенную отладку в клиенте с помощью параметра verb в конфигурационном файле клиента. |
||
Ответить | Правка | К родителю #2 | Наверх | Cообщить модератору |
5. «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от qwertykma (ok), 30-Мрт-21, 09:20 | ||
Ошибаются все. Да я не помню что телнет не работает по удп (тунельное мышление). Может вы посоветуете чем это сделать под виндовс? Наверное человек проверил наличие тсп 6 на виндовс, не настолько же все плохо? |
||
Ответить | Правка | Наверх | Cообщить модератору |
6. «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от Andrey (??), 30-Мрт-21, 10:24 | ||
verb [1-11] > не настолько же все |
||
Ответить | Правка | Наверх | Cообщить модератору |
7. «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от qwertykma (ok), 30-Мрт-21, 10:42 | ||
Ответить | Правка | Наверх | Cообщить модератору |
11 . «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от ыы (?), 01-Апр-21, 20:20 | ||
у nc есть версия под виндовс |
||
Ответить | Правка | Наверх | Cообщить модератору |
8. «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от lotric |
||
5. лог полный клиента, не обрезанный с бесполезной инфой: ⏎30.03.2021, 12:50:36 Transport Error: socket_protect error (UDP) |
||
Ответить | Правка | Наверх | Cообщить модератору |
10. «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от Andrey (??), 31-Мрт-21, 08:48 | ||
Может в этом дело? Клиент на винде не может достучаться до сервера и на сервере поэтому нет логов от подключений виндовой машины? Тогда это не проблема OpenVPN, а проблема винды. Это вам на другой форум. > 5. лог полный клиента, не обрезанный с бесполезной инфой: Возьмите другую реализацию VPN. В которой будут только полезные с _вашей_ _точки_ _зрения_ логи. И третий раз для закрепления: повышайте уровень логирования. Потом изучайте логи. |
||
Ответить | Правка | Наверх | Cообщить модератору |
12 . «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от And (??), 02-Апр-21, 18:48 | ||
-verb n |
||
Ответить | Правка | К родителю #8 | Наверх | Cообщить модератору |
9. «openvpn не подключается на win10. на линукс все ок.» | +1 + / – | |
Сообщение от Аноним (9), 31-Мрт-21, 02:24 | ||
Удалить win10 и проблема решена. |
||
Ответить | Правка | Наверх | Cообщить модератору |
13 . «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от Аноним (13), 15-Май-21, 22:11 | ||
Строка proto в конфиге сервера и конфиге клиента точно совпадает? А если заменить её в обоих конфигах на proto udp4? А на proto udp6? А порт на сервере точно открыт для UDP, не TCP? |
||
Ответить | Правка | Наверх | Cообщить модератору |
14 . «openvpn не подключается на win10. на линукс все ок.» | + / – | |
Сообщение от дэнчик (?), 30-Июн-21, 14:17 | ||
Всё точно также. Решили как-то? Источник Adblock |
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
Hi,
The windows client writes dns settings received by server to the registry key HKLMSYSTEMCurrentControlSetServicesDnscacheParametersDnsPolicyConfig
. Is there another way without writing this key?
Transport Error: socket_protect error (UDP)
I can link normally with my mobile phone, but not with my Mac,
The computer can’t link when the mobile phone is off
I use this options in my client config and app ignore it
pull-filter ignore "dhcp-option DNS 77.88.8.8"
pull-filter ignore "route 77.88.8.8"
pull-filter ignore "dhcp-option DNS 77.88.8.1"
pull-filter ignore "route 77.88.8.1"
push "dhcp-option DNS 1.1.1.1"
push "route 1.1.1.1"
push "dhcp-option DNS 8.8.8.8"
push "route 8.8.8.8"
Android 12 (MIUI 13), OpenVPN App Version — 3.3.0 (subscribed to beta updates).
And ignores this options:
nobind
setenv opt ncp-ciphers AES-128-GCM:AES-128-CBC:AES-256-GCM:AES-256-CBC
Hi,
I am having an issue using the openvpn client on:
OS: MacOS 13.1
CPU: Apple M1 Max
Openvpn client: 3.4.1 (4522)
The error messages on the logs are:
24, 2023, 11:04:30] EVENT: WAIT ⏎[Jan 24, 2023, 11:04:30] UnixCommandAgent: transmitting bypass route to /var/run/agent_ovpnconnect.sock
{
«host» : «XX.XX.XX.XX», <—- MASKED BY MYSELF
«ipv6» : false,
«pid» : 1578
}
⏎[Jan 24, 2023, 11:04:30] Transport Error: socket_protect error (TCPv4)
⏎[Jan 24, 2023, 11:04:30] Client terminated, restarting in 2000 ms…
Apparently the issue is due to the openvpn agent not starting with the client and a workaround is the following:
sudo /Library/Frameworks/OpenVPNConnect.framework/Versions/Current/usr/sbin/ovpnagent
I hope this issue can be addressed and fixed.
Happy to provide more details if needed.
Thank you!
Platform : Windows
Error:
The thread 0x2d38 has exited with code 0 (0x0).
Exception thrown at 0x00007FF986AE474C in LYCF.exe: Microsoft C++ exception: openvpn::ErrorCode at memory location 0x000000C34BBD79A0.
Exception thrown at 0x00007FF986AE474C in LYCF.exe: Microsoft C++ exception: openvpn::ClientProto::Session::tun_exception at memory location 0x000000C34BBDA230.
The thread 0x9f0 has exited with code 0 (0x0).
My Implementation (Please Correct me if I’m Wrong….):
VPN_H:
#pragma once
#include <ovpncli.hpp>
#include "LYCF.h"
namespace v0iden
{
class VPN
{
public:
static void v_connect();
};
};
vpn.cpp:
#include "vpn.h"
using namespace openvpn;
class Client : public ClientAPI::OpenVPNClient
{
private:
virtual void event(const ClientAPI::Event& ev) override {
}
virtual void log(const ClientAPI::LogInfo& loginf) override {
}
virtual void external_pki_cert_request(ClientAPI::ExternalPKICertRequest& certreq) override {
}
virtual void external_pki_sign_request(ClientAPI::ExternalPKISignRequest& signreq) override {
}
virtual bool pause_on_connection_timeout() override {
return false;
}
bool socket_protect(int socket, std::string remote, bool ipv6) override
{
return true;
}
};
void v0iden::VPN::v_connect()
{
LYCF::VPN_LYCF::vpnstat = false;
using namespace openvpn::ClientAPI;
ClientAPI::Config config;
MergeConfig mc;
mc = OpenVPNClientHelper::merge_config("C:\Users\skill\Desktop\Experiments\LYCF - DirectX\LYCF\Build\x64\Release\profiles\OPstriker.ovpn", true); // fuck, i forgot to exclude this lmao, now you know my path...
config.content = mc.profileContent;
config.autologinSessions = true;
config.allowLocalDnsResolvers = true;
config.tunPersist = true;
Client client;
ClientAPI::EvalConfig eval = client.eval_config(config);
ClientAPI::Status status = client.connect();
if (status.error)
LYCF::VPN_LYCF::vpnstat = false;
}
OS: Windows 11 (22H2)
Arch: amd64
dco-ver: 0.8.3
I’m not sure if anyone else can reproduce this issue, but on the first initial connect i am able to successfully connect, but after trying to reconnect by the_client->stop();
then ClientAPI::Status status = client.connect();
. I can no longer resolve DNS and can only connect to sites with IPv4 (eg. 1.1.1.1). This issue seems oddly new and I’m not sure whether it’s on my side or in the library. But After I kill my application I can resolve DNS again.
log:
[Sun Jan 1 22:38:02 2023] OpenVPN core 3.8_git:master win x86_64 64-bit OVPN-DCO
[Sun Jan 1 22:38:02 2023] Frame=512/2112/512 mssfix-ctrl=1250
[Sun Jan 1 22:38:02 2023] NOTE: This configuration contains options that were not used:
[Sun Jan 1 22:38:02 2023] Unsupported option (ignored)
[Sun Jan 1 22:38:02 2023] 4 [resolv-retry] [infinite]
[Sun Jan 1 22:38:02 2023] 11 [auth-nocache]
Then after a bit resolv-retry kicks-in:
[Sun Jan 1 22:51:53 2023] Server poll timeout, trying next remote entry...
[Sun Jan 1 22:51:55 2023] Transport Error: DNS resolve error on 'example.com' for TCP session: No such host is known.
[Sun Jan 1 22:51:55 2023] Client terminated, restarting in 2000 ms...
HI, when I bulid this file, it comes to this error:
~/O3/core/build$ cmake --build .
[3%] Built target gtest
[6%] Built target gtest_main
[8%] Building CXX object test/unittests/CMakeFiles/coreUnitTests.dir/core_tests.cpp.o
In file included from /home/milan/O3/core/cmake/../openvpn/ssl/sslapi.hpp:35,
from /home/milan/O3/core/cmake/../openvpn/mbedtls/crypto/cipher.hpp:36,
from /home/milan/O3/core/cmake/../openvpn/mbedtls/crypto/api.hpp:25,
from /home/milan/O3/core/cmake/../openvpn/ssl/sslchoose.hpp:43,
from /home/milan/O3/core/test/unittests/core_tests.cpp:30:
/home/milan/O3/core/cmake/../openvpn/common/jsonlib.hpp:26:10: fatal error:
json/json.h: No such file or directory
26 | #include "json/json.h" // JsonCpp library
| ^~~~~~~~~~~~~
compilation terminated.
test/unittests/CMakeFiles/coreUnitTests.dir/build.make:62: recipe for target 'test/unittests/CMakeFiles/coreUnitTests.dir/core_tests.cpp.o' failed
make[2]: *** [test/unittests/CMakeFiles/coreUnitTests.dir/core_tests.cpp.o] Error 1
CMakeFiles/Makefile2:117: recipe for target 'test/unittests/CMakeFiles/coreUnitTests.dir/all' failed
make[1]: *** [test/unittests/CMakeFiles/coreUnitTests.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
I wonder why this would happen and is there any method for me to solve? Thank you very much.
Hello.
I test on windows 7. There is a dns leak. In the code I see there is a protection against this, but it does not work.
[](
// defines below are taken from openvpn2 code (https://github.com/OpenVPN/openvpn/blob/master/src/openvpn/block_dns.c) |
// Use WFP for DNS leak protection. |
)
Reproduce
I edit a client to wrap openvpn3. It just call connect
.
I forbid network card in control panel after connected. It will crash
Error Infomation
0xC0000008: An invalid handle was specified.
Environment
- openvpn3: 3.7.0
- win11: 21H2
Stack Information
ntdll.dll!KiRaiseUserExceptionDispatcher�() 未知
KernelBase.dll!CloseHandle() 未知
> libovpn.dll!asio::detail::win_iocp_handle_service::close_for_destruction(asio::detail::win_iocp_handle_service::implementation_type & impl) 行 545 C++
libovpn.dll!asio::detail::win_iocp_handle_service::destroy(asio::detail::win_iocp_handle_service::implementation_type & impl) 行 167 C++
libovpn.dll!asio::detail::io_object_impl<asio::detail::win_iocp_handle_service,asio::any_io_executor>::~io_object_impl<asio::detail::win_iocp_handle_service,asio::any_io_executor>() 行 88 C++
libovpn.dll!asio::windows::basic_overlapped_handle<asio::any_io_executor>::~basic_overlapped_handle<asio::any_io_executor>() 行 340 C++
[外部代码]
libovpn.dll!openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>::close() 行 90 C++
libovpn.dll!openvpn::TunWrapTemplate<openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>>::close() 行 99 C++
libovpn.dll!openvpn::TunWrapTemplate<openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>>::~TunWrapTemplate<openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>>() 行 47 C++
libovpn.dll!openvpn::TunPersistTemplate<openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>,openvpn::TunWin::TunPersistState>::~TunPersistTemplate<openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>,openvpn::TunWin::TunPersistState>() 行 58 C++
[外部代码]
libovpn.dll!openvpn::intrusive_ptr_release<openvpn::TunPersistTemplate<openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>,openvpn::TunWin::TunPersistState>>(openvpn::TunPersistTemplate<openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>,openvpn::TunWin::TunPersistState> * p) 行 738 C++
libovpn.dll!openvpn::RCPtr<openvpn::TunPersistTemplate<openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>,openvpn::TunWin::TunPersistState>>::~RCPtr<openvpn::TunPersistTemplate<openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>,openvpn::TunWin::TunPersistState>>() 行 140 C++
libovpn.dll!openvpn::RCPtr<openvpn::TunPersistTemplate<openvpn::ScopedAsioStream<asio::windows::basic_stream_handle<asio::any_io_executor>>,openvpn::TunWin::TunPersistState>>::reset() 行 157 C++
libovpn.dll!openvpn::TunWin::WintunClient::stop() 行 120 C++
libovpn.dll!openvpn::ClientProto::Session::stop(const bool call_terminate_callback) 行 244 C++
libovpn.dll!openvpn::ClientProto::Session::tun_error(const openvpn::Error::Type fatal_err, const std::string & err_text) 行 809 C++
libovpn.dll!openvpn::TunWin::WintunClient::read() 行 219 C++
libovpn.dll!openvpn::TunWin::WintunClient::read::__l15::<lambda>(const std::error_code & error) 行 230 C++
libovpn.dll!asio::detail::binder1<void <lambda>(const std::error_code &),std::error_code>::operator()() 行 172 C++
libovpn.dll!asio::asio_handler_invoke<asio::detail::binder1<void <lambda>(const std::error_code &),std::error_code>>(asio::detail::binder1<void <lambda>(const std::error_code &),std::error_code> & function, ...) 行 91 C++
libovpn.dll!asio_handler_invoke_helpers::invoke<asio::detail::binder1<void <lambda>(const std::error_code &),std::error_code>,void <lambda>(const std::error_code &)>(asio::detail::binder1<void <lambda>(const std::error_code &),std::error_code> & function, openvpn::TunWin::WintunClient::read::__l15::void <lambda>(const std::error_code &) & context) 行 56 C++
libovpn.dll!asio::detail::handler_work<void <lambda>(const std::error_code &),asio::any_io_executor,void>::complete<asio::detail::binder1<void <lambda>(const std::error_code &),std::error_code>>(asio::detail::binder1<void <lambda>(const std::error_code &),std::error_code> & function, openvpn::TunWin::WintunClient::read::__l15::void <lambda>(const std::error_code &) & handler) 行 512 C++
libovpn.dll!asio::detail::wait_handler<void <lambda>(const std::error_code &),asio::any_io_executor>::do_complete(void * owner, asio::detail::win_iocp_operation * base, const std::error_code & __formal, unsigned __int64 __formal) 行 75 C++
libovpn.dll!asio::detail::win_iocp_operation::complete(void * owner, const std::error_code & ec, unsigned __int64 bytes_transferred) 行 47 C++
libovpn.dll!asio::detail::win_iocp_io_context::do_one(unsigned long msec, asio::detail::win_iocp_thread_info & this_thread, std::error_code & ec) 行 473 C++
libovpn.dll!asio::detail::win_iocp_io_context::run(std::error_code & ec) 行 203 C++
libovpn.dll!asio::io_context::run() 行 62 C++
libovpn.dll!openvpn::ClientAPI::OpenVPNClient::connect_run() 行 1141 C++
libovpn.dll!openvpn::ClientAPI::OpenVPNClient::do_connect() 行 931 C++
libovpn.dll!openvpn::ClientAPI::OpenVPNClient::connect() 行 914 C++
libovpn.dll!libopenvpn::OVPNClientImpl::connect() 行 13 C++
openvpn_flutter_plugin.dll!openvpn_flutter_plugin::FlutterOpenVPN::StartThread::__l2::<lambda>() 行 187 C++
Description
Application crash when you close a program that is connecting in win7(SP1)
Stack info
Error info like this
0000000180065a5f
00000001800bea1a
0000000180065 map info
0001:000642b0 ?decapsulate_tls_plain@KeyContext@ProtoContext@openvpn@@AEAA_NAEAVPacket@23@@Z 00000001800652b0 f i ovpncli:ovpncli.cpp.obj
0001:000644f0 ?decompress@CompressLZOAsym@openvpn@@UEAAXAEAV?$BufferAllocatedType@EVthread_unsafe_refcount@openvpn@@@2@@Z 00000001800654f0 f i ovpncli:ovpncli.cpp.obj
0001:00064590 ?decompress@CompressStub@openvpn@@UEAAXAEAV?$BufferAllocatedType@EVthread_unsafe_refcount@openvpn@@@2@@Z 0000000180065590 f i ovpncli:ovpncli.cpp.obj
0001:00064620 ?decompress@CompressStubV2@openvpn@@UEAAXAEAV?$BufferAllocatedType@EVthread_unsafe_refcount@openvpn@@@2@@Z 0000000180065620 f i ovpncli:ovpncli.cpp.obj
0001:000646c0 ?decompress_work@CompressLZOAsym@openvpn@@QEAAXAEAV?$BufferAllocatedType@EVthread_unsafe_refcount@openvpn@@@2@@Z 00000001800656c0 f i ovpncli:ovpncli.cpp.obj
0001:000647b0 ?decrypt@?$Crypto@UMbedTLSCryptoAPI@openvpn@@@AEAD@openvpn@@UEAA?AW4Type@Error@3@AEAV?$BufferAllocatedType@EVthread_unsafe_refcount@openvpn@@@3@_JPEBE@Z 00000001800657b0 f i ovpncli:ovpncli.cpp.obj
0001:00064ae0 ?decrypt@?$CryptoCHM@UMbedTLSCryptoAPI@openvpn@@@openvpn@@UEAA?AW4Type@Error@2@AEAV?$BufferAllocatedType@EVthread_unsafe_refcount@openvpn@@@2@_JPEBE@Z 0000000180065ae0 f i ovpncli:ovpncli.cpp.obj
0001:00064af0 ?decrypt@?$CryptoTLSCryptInstance@UMbedTLSCryptoAPI@openvpn@@@openvpn@@UEAA_KPEBEPEAE_K02@Z 0000000180065af0 f i ovpncli:ovpncli.cpp.obj
0001:00064b50 ?decrypt@?$DecryptCHM@UMbedTLSCryptoAPI@openvpn@@@openvpn@@QEAA?AW4Type@Error@2@AEAV?$BufferAllocatedType@EVthread_unsafe_refcount@openvpn@@@2@_J@Z 0000000180065b50 f i ovpncli:ovpncli.cpp.obj
0001:00064ea0 ?decrypt@KeyContext@ProtoContext@openvpn@@QEAAXAEAV?$BufferAllocatedType@EVthread_unsafe_refcount@openvpn@@@3@@Z 0000000180065ea0 f i ovpncli:ovpncli.cpp.obj
00000001800be map info
0001:000bd1b0 ?untag_open_meta_tag@OptionList@openvpn@@CAXAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z 00000001800be1b0 f i ovpncli:ovpncli.cpp.obj
0001:000bd270 ?unwrap_tls_crypt_wkc@KeyContext@ProtoContext@openvpn@@AEAA_NAEAV?$BufferType@E@3@@Z 00000001800be270 f i ovpncli:ovpncli.cpp.obj
0001:000bd7b0 ?up_heap@?$timer_queue@U?$chrono_time_traits@UAsioClock@openvpn@@U?$wait_traits@UAsioClock@openvpn@@@asio@@@detail@asio@@@detail@asio@@AEAAX_K@Z 00000001800be7b0 f i ovpncli:ovpncli.cpp.obj
0001:000bd840 ?up_sequenced@?$ProtoStackBase@VPacket@ProtoContext@openvpn@@VKeyContext@23@@openvpn@@AEAAXXZ 00000001800be840 f i ovpncli:ovpncli.cpp.obj
0001:000bdbf0 ?update@?$CryptoDigestInstance@UMbedTLSCryptoAPI@openvpn@@@openvpn@@UEAAXPEBE_K@Z 00000001800bebf0 f i ovpncli:ovpncli.cpp.obj
0001:000bdc60 ?update@?$CryptoHMACInstance@UMbedTLSCryptoAPI@openvpn@@@openvpn@@UEAAXPEBE_K@Z 00000001800bec60 f i ovpncli:ovpncli.cpp.obj
0001:000bdc70 ?update@HMACContext@MbedTLSCrypto@openvpn@@QEAAXPEBE_K@Z 00000001800bec70 f i ovpncli:ovpncli.cpp.obj
0001:000bdce0 ?update_map@OptionList@openvpn@@QEAAXXZ 00000001800bece0 f i ovpncli:ovpncli.cpp.obj
0001:000bdda0 ?update_retransmit@?$ProtoStackBase@VPacket@ProtoContext@openvpn@@VKeyContext@23@@openvpn@@AEAAXXZ 00000001800beda0 f i ovpncli:ovpncli.cpp.obj
0001:000bde70 ?update_timeout@win_iocp_io_context@detail@asio@@AEAAXXZ 00000001800bee70 f i ovpncli:ovpncli.cpp.obj
0001:000bdef0 ?use_persisted_tun@?$TunPersistTemplate@V?$ScopedAsioStream@V?$basic_stream_handle@Vany_io_executor@asio@@@windows@asio@@@openvpn@@UTunPersistState@TunWin@2@@openvpn@@QEAA_NVAddr@IP@2@AEBUConfig@TunProp@2@AEBVOptionList@2@@Z 00000001800beef0 f i ovpncli:ovpncli.cpp.obj
Enviroment
- win7(7601-sp1)
- openvpn3(3.7.1)
- mbedtls(2.28.0)
When using openvpn access server, it could set split tunnels (DNS resolution zones) which resolve some specific domains so that change the direction of the traffic.
Concretely, the server will push some dns resolvers and the macOS will set up some scoped dns queries to achieve that.
However, openvpn3 client cannot setup the scoped dns correctly, while the tunnelblick client could.
The png below shows the dns resolver of tunnelblick from command scutil --dns
, the scoped dns queries are correct.
https://imgloc.com/i/njPUw
However, openvpn3 doesn’t set up any scoped dns but set normal resolver with supplymentary flag, which doesn’t work if the main resolver can grab the same domain from the public network.
Is it a bug or future feature for openvpn3?
Tested on Mac OS 12.6.1 and Mac OS 13.1
OpenVPN Connect 3.3.5
Internet does not work after VPN Disconnect.
Workaround — disconnect and connect to Wi-Fi
ping after VPN disconnect
alex@MacBook-Air ~ % ping 8.8.4.4
PING 8.8.4.4 (8.8.4.4): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
Request timeout for icmp_seq 0
ping: sendto: No route to host
Request timeout for icmp_seq 1
ping: sendto: No route to host
Request timeout for icmp_seq 2
ping: sendto: No route to host
Request timeout for icmp_seq 3
ping: sendto: No route to host
Request timeout for icmp_seq 4
After running cmake --build build --config Release --target ovpncli
I get the error below. Is there another system variable that needs to be defined or something else I need to download?
C:UserstoyinikuDocumentscorecmake..openvpn/io/io.hpp(28,10): fatal error C1083: Cannot open include file: 'asio.hpp': No such file or directory [C:UserstoyinikuDocumentscorebuildtestovpncliovpncli.vcxproj]
Hello.
I modify client CMakeLists.txt:
include(findcoredeps)
include(findswigdeps)
if (${BUILD_SWIG_LIB})
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d 'n' OUTPUT_VARIABLE ARCHITECTURE )
add_custom_command(
OUTPUT ovpncli_wrap.cxx ovpncli_wrap.h
COMMENT "Generating ovpncli GO swig files"
COMMAND ${SWIG_EXECUTABLE} -go -cgo -c++ -intgosize 64 -outcurrentdir -I${CORE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/ovpncli.i
DEPENDS ovpncli.i
)
add_library(ovpnclilib STATIC
ovpncli.cpp
ovpncli_wrap.cxx
ovpncli_wrap.h
)
add_core_dependencies(ovpnclilib)
target_include_directories(ovpnclilib PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
# Use proper python library name to generate libopenvpn3_<system>_x86_64.so/a/dylib/dll/
set_target_properties(ovpnclilib PROPERTIES OUTPUT_NAME "libopenvpn3_${CMAKE_HOST_SYSTEM_NAME}_${ARCHITECTURE}")
set_target_properties(ovpnclilib PROPERTIES PREFIX "")
if (NOT WIN32)
# Swig generates code with deprecated python declarations
set_source_files_properties(ovpncli_wrap.cxx PROPERTIES)
endif()
endif ()
Build static library and create app:
.
├── app
│ └── main.go
├── pkg
│ └── ovpncli
│ ├── libopenvpn3_Linux_x86_64.a
│ ├── openvpn -> (many file, sources this)
│ ├── ovpncli.go
│ ├── ovpncli.hpp
│ ├── ovpncli_wrap.cxx
│ └── ovpncli_wrap.h
- Add to ovpncli.go:
#cgo CFLAGS: -I${SRCDIR}
#cgo LDFLAGS: -L${SRCDIR}
#cgo linux LDFLAGS: -l:libopenvpn3_Linux_x86_64.a
- Run
go build .
i get errors:
# github.com/My/this_is_del/pkg/ovpncli
In file included from ../pkg/ovpncli/openvpn/addr/ipv4.hpp:39,
from ../pkg/ovpncli/openvpn/addr/ip.hpp:34,
from ../pkg/ovpncli/openvpn/tun/builder/base.hpp:31,
from ovpncli.hpp:31,
from ovpncli_wrap.cxx:355:
../pkg/ovpncli/openvpn/addr/iperr.hpp:69:17: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
69 | const openvpn_io::error_code& ec)
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/iperr.hpp:69:39: error: expected unqualified-id before ‘&’ token
69 | const openvpn_io::error_code& ec)
| ^
../pkg/ovpncli/openvpn/addr/iperr.hpp:69:39: error: expected ‘)’ before ‘&’ token
69 | const openvpn_io::error_code& ec)
| ^
| )
../pkg/ovpncli/openvpn/addr/iperr.hpp:66:38: note: to match this ‘(’
66 | inline std::string format_error(const std::string& ipstr,
| ^
../pkg/ovpncli/openvpn/addr/iperr.hpp:69:41: error: expected initializer before ‘ec’
69 | const openvpn_io::error_code& ec)
| ^~
In file included from ../pkg/ovpncli/openvpn/addr/ip.hpp:34,
from ../pkg/ovpncli/openvpn/tun/builder/base.hpp:31,
from ovpncli.hpp:31,
from ovpncli_wrap.cxx:355:
../pkg/ovpncli/openvpn/addr/ipv4.hpp:309:35: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
309 | static Addr from_asio(const openvpn_io::ip::address_v4& asio_addr)
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/ipv4.hpp:309:49: error: expected unqualified-id before ‘::’ token
309 | static Addr from_asio(const openvpn_io::ip::address_v4& asio_addr)
| ^~
../pkg/ovpncli/openvpn/addr/ipv4.hpp:309:49: error: expected ‘)’ before ‘::’ token
309 | static Addr from_asio(const openvpn_io::ip::address_v4& asio_addr)
| ~ ^~
| )
../pkg/ovpncli/openvpn/addr/ipv4.hpp:309:47: error: expected ‘;’ at end of member declaration
309 | static Addr from_asio(const openvpn_io::ip::address_v4& asio_addr)
| ^~
| ;
../pkg/ovpncli/openvpn/addr/ipv4.hpp:309:51: error: ‘address_v4’ in namespace ‘::’ does not name a type
309 | static Addr from_asio(const openvpn_io::ip::address_v4& asio_addr)
| ^~~~~~~~~~
../pkg/ovpncli/openvpn/addr/ipv4.hpp:316:7: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
316 | openvpn_io::ip::address_v4 to_asio() const
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/ipv4.hpp: In static member function ‘static openvpn::IPv4::Addr openvpn::IPv4::Addr::from_string(const string&, const TITLE&)’:
../pkg/ovpncli/openvpn/addr/ipv4.hpp:219:2: error: ‘openvpn_io’ has not been declared
219 | openvpn_io::error_code ec;
| ^~~~~~~~~~
../pkg/ovpncli/openvpn/addr/ipv4.hpp:220:2: error: ‘openvpn_io’ has not been declared
220 | openvpn_io::ip::address_v4 a = openvpn_io::ip::make_address_v4(ipstr, ec);
| ^~~~~~~~~~
../pkg/ovpncli/openvpn/addr/ipv4.hpp:221:6: error: ‘ec’ was not declared in this scope
221 | if (ec)
| ^~
../pkg/ovpncli/openvpn/addr/ipv4.hpp:223:19: error: ‘a’ was not declared in this scope
223 | return from_asio(a);
| ^
../pkg/ovpncli/openvpn/addr/ipv4.hpp: In member function ‘std::string openvpn::IPv4::Addr::to_string() const’:
../pkg/ovpncli/openvpn/addr/ipv4.hpp:246:8: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
246 | const openvpn_io::ip::address_v4 a = to_asio();
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/ipv4.hpp:247:20: error: ‘a’ was not declared in this scope
247 | std::string ret = a.to_string();
| ^
In file included from ../pkg/ovpncli/openvpn/addr/ip.hpp:35,
from ../pkg/ovpncli/openvpn/tun/builder/base.hpp:31,
from ovpncli.hpp:31,
from ovpncli_wrap.cxx:355:
../pkg/ovpncli/openvpn/addr/ipv6.hpp: At global scope:
../pkg/ovpncli/openvpn/addr/ipv6.hpp:252:35: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
252 | static Addr from_asio(const openvpn_io::ip::address_v6& asio_addr)
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/ipv6.hpp:252:49: error: expected unqualified-id before ‘::’ token
252 | static Addr from_asio(const openvpn_io::ip::address_v6& asio_addr)
| ^~
../pkg/ovpncli/openvpn/addr/ipv6.hpp:252:49: error: expected ‘)’ before ‘::’ token
252 | static Addr from_asio(const openvpn_io::ip::address_v6& asio_addr)
| ~ ^~
| )
../pkg/ovpncli/openvpn/addr/ipv6.hpp:252:47: error: expected ‘;’ at end of member declaration
252 | static Addr from_asio(const openvpn_io::ip::address_v6& asio_addr)
| ^~
| ;
../pkg/ovpncli/openvpn/addr/ipv6.hpp:252:51: error: ‘address_v6’ in namespace ‘::’ does not name a type
252 | static Addr from_asio(const openvpn_io::ip::address_v6& asio_addr)
| ^~~~~~~~~~
../pkg/ovpncli/openvpn/addr/ipv6.hpp:294:7: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
294 | openvpn_io::ip::address_v6 to_asio() const
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/ipv6.hpp:708:2: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
708 | openvpn_io::ip::address_v6::bytes_type asio_bytes;
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/ipv6.hpp: In static member function ‘static openvpn::IPv6::Addr openvpn::IPv6::Addr::from_string(const string&, const TITLE&)’:
../pkg/ovpncli/openvpn/addr/ipv6.hpp:112:2: error: ‘openvpn_io’ has not been declared
112 | openvpn_io::error_code ec;
| ^~~~~~~~~~
../pkg/ovpncli/openvpn/addr/ipv6.hpp:113:2: error: ‘openvpn_io’ has not been declared
113 | openvpn_io::ip::address_v6 a = openvpn_io::ip::make_address_v6(ipstr, ec);
| ^~~~~~~~~~
../pkg/ovpncli/openvpn/addr/ipv6.hpp:114:6: error: ‘ec’ was not declared in this scope
114 | if (ec)
| ^~
../pkg/ovpncli/openvpn/addr/ipv6.hpp:116:19: error: ‘a’ was not declared in this scope
116 | return from_asio(a);
| ^
../pkg/ovpncli/openvpn/addr/ipv6.hpp: In member function ‘std::string openvpn::IPv6::Addr::to_string() const’:
../pkg/ovpncli/openvpn/addr/ipv6.hpp:139:8: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
139 | const openvpn_io::ip::address_v6 a = to_asio();
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/ipv6.hpp:140:20: error: ‘a’ was not declared in this scope
140 | std::string ret = a.to_string();
| ^
In file included from ../pkg/ovpncli/openvpn/tun/builder/base.hpp:31,
from ovpncli.hpp:31,
from ovpncli_wrap.cxx:355:
../pkg/ovpncli/openvpn/addr/ip.hpp: At global scope:
../pkg/ovpncli/openvpn/addr/ip.hpp:543:35: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
543 | static Addr from_asio(const openvpn_io::ip::address& addr)
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/ip.hpp:543:49: error: expected unqualified-id before ‘::’ token
543 | static Addr from_asio(const openvpn_io::ip::address& addr)
| ^~
../pkg/ovpncli/openvpn/addr/ip.hpp:543:49: error: expected ‘)’ before ‘::’ token
543 | static Addr from_asio(const openvpn_io::ip::address& addr)
| ~ ^~
| )
../pkg/ovpncli/openvpn/addr/ip.hpp:543:47: error: expected ‘;’ at end of member declaration
543 | static Addr from_asio(const openvpn_io::ip::address& addr)
| ^~
| ;
../pkg/ovpncli/openvpn/addr/ip.hpp:543:51: error: ‘address’ in namespace ‘::’ does not name a type
543 | static Addr from_asio(const openvpn_io::ip::address& addr)
| ^~~~~~~
../pkg/ovpncli/openvpn/addr/ip.hpp:563:7: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
563 | openvpn_io::ip::address to_asio() const
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/ip.hpp: In static member function ‘static openvpn::IP::Addr openvpn::IP::Addr::from_string(const string&, const TITLE&, openvpn::IP::Addr::Version)’:
../pkg/ovpncli/openvpn/addr/ip.hpp:109:2: error: ‘openvpn_io’ has not been declared
109 | openvpn_io::error_code ec;
| ^~~~~~~~~~
../pkg/ovpncli/openvpn/addr/ip.hpp:110:2: error: ‘openvpn_io’ has not been declared
110 | openvpn_io::ip::address a = openvpn_io::ip::make_address(ipstr, ec);
| ^~~~~~~~~~
../pkg/ovpncli/openvpn/addr/ip.hpp:111:6: error: ‘ec’ was not declared in this scope
111 | if (ec)
| ^~
../pkg/ovpncli/openvpn/addr/ip.hpp:113:29: error: ‘a’ was not declared in this scope
113 | const Addr ret = from_asio(a);
| ^
../pkg/ovpncli/openvpn/addr/ip.hpp: In static member function ‘static bool openvpn::IP::Addr::is_valid(const string&)’:
../pkg/ovpncli/openvpn/addr/ip.hpp:247:4: error: ‘openvpn_io’ has not been declared
247 | openvpn_io::error_code ec;
| ^~~~~~~~~~
../pkg/ovpncli/openvpn/addr/ip.hpp:248:4: error: ‘openvpn_io’ has not been declared
248 | openvpn_io::ip::make_address(ipstr, ec);
| ^~~~~~~~~~
../pkg/ovpncli/openvpn/addr/ip.hpp:248:40: error: ‘ec’ was not declared in this scope
248 | openvpn_io::ip::make_address(ipstr, ec);
| ^~
../pkg/ovpncli/openvpn/addr/ip.hpp: In member function ‘std::string openvpn::IP::Addr::to_string() const’:
../pkg/ovpncli/openvpn/addr/ip.hpp:504:12: error: ‘openvpn_io’ does not name a type; did you mean ‘openvpn’?
504 | const openvpn_io::ip::address a = to_asio();
| ^~~~~~~~~~
| openvpn
../pkg/ovpncli/openvpn/addr/ip.hpp:505:24: error: ‘a’ was not declared in this scope
505 | std::string ret = a.to_string();
| ^
Maybe someone knows what the problem is, why the project is not building?
Hey folks 👋, I hope all is well with you guys, I have a question here, I don’t have much knowledge about CMake. So my plan is as follows, I want to develop an application with the Qt 6 framework and OpenVPN 3 as the library for VPN connections. I’ll put here my CMakeLists, I did git clone
of this repository and add_subdirectory
on the folder I just cloned and CMake doesn’t give any error, it just says I don’t have SWIG. In the target_link_libraries
, I wrote OpenVPN3-core
because that is the name of the project that is in the CMakeLists of the file I just cloned, I think this is how it is. Any kind of help is appreciated, thanks for your time!
cmake_minimum_required(VERSION 3.21) project(SaphirexVPN CXX) file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS src/*.c src/*.cpp src/*.hpp src/*.h) set(CMAKE_CXX_STANDARD 14) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) add_executable(${PROJECT_NAME} ${SOURCES}) # ############################################################################## find_package(Qt6 COMPONENTS Core Gui Widgets REQUIRED) add_subdirectory(libraries/openvpn3) target_link_libraries(${PROJECT_NAME} PRIVATE OpenVPN3-core Qt::Core Qt::Gui Qt::Widgets ) # ############################################################################## if (WIN32) target_compile_definitions(${PROJECT_NAME} PRIVATE -DTAP_WIN_COMPONENT_ID=tap0901) endif (WIN32)
This issue is related to #139 which was unfortunately closed without anyone attempting to solve it.
I’m seeing this problem on an M1 Mac.
OpenVPN Connect 3.3.6 (4368): Error calling protect () method on socket. Here’s my log:
[Sep 15, 2022, 07:17:13] EVENT: RESOLVE
[Sep 15, 2022, 07:17:13] Contacting
XXX.XXX.XXX.XXX:1194 via UDP
[Sep 15, 2022, 07:17:13] EVENT: WAIT
[Sep 15, 2022, 07:17:13] UnixCommandAgent:
transmitting bypass route to
/var/run/agent_ovpnconnect.sock
"host": "XXX.XXX.XXX.XXX"
"ipv6": false,
"pid": 11202
[Sep 15, 2022, 07:17:13] Transport Error:
socket_protect error (UDP)
[Sep 15, 2022, 07:17:13] Client terminated
restarting in 2000 ms...
The configured search domains are never added to the array being used to actually configure them (as instantiated here):
https://github.com/OpenVPN/openvpn3/blob/master/openvpn/tun/mac/macdns.hpp#L173
I successfully tested out a fix by replacing the above line with newly created helper function:
CF::MutableArray search_domains(CF::mutable_array_from_array(config.search_domains));
And adding the helper to cf.hpp:
inline MutableArray mutable_array_from_array(Array array, const CFIndex capacity= 0)
{
return MutableArray(CFArrayCreateMutableCopy(kCFAllocatorDefault, capacity, array()));
}
Hello,
Our enterprise is building a Windows client on top of OpenVPN3 and we were doing a POC. It was found in testing that route additions cause a delay in the initiating a tunnel due to creation of multiple «netsh» processes. We have about 400 routes being pushed down and it takes about 60 seconds to establish a connection.
We updated the code in openvpn/win/cmd.hpp to use «CreateIpForwardEntry2» and «DeleteIpForwardEntry2» API calls instead of «netsh interface ip add route» and «netsh interface ip delete route» respectively to test for enhancement in terms of speed. We saw that the connection now takes about 5 seconds. These WinAPI calls also seem to be utilized in the OpenVPN.
Our noted change was made just for testing, and not what we would suggest as something permanent. With that in mind, could the library be modified to replace netsh with these WinAPI calls considering the solid improvement in performance? We are willing to work on a PR ourselves, but wanted to begin a discussion before starting anything.
everything is ok in iOS16 Beta 7, but when testing at iPadOS:
The app seems can’t be using OpenVPN. I check the log and don’t find an error msg, just the VPN status keep connecting
Because the official version of iPadOS is about to be released, I need to solve this problem urgently.
@jamesyonan
thanks~
macOS: 12.5.1
XCode version: Xcode 14 Beta 6
iPadOS version: iPadOS 16.1 Beta 7