Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement Android and iOS target #45

Open
oligamiq opened this issue Nov 11, 2024 · 1 comment
Open

implement Android and iOS target #45

oligamiq opened this issue Nov 11, 2024 · 1 comment

Comments

@oligamiq
Copy link

VpnService has no native API

Rust can wrap the Android API written in Java.
This is my small cross-platform library.
I created it quite some time ago, so I'm not entirely sure if it's polished, but it's simple and straightforward, so I hope it can be useful.

https://github.com/oligamiq/nickname/blob/main/rust/android/jni/nick_name.rs#L217
https://github.com/oligamiq/nickname/blob/main/rust/android/jni/mod.rs

Note:
that using this method will not result in an app that works on the adb shell.

NEPacketTunnelProvider has no native API equivalent

Rust can wrap the iOS API written in Obj-c.

https://github.com/oligamiq/nickname/blob/main/rust/iphone/objc/nick_name.rs#L24

https://github.com/oligamiq/nickname/blob/main/build.rs

This can also be executed on the shell, so it is possible to test it with cargo dinghy.

@nathaniel-bennett
Copy link
Collaborator

Hey @oligamiq,
Thanks for the helpful info on how to wrap these interfaces! I'll definitely take a look at these if/when I get around to implementing tappers for Android/iOS. I'm still not 100% sure if supporting mobile platforms would be the right choice for tappers given how differently they behave to desktop platforms (no TAP support, only one VPN/Tunnel service allowed at a time, no way to manually configure routing), but if so then I'll be sure to look into these resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants