8000 Which client to use? · Issue #38 · ddvk/rmfakecloud · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Which client to use? #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
randrej opened this issue Feb 17, 2021 · 17 comments
Closed

Which client to use? #38

randrej opened this issue Feb 17, 2021 · 17 comments

Comments

@randrej
Copy link
randrej commented Feb 17, 2021

Hi people, I managed to get this onto my remarkable and to host the (master version) server on my local server, but I'm unable to connect with the official Android app. I, of course, altered the hosts file both on my computer and on the OpenWRT router, so that the traffic gets redirected to rmfakecloud, but still no dice.

I use Linux and an Android phone and it would be nice if I could use either of them to access the device. Is there a client for either of the platforms that works with rmfakecloud? I'm primarily looking for something that allows syncing PDFs and such.

Btw, the embjs branch doesn't work.

@Eeems
Copy link
Contributor
Eeems commented Feb 17, 2021

Are you sure your phone is being redirected properly? It could be using Google's DNS instead of what your router is set to.

@randrej
Copy link
Author
randrej commented Feb 17, 2021

I'll try to apply redirects it in the phone hosts themselves tomorrow. That will rule out any chance of external DNS issues.

@ddvk
Copy link
Owner
ddvk commented Feb 19, 2021

you can use rmapi (theare are env variables to set the host)

@ddvk
Copy link
Owner
ddvk commented Mar 4, 2021

did you install the CA certificate on your phone?

@randrej
Copy link
Author
randrej commented Mar 4, 2021

rmfakecloud is reverse-proxied to its own subdomain through caddy on my local server, and caddy uses a cert issued by my local CA for my homelab/selfhosted setup, so the CA's cert is already installed on all of my devices including the phone.

Maybe the issue is that caddy only reverse-proxies 80/443 ports, and the app accesses rmfakecloud at port 3000, which is passed through directly without proxying?

@ddvk
Copy link
Owner
ddvk commented Mar 6, 2021

everything should go through the reverse proxy then, did you set the STORAGE_URL env variable in rmafekcloud to point your revrese proxy?

@deetuned
Copy link

I also cannot use the official Android reMarkable app.

I've got a Pi-hole running Wireguard on the same network as my rmfakecloud which dishes out local DNS entries, redirecting all four domains in the README.md to the IP address of my rmfakecloud. I have confirmed that this works via a ping on my mobile while Wireguard is active.

I also installed the ca.crt file I pulled off my rM2 under /home/root/rmfakecloud onto my mobile, and also combined the proxy.crt and proxy.key into a single file as per this post and installed it.

The official app just says, "Verifying one-time code. Please wait..." endlessly.

Am I installing the incorrect certificate?

Cheers

@ddvk
Copy link
Owner
ddvk commented Mar 10, 2021

does the log of rmfakecloud show any entries (requests)? also, the phone will try to connect to port 443, did you put a reverse proxy in front?

@deetuned
Copy link

does the log of rmfakecloud show any entries (requests)? also, the phone will try to connect to port 443, did you put a reverse proxy in front?

It does not show any entries.

And yes, I did put a reverse proxy in front :) I followed the nginx guide and as a result can use rmfakecloud wherever there's WiFi.

I was able to test it with my mobile on the local network and it still did not work. The STORAGE_URL is set to https://my-public-domain-example.com which is pointing to rmfakecloud.

@ddvk
Copy link
Owner
ddvk commented Mar 11, 2021

let me see if I understand.
you use wireguard on the phone and you create a vpn to your pi hole. the pi is also the dns server which resolves the cloud addresses to the nginx reverse proxy which has the multidomain cert installed, which in turn forwards to rmfakecloud:3000 ?
also the pi should resolve the my-public-domain-example.com to the internal ip of the reverse proxy.

on the phone, can you open https://my.remarkable.com/health and https://local.remarkable.com in a browser?

the next would be a network sniffer on the access point in order to see what is happening exactly

also are you using the master or embedjs?

@deetuned
Copy link

let me see if I understand.
you use wireguard on the phone and you create a vpn to your pi hole. the pi is also the dns server which resolves the cloud addresses to the nginx reverse proxy which has the multidomain cert installed, which in turn forwards to rmfakecloud:3000 ?
also the pi should resolve the my-public-domain-example.com to the internal ip of the reverse proxy.

Correct! :)

on the phone, can you open https://my.remarkable.com/health and https://local.remarkable.com in a browser?

  • I can access https://my.remarkable.com/health and receive a Working, 1 clients message. However, I do get a security certificate warning, but I'm assuming this is because the SSL certificates don't match?
  • I cannot access anything on https://local.remarkable.co 8000 m. If you meant https://local.appspot.com, I can access that one, but I get a security certificate warning that refuses to let me through, even if I click "proceed anyway".

the next would be a network sniffer on the access point in order to see what is happening exactly

I don't think my home router supports packet captures, but I can certainly run a tshark on the Pi to see if it's even receiving the packets from the mobile device.

also are you using the master or embedjs?

I'm using embedjs. :)

Cheers for you response!

@ddvk
Copy link
Owner
ddvk commented Mar 15, 2021

well, the problem seems to be the SSL certificate. The phone still doesnt trust the CA. I've managed to install the CA on ios once, but havent tested it on android.

@deetuned
Copy link

well, the problem seems to be the SSL certificate. The phone still doesnt trust the CA. I've managed to install the CA on ios once, but havent tested it on android.

Awesome, that gives me a great starting point. :) Thank you! Which certificate is it that I should be installing? Do I need to be generating one, or is it one of the certificates generated on the rM itself via automagic.sh?

Cheers

@deetuned
Copy link
deetuned commented Mar 16, 2021

Wait so:

  1. Which file/certificate did you install on your iOS device?
  2. Did you generate it on the server, or the rM?
  3. Was it the proxy certificate or the ca certificate?
  4. What file format?
  5. Did you have to copy any files from the rM to the server?

Cheers

@deetuned
Copy link

Hm... I think I'm missing something here due to lack of knowledge...

The reverse proxy (on the server) is using a Let's Encrypt SSL certificate because I am accessing it publicly. Should I be using a different certificate? If so, which certificate should I be using? Is it configured in nginx, or is it installed on the server's operating system instead?

@ddvk
Copy link
Owner
ddvk commented Mar 24, 2021

on ios, i installed the ca.crt certificate that was generated on the tablet, but i also used the same reverse proxy using the same proxy.crt and .key taken from the tablet

so i know what the problem is.

your are resolving my.remarkable.com to your nginx proxy which has the lets encrypt cert with your public dns, which doesnt match the hostname, thus the app fails to establish ssl.

solution: run a second nginx reverse proxy, with the proxy.crt and ca.crt from the tablet internally and use that for the android app, and make the wireguard host resolve: my.remarkable., appspot.com etc to it.

@ddvk
Copy link
Owner
ddvk commented Mar 30, 2021

so, i tested with an old tablet, with Android 5 (it seems that for android 7 and above you need to root it to force it to use custom ca-s) and my openwrt router and it works

steps:
generated the certs on
ran the rmfake-proxy on my router with the proxy.key and proxy.crt (pointing to localhost:3000)
ran rmfakecloud on the same host
installed the ca.crt on the android device
changed the dns mappings (appspot, remarkable etc) on the router to point to the router ip (192.168.1.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0