-
Notifications
You must be signed in to change notification settings - Fork 81
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
Ankidroid can't connect to anki-sync-server #58
Comments
Switching back to ankidroid verion 2.9 can solve it |
Both of those two bits of information are very interesting! Forcing HTTPS is going to be more and more of an issue, no matter how much it annoys some people. Let's Encrypt is getting really easy to use now though, so this should be less of a hassle going forward. |
I talked to the AnkiDroid guys and from version 2.10+ they want people to switch to SSL: I took a look at #22 and set up my own reverse proxy, which cleared up the clear text issue. There are various ways to do so. I set mine up on AWS with a signed certificate from Let's Encrypt but I believe you might be able to use a self-signed one as well. |
It seems Ankidroid (version: |
For local https |
I run it on my PC with the Anki desktop folder, using the command: Then I put the rootCA.pem file in my Android 9 phone, install the certificate for VPN/apps in the settings and reboot the phone. I am unable to install the file «rootCA-key.pem». Unfortunetely, this method does not allow me to sync with https. I then downloaded and installed Ankidroid 2.9. @dobefore Sorry to everyone for digging this problem. Now that Anki desktop has a builtin sync server, is there a way to make Ankidroid sync with it? If I first upload my Anki Desktop 2.0.52 collection then try to download with Ankidroid 2.9 version using http it says 400: BAD REQUEST. The same happens if I upload with Ankidroid 2.9 and try to download with Anki desktop 2.0.52. When try with https it does the same as the writer of this issue has posted. |
I think the network security policy is completely unnecessary. I run my self-hosted anki-sync-server and have access via WireGuard. That is, with my VPN cert set up, I can guarantee secure connection via http://192.168.2.200:27701. Having compulsory TLS connection will resulting double cert encrypt & decrypt in my situation. Also, it is inconvenient to obtain a cert for an ip like 192.168.2.200. I admit TLS should be a must for any public web services. But in my case, I never intend for opening to public, therefore such policy cause trouble to me. |
I've setup anki-sync-server, opened the port 27701 on my router, manage to sync my laptop Anki to the server using the internet ip.
I can also access the server from my android's browser and see the message "Anki Sync Server"
But when I try syncing from the phone, it failed with the following error:
From the readme:
It looks like http isn't supported by default on android
https://better-coding.com/solved-android-cannot-send-data-to-the-server-cleartext-communication-to-not-permitted-by-network-security-policy/
The text was updated successfully, but these errors were encountered: