LN-Zap / zap-android

Zap Wallet - Native android lightning wallet for node operators focused on user experience and ease of use ⚡️
MIT License
165 stars 49 forks source link

Inconsistent Tor connection via Orbot #266

Closed elvece closed 3 years ago

elvece commented 3 years ago

Zap is frequently unable to connect to Tor by Orbot proxy. On my device, Orbot is configured in VPN mode and Zap is added to the Tor-enabled apps. Orbot is the only VPN / Tor service enabled on my device.

Description

Approximately 95% of the time, I receive this error when starting up Orbot and connecting to Zap:

Tor connection failed.
Please make sure that:
- Orbot is running
- Orbot is in VPN mode
- Zap is in Orbot's list of activated apps.

The noted points are fulfilled on my device. I receive this error almost every time I open the Zap application. The only time it works as expected is sometimes when I restart my device. I have had the wallet load a few times, but eventually I get the same error noted above.

Expected Behavior

Tor connection should consistently work when Zap is entered from Orbot's activated list of apps, or by accessing the app from my device with Orbot turned on and in VPN mode.

Actual Behavior

Tor connection fails 95% of the time on app initialization and no features can be accessed.

Steps to Reproduce

  1. Download Orbot
  2. Download Zap from PlayStore
  3. On Orbot's main screen select the gear icon under tor enabled apps.
  4. Add Zap, then press back.
  5. Click STOP on the big onion logo.
  6. Exit Orbot and reopen it. Turn on VPN Mode.
  7. Start your connection to the Tor network by clicking on the big onion (if it has not automatically connected already)
  8. Click on Zap from the list of Tor-Enabled Apps
  9. Access Wallets from menu
  10. Click the (+) button
  11. Select "Connect to Remote Node"
  12. Scan QR code or paste LND quick connect url
  13. Open newly added wallet
  14. See above error message where Tor connection failed

Context

LND quick connect string being used contains:

LND node address and port TLS certificate Admin macaroon

LND node address is over Tor eg: xxx.onion:10009

It was setup following instructions here.

Environment

bmml1 commented 3 years ago

Can confirm this issue.

Zap version: 0.3.5-beta, build: 2023 Android version: 11 Device: Google Pixel 3a LND Version: 0.11.1-beta

michaelWuensch commented 3 years ago

Hi, I am sorry for the inconvenience. Actually a lot of people have now requested a native TOR implementation. I am right now looking into it. Hopefully I will be able to get it done within the app, so Orbot will no longer be needed.

ghost commented 3 years ago

The native Tor support would be amazing. :pray: I am using Orbot (as proxy) + Netguard (as VPN) and it is not working with Zap. The native Tor would solve the issue (just by whitelisting the Zap in the Netguard).

t0msen76 commented 3 years ago

Any news or workarounds with that? I still do have the same issue, too.

bitpaint commented 3 years ago

I still do have the same issue, too.

Kixunil commented 3 years ago

Any progress on this? I know of two people who are unable to connect over Tor at all. Tor browser gives the expected error (connection reset - because HTTP is invalid, of course).

majikaz commented 3 years ago

I can reproduce this issue

Zap version: 0.4.2-beta, build: 3029 Android version: 9 Device: Huawei P20 LND Version: v0.12.1-beta

I have Zap added to my orbot exception list and I have VPN-mode enabled. I am unable to connect Zap (android) through Orbot I can only get Zap to connect on a "hit & miss" basis which is achieved via a full reboot of my handset device. FYI: My Zap desktop wallet connects perfectly fine to my Umbrel node I have running on my LAN. This is the same node I am attempting to get my Zap android wallet to connect to (which is sporadic at best) Native Tor support in Zap would be amazing

Any updates?

michaelWuensch commented 3 years ago

@majikaz Yes, there are updates. Native Tor implementation is nearly done and will be rolled out with the next update in the coming weeks. Please have a look at #344 for more details.

michaelWuensch commented 3 years ago

I have just released v0.5.0-beta which includes native Tor support. This should solve the Tor connection issues. If there are still problems after the update, feel free to open a new Issue.

bezysoftware commented 3 years ago

Just wanted to let you know it works perfectly! Orbot was extremely unstable on my Pixel 5, but now Zap works like a charm :)

michaelWuensch commented 3 years ago

@bezysoftware Awesome, so glad to hear its working for you guys! :)

majikaz commented 3 years ago

Tested Zap on Android connected to my rpi 4 8GB Umbrel Node Ver: 4.0.2

Device: Huawei P20 Lite Build No. 9.1.0.378(C782E8R1P7) EMUI: 9.1.0 Android Ver: 9

Works Like a charm.. Great job TY