Comments (4)
When the VPN is closed, the openVPNAdapter:handleError: method returns an error :
Error Domain=me.ss-abramchuk.openvpn-adapter.error-domain Code=27 "OpenVPN error occured" UserInfo={NSLocalizedDescription=OpenVPN error occured, me.ss-abramchuk.openvpn-adapter.error-key.message=EADDRNOTAVAIL: Can't assign requested address, me.ss-abramchuk.openvpn-adapter.error-key.fatal=false, NSLocalizedFailureReason=General transport error}
from openvpnadapter.
In fact, when the VPN was closed, the openVPNAdapter:handleError: method called back twice
Error returned for the first time :
Error Domain=me.ss-abramchuk.openvpn-adapter.error-domain Code=27 "OpenVPN error occured" UserInfo={NSLocalizedDescription=OpenVPN error occured, me.ss-abramchuk.openvpn-adapter.error-key.message=EADDRNOTAVAIL: Can't assign requested address, me.ss-abramchuk.openvpn-adapter.error-key.fatal=false, NSLocalizedFailureReason=General transport error}
Error returned for the second time :
Error Domain=me.ss-abramchuk.openvpn-adapter.error-domain Code=20 "Failed to reset tunnel. Check underlying error for more details." UserInfo={me.ss-abramchuk.openvpn-adapter.error-key.fatal=true, NSLocalizedDescription=Failed to reset tunnel. Check underlying error for more details., NSUnderlyingError=0x10360a450 {Error Domain=NEAgentErrorDomain Code=1 "(null)"}}
from openvpnadapter.
When I connect to VPN (4G), I turn on Wi-Fi, and when I turn off Wi-Fi, there is no such problem
So there is a point of suspicion. The VPN connection is established during Wi-Fi, and the socket is established based on Wi-Fi. Turning off Wi-Fi at this time will cause the socket to fail.
The VPN connection is established in 4G, and the socket is established based on 4G. Switch to Wi-Fi at this time, 4G network still exists, but the priority is not as good as Wi-Fi, so the socket is active
But I can’t verify this conjecture
from openvpnadapter.
Issue resolved
The reason for VPN is closed has been found. Because the openVPNAdapter:handleError: method is implemented in accordance with the demo on the homepage, when an error is received, the following code is executed, resulting in VPN is closed
if (self.startHandler) {
self.startHandler(error);
}else {
[self cancelTunnelWithError:error];
}
After commenting the if, it will automatically reconnect after 5 seconds.
It is recommended that the demo code on the homepage add comments to some non-essential codes, for example:
if (self.startHandler) {
self.startHandler(error);
}else {
[self cancelTunnelWithError:error];
}
And
self.startHandler = nil;
from openvpnadapter.
Related Issues (20)
- System Network Extension connects to VPN via OpenVPN protocol, but can't view any web pages HOT 2
- v0.7.0 connect failed HOT 5
- Disconnected and reconnected without network HOT 4
- 只在App应用内部使用openVPN, 就不需要使用Application Extension了吧
- Problem with SPM HOT 2
- Not working with iOS 15 and macOS 12.0.
- How to increase timeout during initial handshake? HOT 3
- I don't get call of func startTunnel(options...) on MacOS 10.15.7 but it works good on MacOS 11... HOT 4
- iOS client may not support pac
- 有人碰到过这个问题么,上传应用的时候
- Error setting up TUN/TAP interface
- Did it still work? HOT 4
- When i called removeFromPreferences, get some error
- Can't save config when connecting though "Intent Extension". HOT 1
- About Process IPv4 or IPv6 route
- .OVPN connectivity
- why can not I connect by password and username HOT 1
- not working on mac catalyst HOT 3
- Limit OpenVPN Connection time
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.
from openvpnadapter.