Skip to content
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

enabled capability to interact with rmfakecloud cloud servers #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flomlo
Copy link

@flomlo flomlo commented Mar 30, 2022

This PR adds the capability to check for other (well-configured) cloud servers.

One the first run the user is prompted for the server URL. Default is the official remarkable cloud.
Once that has been set everything continues as usual, the user must provide a one-time-code, etc.

From a technical perspective a few things have changed: all the constants in const.py like DEVICE_TOKEN_URL were split up into DEFAULT_TOKEN_SERVER_URL and DEVICE_TOKEN_PATH.

The api.py now uses self.config['device_token_url'] instead of DEVICE_TOKEN_URL. The value of these values is calculated after the initial prompt for the server url and saved in the config file (e.g. $HOME/.config/rmcl/config.json).

Analogously USER_TOKEN_URL and SERVICE_MGR_URL where split up, calculated and put into the config dict.

It might not be the most elegant solution, but it works for me (tested with rmfakecloud and the official cloud)

@flomlo
Copy link
Author

flomlo commented Mar 30, 2022

Note that well-configured rmfakecloud server means that it must configure STORAGE_HOST properly to the server host name. See https://github.com/ddvk/rmfakecloud/pr/161 or ddvk/rmfakecloud#162.

Otherwise one must modify the /etc/hosts of the computer running rmcl and place the appropriate ca.crt on there as well.

@flomlo
Copy link
Author

flomlo commented Mar 30, 2022

Ah yes, it fixes #8 as well until reMarkable™ decides to change it yet again.

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

Successfully merging this pull request may close these issues.

1 participant