Thank you so much for building this canon torified app that uses the Leaf backend. I have faced an issue when I try building a sample iOS VPN using the similar way like orbot.
Problem
The Packet Tunnel provider just exits quietly due to a NULL netif from leaf_run internally.
How to produce
Create a sample iOS VPN that uses Shared/Tunnel/LeafPTProvider and related components under shared directory as an NE extension.
Start the VPN
Packet Tunnel provider will exit quietly because of error from netstack-lwip.
Could you please instruct what extra work we need to do or pay attention to to make it work? I've seen in the orbot-ios main app, there are stuff like Transport and commTunnel, but I don't think they are related.
Your help is greatly appreciated! Some sponsorship will be also be provided in this case.
Hey Orbot community,
Thank you so much for building this canon torified app that uses the Leaf backend. I have faced an issue when I try building a sample iOS VPN using the similar way like orbot.
Problem
The Packet Tunnel provider just exits quietly due to a NULL netif from leaf_run internally.
How to produce
Debugging
Retrieve tunnel FD from iOS
orbot-ios/Shared/Tunnel/BasePTProvider.swift
leaf conf, for simplicity
This conf is a borrowing work from the upstream work orbot-ios/Shared/template.conf with hardcoded DNS
Packet tunnel provider
Similarly, orbot-ios/Shared/Tunnel/LeafPTProvider.swift is used, leaf.conf is generated with the {{}} placeholders replaced with working SOCKS host and port for sure.
netstack-lwip faults
When the tunnel is started, it quits quietly in a couple of seconds with the fault like:
At the line 35, netif_first always returns NULL. It seems that the utun device from iOS is not usable.
netstack-lwip/src/stack_impl.rs
Looking for Help
Could you please instruct what extra work we need to do or pay attention to to make it work? I've seen in the orbot-ios main app, there are stuff like Transport and commTunnel, but I don't think they are related.
Your help is greatly appreciated! Some sponsorship will be also be provided in this case.