18:59:54 <sysrqb> #startmeeting TorVPN Core Android Components 15 Feb 2022
18:59:54 <MeetBot> Meeting started Tue Feb 15 18:59:54 2022 UTC.  The chair is sysrqb. Information about MeetBot at http://wiki.debian.org/MeetBot.
18:59:54 <MeetBot> Useful Commands: #action #agreed #help #info #idea #link #topic.
19:00:01 <sysrqb> Hello everyone
19:00:04 <PieroV> o/
19:00:12 <sysrqb> Pad: https://pad.riseup.net/p/sponsor101-android-components
19:00:20 <sysrqb> We'll take notes on that pad
19:00:35 <sysrqb> Who else is here? :)
19:01:44 <cyberta> Hi
19:01:46 <threeletteracronym[m]> Benjamin Erhart, aka. tla. aka. threeletteracronym of Guardian Project. Developer of Onion Browser iOS, Onion Share iOS, Orbot iOS, and partly involved in Orbot Android, esp. everything regarding Pluggable Transports.
19:01:48 <cyberta> I'm here
19:01:50 <sysrqb> aguestuser: cyberta: n8fr8: are you online?
19:01:55 <sysrqb> ah, hello!
19:02:18 <threeletteracronym[m]> n8fr8should join soon
19:03:00 <sysrqb> Okay, we can wait ~2 more minutes, and then start
19:03:25 <aguestuser> o/
19:03:50 <aguestuser> (sorry for delay!)
19:04:25 <sysrqb> No worries
19:04:37 <sysrqb> Okay, let's begin and others can catch up
19:04:52 <sysrqb> I don't have a strict agenda for today's meeting
19:06:09 <sysrqb> I want to start having discussions about the internal architecture because we have many questions right now
19:07:01 <sysrqb> Taking a step back, the original and current plan is working with Guardian Project on finding a common core that powers Orbot and TorVPN
19:07:06 <cyberta> do we have a collection of questions womewhere?
19:08:08 <sysrqb> cyberta: no, not written
19:08:34 <sysrqb> but I want to start at a more abstract level right now
19:08:36 <mcnair> hi - sorry im late, was lingering in the wrong place.
19:08:59 <sysrqb> mcnair: o/ no problem
19:09:41 <sysrqb> last year, we began discussing this topic and we created a pad: https://pad.riseup.net/p/EiibJ2RSonaDqRfMgjI0-keep
19:10:13 <sysrqb> that was looking at the components of orbot and comparing them with any components of LEAP
19:11:12 <sysrqb> but we are entering a new world with arti, and this is why I want guardian project involved at the beginning
19:12:16 <sysrqb> because we should discuss what that world should look like, and if/how we should re-architect the stack for supporting arti and Orbot's/TorVPN's functionality
19:12:25 <threeletteracronym[m]> May I ask a stupid question? What is LEAP?
19:12:35 <sysrqb> ah, not a stupid question
19:12:47 <anarcat> a recursive acronym of course ;)
19:12:55 <sysrqb> heh
19:12:55 <cyberta> LEAP Encryption Access Project, the team behind RiseupVPN
19:13:10 <anarcat> so it's not a threeletteracronym, but pretty close ;)
19:13:12 <sysrqb> http://leap.se/
19:13:23 <threeletteracronym[m]> Thanks a lot!
19:13:52 <sysrqb> threeletteracronym[m]: have you had conversations within guardian project about supporting arti?
19:14:25 <threeletteracronym[m]> Well.
19:14:46 <threeletteracronym[m]> We were once desperate for it become released.
19:14:56 <threeletteracronym[m]> Due to iOS limitations.
19:15:02 <threeletteracronym[m]> But Apple finally raised memory limits on iOS 15.
19:15:22 <threeletteracronym[m]> So, we currently try to push Orbot iOS through app store review with the normal Tor.
19:16:03 <threeletteracronym[m]> But we would be definitely happy to switch to Arti, once it's stable and support all features we need.
19:16:07 <threeletteracronym[m]> However, we recently stumbled over a problem with Rust.
19:16:16 <threeletteracronym[m]> Nate wanted to switch to leaf in Android Orbot, too.
19:16:44 <threeletteracronym[m]> And replace outdated C tun2socks and some old DNS tool he needed to make DNS work.
19:17:02 <threeletteracronym[m]> However, it turns out, we can't get the Rust compiler to compile leaf in less than 40 MByte.
19:17:15 <threeletteracronym[m]> Which is really crazy big, when you think of it.
19:17:23 <sysrqb> yikes.
19:17:32 <threeletteracronym[m]> I mean, it has some dependencies. But still.
19:17:58 <threeletteracronym[m]> So Nate currently is working hard (and, I think, almost finished) on a go tun2socks solution.
19:18:18 <threeletteracronym[m]> Since we already have the Go runtime due to IPtProxy (the Obfs4proxy and Snowflake library)
19:18:18 <sysrqb> huh. interesting.
19:18:48 <threeletteracronym[m]> He was able to fix the DNS weirdness with Java-only DPI.
19:18:57 <threeletteracronym[m]> All together, this adds way less than 40 MB.
19:19:12 <threeletteracronym[m]> Nate is quite concerned about app size.
19:19:27 <threeletteracronym[m]> Since there's a lot of users who live in quite restrained locations.
19:19:34 <sysrqb> Yeah.
19:20:09 <sysrqb> Do Orbot iOS and Android Orbot have any shared codebase?
19:20:42 <threeletteracronym[m]> They share IPtProxy and C-Tor, currently. Besides that, no.
19:20:43 <cyberta> what were the largest dependencies in leaf that added so much MBs?
19:21:07 <threeletteracronym[m]> They're also no feature parity. "Release early, release often."
19:21:26 <threeletteracronym[m]> cyberta: No idea, TBH. I didn't research this further.
19:21:47 <threeletteracronym[m]> It's dependent on C LwIP. That probably doesn't help.
19:22:00 <threeletteracronym[m]> And tok.io is probably a biggie, too.
19:23:16 <sysrqb> threeletteracronym[m]: does Orbot iOS use a similar architecture as Android Orbot? w.r.t. installing/launching/controlling tor?
19:23:32 <threeletteracronym[m]> The dependency list is quite big: https://github.com/eycorsican/leaf/blob/master/leaf/Cargo.toml
19:23:35 <sysrqb> (if you know)
19:23:52 <threeletteracronym[m]> Not really. iOS is quite a constrained beast.
19:24:19 <threeletteracronym[m]> There's the "Network Extension" infrastructure, we have to use on iOS.
19:24:57 <threeletteracronym[m]> Android is quite different in how you plug in a VPN service into the network stack.
19:25:28 <threeletteracronym[m]> App extensions are apps-in-apps. They run on their own process.
19:25:38 <threeletteracronym[m]> There's a very slim communications channel.
19:26:31 <threeletteracronym[m]> Other apps can't really talk to it, or at least, shouldn't. It's more an all-or-nothing approach.
19:27:13 <cyberta> only apps from the same vendor have some more rights
19:27:29 <sysrqb> For some context, n8fr8 sent us this doc: https://docs.google.com/document/d/14mCr8c9pp5jGoGPQH-PB71YWTW6s-4dTjOKiQLgSrCs/edit
19:27:57 <sysrqb> and that is the foundation of what we want to discuss in these meetings
19:28:29 <sysrqb> but I'm wondering if Orbot iOS has any overlap with Android Orbot, ignoring supporting PTs
19:28:54 <threeletteracronym[m]> Exactly. localhost networking is not constrained per se, though. In theory, you could do some inter-app comms there. However, that's non-standard and not exactly endorsed by Apple. Also, keep in mind, that app processes typically get suspended shortly after the user leaves an app. So, there's not so much multitasking going on there.
19:29:34 <threeletteracronym[m]> sysrqb: Not really, no.
19:29:41 <sysrqb> Okay
19:31:02 <sysrqb> Based on your experience, is a cross-platform design worth exploring?
19:31:44 <sysrqb> or should we concentrate on architectures for each target platform?
19:32:40 <sysrqb> I think I am understanding that iOS and Android are different enough such that develping a cross-platform architecture isn't worth our time
19:32:46 <sysrqb> but I want to make sure that is true
19:33:15 <cyberta> +1
19:33:30 <threeletteracronym[m]> There are some things that can be shared:... (full message at https://matrix.org/_matrix/media/r0/download/matrix.org/fkHVHFAGjKtMWhqmoVwApaiT)
19:33:40 <threeletteracronym[m]> However, there's also a lot of differences.
19:34:03 <threeletteracronym[m]> Esp. more limitations on iOS.
19:34:42 <sysrqb> can they share a tor controller implementation?
19:35:20 <sysrqb> or is that best written in Java for Android and ObjC/Swift for iOS?
19:35:51 <threeletteracronym[m]> Depends on the language used. Rust with C FFI is cool. Go is usable. You will need Java and Objective-C glue code, though.
19:36:12 <sysrqb> actually, maybe let's not go down that route because we don't know what the "controller" interface will look like for arti
19:36:14 <threeletteracronym[m]> However, I think, the best edge to divide development is Tor itself.
19:36:30 <sysrqb> okay
19:36:31 <threeletteracronym[m]> That doesn't mean, there couldn't be symetrical implementations of the same thing.
19:37:13 <threeletteracronym[m]> I already had a talk with ahf and nickm about how Arti should be controlled.
19:37:28 <threeletteracronym[m]> In my opinion a REST API would be the most usable, cross-platform approach.
19:37:49 <sysrqb> right. I'm mostly interested in whether we can build shared components/libraries so we don't need to reimplement the same functionality 2 or 3 times for different platforms
19:37:54 <threeletteracronym[m]> Together with platform-specific, but symmetrical API binding implementations.
19:38:07 <sysrqb> because, overall, we are a small team (Tor, LEAP, Guardian Project)
19:39:47 <threeletteracronym[m]> Yeah. However, overdoing the code-sharing will cost you more in the end, due to incompatible design for specific platforms, complex build tooling and inter-dependencies with other code.
19:39:48 <sysrqb> Yeah, the arti interface was discussed in https://pad.riseup.net/p/ARTI_Interfaces-keep
19:40:23 <sysrqb> yep, i completely agree about evaluating the cost/benefit of shared code
19:41:05 <sysrqb> i don't suggest we blindly go down that path
19:41:37 <sysrqb> but I want to discuss it before we begin architected something that is android-specific
19:41:51 <sysrqb> *architecting
19:42:06 <sysrqb> (designing?)
19:42:35 <threeletteracronym[m]> Very well.
19:42:38 <sysrqb> anyway, this conversation has been helpful in understanding the difficulty of that goal
19:43:49 <sysrqb> does anyone have any topics or questions they want to bring up, before I continue?
19:45:22 <aguestuser> nope! :)
19:45:33 <cyberta> no, i think the proposed idea about the Rest-API sounds interesting
19:45:34 <mcnair> not yet
19:46:01 <cyberta> if we can, we should keep staying in the rust universe (except of PTs)
19:46:12 <cyberta> for sharing code
19:46:34 <cyberta> other than that, ahf is working on a replacement for leaf
19:46:52 <cyberta> so hopefully that will be smaller
19:47:07 <threeletteracronym[m]> cyberta: Matrix is an interesting role model for that. The protocol is completely a REST API. However, they provide platform-specific libraries which abstract the JSONAPI, which are mostly symmetric in use.
19:47:48 <cyberta> that's part of the glue then, right
19:48:02 <threeletteracronym[m]> cyberta: AFAIK, the plan is, that Arti supports IP tun interfaces out-of-the-box. That would render leaf useless. Which is a good thing.
19:48:34 <threeletteracronym[m]> cyberta: true
19:49:22 <ahf> IP TUN is what dgoulet and i are hacking on (instead of using leaf). is not part of arti per se right now because we yolocode it
19:49:51 <cyberta> oh, you're here :)
19:50:11 <sysrqb> he usually is :)
19:50:14 <threeletteracronym[m]> I see. So I misunderstood that. Do you plan to make it a part of Arti?
19:50:27 <ahf> yes, it's just a rust crate right now. just not prefixed with "arti-"
19:50:34 <threeletteracronym[m]> "yolocode" 😆
19:50:58 <ahf> ya, we are still prototyping a lot of stuff, so it's not super pretty
19:50:58 <threeletteracronym[m]> So, it will become an optional library to depend on?
19:51:07 <ahf> right now it's a library that uses arti
19:51:21 <threeletteracronym[m]> I see
19:51:32 <ahf> don't put too much into that, that isn't how it'll end
19:51:53 <threeletteracronym[m]> Oh, you're mysterious today!
19:52:39 <sysrqb> brb
19:52:51 <ahf> no, it's just i don't want people to plan something based on something i say in here when it has to do with a prototype we are doing
19:53:46 <threeletteracronym[m]> Well, we're not planning with Arti right now, so don't worry. Happy to do that, once it gains some production-ready state.
19:54:28 <ahf> ya
19:54:45 <sysrqb> okay, i want to set expectation for next meeting before we run out of time
19:54:48 <ahf> i randomly just ended up in here because i was highlighted on matrix. i need to go back and cook
19:55:00 <sysrqb> heh o/ thanks for dropping in :)
19:55:04 <threeletteracronym[m]> ahf: Mahlzeit!
19:55:56 <sysrqb> next meeting I'd like to discuss each component that orbot is using currently
19:56:32 <sysrqb> and identity whether we need it in an arti-world
19:56:59 <sysrqb> in theory, Orbot and TorVPN should have almost identitical internals
19:57:31 <sysrqb> and I'd like to begin discussing what those internals are
19:57:48 <cyberta> but tun2socks won't be essential anymore if needed at all if I understood it correctly
19:57:55 <sysrqb> and, along with that, whether any components can be shared with other platforms
19:58:04 <sysrqb> cyberta: yes, that's correct
19:58:20 <sysrqb> i don't know if any of the current components should be used/reused
19:58:37 <threeletteracronym[m]> tun2socks and leaf are really just ugly workarounds to the fact that Tor is not supporting IP out of the box.
19:58:53 <threeletteracronym[m]> That is really something Tor (or Arti) should do.
19:58:58 <sysrqb> I agree
19:59:17 <sysrqb> okay, thanks everyone for joining today
19:59:20 <mcnair> quick question for this and future meetings - are we using the android components pad to line up agendas and take down notes?
19:59:32 <sysrqb> mcnair: yes, we should in the future
19:59:47 <mcnair> cool cool.  thanks!
19:59:51 <sysrqb> i'll plan the agenda on the pad in the future, too
20:00:09 <sysrqb> o/
20:00:10 <PieroV> o/
20:00:11 <sysrqb> #endmeeting