Recently I've been exploring tauri for mobile development. I wrote a blog post about what I learned
https://minosiants.com/blog/two-project
#What I learned by doing Tauri + Svelte mobile app
21 messages · Page 1 of 1 (latest)
@dawn sail Thank you, it's always interesting to see the integration of native Android/iOS/macOS code into Rust.
Can you tell me how feasible it is to implement VPN functionality in Tauri?
I only found this: https://github.com/JonForShort/android-local-vpn
There is a nuance in iOS: the local server to which traffic from TUN must be sent must be run inside Networking Extension. I would like the local server code with all its logic to be written in Rust, and it needs to be run in Swift somehow.
If you want to implement a VPN plugin, it will definitely be an interesting task.
GitHub
Android VPN implementation written in Rust. Contribute to JonForShort/android-local-vpn development by creating an account on GitHub.
@crisp haven thanks for the comments. I was thinking about vpn plugin. I found this one https://github.com/cloudflare/boringtun
Unfortunately, WireGuard is blocked in countries with strict censorship, and I wasn't referring to a classic VPN.
Here are some examples of applications that create a VPN profile that redirects traffic to a local proxy server.
https://apps.apple.com/ru/app/shadowrocket/id932747118?platform=iphone
https://www.potatso.com
https://proxytap.app
there is workaround for wireguard
https://docs.amnezia.org/documentation/amnezia-wg/
AmneziaWG is a fork of [WireGuard-Go], inheriting the architectural simplicity and high performance of the original implementation, but eliminating the identifiable network signatures that make WireGuard easily detectable by Deep Packet Inspection (DPI) systems.
and it works for different platforms if you just need a workable solution of personal vpn
The discussion was about the possibility of implementing VPN management on Android/iOS using Rust.
I did not ask for recommendations on which VPN to use 😅
AmneziaWG has also recently been blocked in Russia. But that's not what this is about.
I looked at your code and didn't quite understand how you call native Android/iOS code in Rust? I don't see the use of swift-rs for iOS and any crate for Android.
I found it, I didn't know about this feature in plugins, interesting)
https://tauri.app/develop/plugins/develop-mobile/
@crisp haven yes Tauri has based plugin implementation for both ios and android. Plugins code inherits from those implementations and tauri wireds it up in https://github.com/minosiants/two/blob/master/src-tauri/plugins/contacts/src/mobile.rs
It would be cool if plugins could call native MacOS code, essentially the same as Swift.
I meant native MacOS code.
Although it is probably possible. hmm
@crisp haven I dont know much about mac development . isnt it ios for moble and macos for laptops ?
isnt it ios for moble and macos for laptops ?
yes
@crisp haven for desktop there is similar file
https://github.com/minosiants/two/blob/master/src-tauri/plugins/contacts/src/desktop.rs to integrate desktop apps
I looked at this implementation, and it seems that it's not so simple; you need a good knowledge of network technologies.
https://github.com/JonForShort/android-local-vpn