threefoldtech / mycelium

End-2-end encrypted IPv6 overlay network
Apache License 2.0
18 stars 8 forks source link

Android support? #143

Open flokli opened 2 months ago

flokli commented 2 months ago

I'd like to reach some mycelium nodes (and non-mycelium networks behind them) from my Android phone.

A first version could provide a GUI to:

Once started, the mycelium service would create the tun interface with the address and netmask, allowing the regular network stack to reach mycelium IPs.

Later on, I could think of the following features:

LeeSmet commented 2 months ago

Android support is planned yes (IOS as well for that matter). And indeed a setup would look something like described, with an option to set peers, and start/stop the VPN. The main "problem" right now is that I have no experience in mobile development, so that will take some time to get bootstrapped. Other than that, I'm not really up to date on the latest tech on running rust on android. At the very least, it should be possible to just create a lib (which is already there), and import that from android (with a C bridge). Perhaps a full rust solution (which includes the GUI code and stuff) is possible, which would be my preference at the moment. I'll have to take a look what is possible there. Since the library is definitely an option, I'd also not use the HTTP API but rather expose these as methods on the Stack type instead, so they can also be called directly when the library is in use.

LeeSmet commented 2 months ago

After fiddling around with this a bit, it seems that cargo mobile seems to be a viable solution to set this up. For the UI side of things, I'm hoping dioxus can be used since it seems to be the easiest to get some proper buttons/inputs/... on the screen.

Considering how this will impact the source tree, I'm currently considering setting this up in a separate project, which uses this repo as a dependency (alternatively a git submodule could be used for the time being as well).

iwanbk commented 1 week ago

initial support for android is done at #221 . The UI uses flutter, currently under development at separate repo