Comments (5)
from openvpnadapter.
Hi @plkgq,
Looking at the exception it seems to me that you are trying to store NEPacketTunnelFlow
object into some special storage like UserDefaults or tunnel settings. And as the exception message said it is not possible because this object doesn't adopt NSSecureCoding
protocol.
As for cocoapods, thanx for suggestion, although I think it would be better to define additional subspec so at the end we would have one for extension, and one for client app. I'll fix it when I have enough spare time.
from openvpnadapter.
Thank you very much for your reply
I double-checked my code and found no special storage
I just executed [self.vpnAdapter connectUsingPacketFlow:self.packetFlow];
from openvpnadapter.
Ahhh... I see what's wrong. In 0.7.0 version delegate's API has changed, in openVPNAdapter(_:configureTunnelWithNetworkSettings:completionHandler:)
you use packetFlow
as completion handler argument. But now completion handler accepts NSError
that returned by setTunnelNetworkSettings
. Here how it could be done in Swift:
func openVPNAdapter(
_ openVPNAdapter: OpenVPNAdapter,
configureTunnelWithNetworkSettings networkSettings: NEPacketTunnelNetworkSettings?,
completionHandler: @escaping (Error?) -> Void
) {
networkSettings?.dnsSettings?.matchDomains = [""]
setTunnelNetworkSettings(networkSettings, completionHandler: completionHandler)
}
from openvpnadapter.
Thank you again for your reply. I seem to know how to fix it.
Before that, I returned the wrong object. When I changed it to this, it worked,
but there was another problem. I found that I disconnected the network and reconnected. Later, it does not work, but I see in the log that the connection has been established, but the network is unavailable. It seems that some configuration has not been updated. I want to know how to fix it.
thank :)
from openvpnadapter.
Related Issues (20)
- System Network Extension connects to VPN via OpenVPN protocol, but can't view any web pages HOT 2
- 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
- Switch Wi-Fi to 4G, and the VPN is closed HOT 4
- 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.