emansih / FireflyMobile

Mobile Application for Firefly III written in Kotlin
GNU General Public License v3.0
323 stars 48 forks source link

Unable to connect to my server using tor #86

Open ghost opened 4 years ago

ghost commented 4 years ago

Firefly III Server Version: 5.1.0 Firefly III Mobile Version: 2.0.3 Android Version:
9.0 LineageOS 16 official with root and microG Device Information:

emansih commented 4 years ago

Your situation is really unique. Can I email you an APK later this week which will print out sensitive debugging logs? Is your email pgp.im [at] pm.me?

ghost commented 4 years ago

Sure, go ahead :)

emansih commented 4 years ago

Could you try out this APK? https://drive.google.com/open?id=1GOaiK0zw6Oe6Rs948PhUxYRj-d9hJ8Xc. I am assuming you are using port 9050 for your onion service?

ghost commented 4 years ago

Thank you for the fast response. I tried the APK with checked checkbox and, unfortunately, it didn't work. I get the same error as I did earlier. I also didn't see any debugging info appearing anywhere.

I am assuming you are using port 9050 for your onion service?

Sorry, I think I didn't understand your question. On my phone I use Orbot, and, as far as I know, it uses this port by default to connect apps to Tor network. On my server, however, the port is closed since there are no apps using it. My service is exposed on port 80.

I tried to capture packages on my phone, and it seems the app doesn't make any requests when I click the "SIGN IN" button and just throws the error. Also, I used "MatLog Libre" (shows system logs, the app is from F-droid), but I didn't find anything in logs related to the application.

emansih commented 4 years ago

Just to be clear. Is this your setup? Your phone -> TOR -> Internet -> Your server

emansih commented 4 years ago

Anyway you can't see any logs because all logs are stripped on all of my production builds.

ghost commented 4 years ago

Just to be clear. Is this your setup? Your phone -> TOR -> Internet -> Your server

Yes.

Anyway you can't see any logs because all logs are stripped on all of my production builds.

Ah, I didn't understand you properly then. I thought it will display logs to me :P

ghost commented 4 years ago

Edit: Moved the log file on pastebin

The log: https://pastebin.com/GmyYZD6f

emansih commented 4 years ago

Did you check the self signed cert box?

ghost commented 4 years ago

No, I didn't. I am not sure if there is a place to get one. 🤔 I run a few other different services and they work just fine.

ghost commented 4 years ago

Just to be clear. Is this your setup? Your phone -> TOR -> Internet -> Your server

Ough, I just noticed that I wrote you a wrong answer. Sorry about that. As I noted in the issue, I try to connect to my service using onion address, therefore my server is never exposed to the clearnet.

So the setup is My Phone -> Tor -> My Server.

fabianski7 commented 4 years ago

I did the access test using InviZible Pro to access the Tor network and it worked partially. In root mode, no problem. But in VPN mode, that error is displayed: stream was reset: INTERNAL_ERROR Those were the logs captured I didn't try to create a new connection, I just used the one that already existed

emansih commented 4 years ago

@fabianski7 your logs does not tell me anything. I tried using InviZible Pro and I was able to access my self hosted Firefly and the demo site

emansih commented 4 years ago

Accessing my personal Firefly III instance over tor onion service.

screenshot

fabianski7 commented 4 years ago

@fabianski7 your logs does not tell me anything. I tried using InviZible Pro and I was able to access my self hosted Firefly and the demo site

Yes, I did too. But not in vpn mode.

emansih commented 4 years ago

if you are using http in your onion url it will not work without some modifications to the source code