Hi, I'm Alex (short for Alexander).
- Blog: kean.blog
- Built Nuke, Pulse, and other popular frameworks and tools
- Developed the initial CreateAPI version which is now maintained by @cookpad
Contacts
- Mastodon: @[email protected]
Sample custom VPN client/server in Swift
Hi, I'm Alex (short for Alexander).
Contacts
Hi!
First of all, thank you, your code is super helpful.
I need to change the
tunSettings.dnsSettings = NEDNSSettings(servers: [])
based on the user current IP address (wifi or cellular ) -- I'm listen to network events with Reachability library and together with on-demand rules I thought I can simply do
reachability.whenReachable = { reachability in if reachability.connection == .wifi { self.stopTunnel(with: .none, completionHandler: {print("asdasd")}) } else { self.stopTunnel(with: .none, completionHandler: {print("asdasd")}) } }
but it doesn't stop the tunnel, when I debug it, I can see that it's been called , but the tunnel stays connected..
when I manually turn the connection off, the on-demand rules kick off and my startTunnel function called.
To summarize, I want to be able to reconfigure NEPacketTunnelNetworkSettings object every time the user changes his public ip.
Thank you very much!
Hello, may you help us understand how we can use the concept and connect to v2ray servers using vmess protocal in swift/ios. thank you!
Hi,
Thank you for your repo and your blog. It is useful for me to study iOS and VPN system.
After reading your blog(https://kean.blog/post/vpn-configuration-manager), I tried to compile this repo on my Xcode.
But It didn't work correctly.
I debugged these codes and found out the point where it didn't work.
buttonStartTapped()
try tunnel.connection.startVPNTunnel
โ(this point)
Of couse, I fixed Bundle identifier
, and change com.github.kean.*
to my app's settings. But it doesn't work...
Any help?
Hello, any good ideas for implementing the split tunnel for NEPacketTunnelProvider? I don't want all the traffic going through the VPN
in file PacketTunnelProvider.swift the following line fail compilation since 'session' is not a class member, perhaps you meant udpSession ?
self.session.writeMultipleDatagrams(datagrams) { error in
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.