~sotirisp/kindleto

A Gemini proxy for Kindle e-readers

a40cb77 Serve binary files from memory instead of a file

12 days ago

970e7d5 Split client and server certificate handling in separate files

19 days ago

#kindleto

kindleto is a Gemini and Finger protocol proxy for older Amazon Kindles. It allows accessing Gemini and Finger through the Kindle's web browser. It is based on the Gneto proxy.

#Supported devices

kindleto has been tested on the following devices:

  • Kindle 4 non-touch
  • Kindle 3 WiFi

It probably works on all Kindle 3 versions and possibly other Kindles too. The installation procedure and the init script kindleto-init are what might need to be changed to support more devices.

#Kindle setup

You will need a jailbroken Kindle with the USBNet hack installed. For more information on how to do this see here and here.

The kindleto setup will be easier if you setup key SSH authentication for the Kindle. Then add an entry for your Kindle in ~/.ssh/config, something like

Host kindle
    User root
    HostName 192.168.1.115
    IdentityFile ~/.ssh/kindle
    PasswordAuthentication no

If you want to use a name other than kindle, make sure set the environment variable KINDLE_SSH_HOST to the name or to edit its default value in the Makefile.

#kindleto setup

The kindleto dependencies are a POSIX system, Go, GNU Make, an SSH client and rsync for installation over SSH. After your Kindle is set-up and connected to the same network as your computer run the following commands

make           # Build kindleto and copy/create any other required files
make install   # Copy all required files on the Kindle using rsync
make autostart # Make kindleto start on boot

and then restart your Kindle. Visit 0.0.0.0:1965 with the Kindle's browser and you should see the kindleto homepage.

#kindleto configuration

The kindleto configuration files are in the kindleto directory accessible over USB or in /mnt/us/kindleto over SSH. You can customize the homepage by creating web/index.gmi and override the CSS by creating web/kindleto.css. Gemini client certificates are stored in client-certs.json. The client certificates can be copied directly in client-certs.json or supplied as paths to other files. See the following examples

[
    {
    	"url": "gemini://127.0.0.1:8666/",
    	"certPEM": "-----BEGIN CERTIFICATE-----\nMIIDfzCCAmegAwIBAgIUHlgTGsCA6UacbBZTRFMdMVd2PnswDQYJKoZIhvcNAQEL\n...9dc+s2RE22Ofse16maEriKTbwy0Ij0CFgunK1ECPw6Nm410=\n-----END CERTIFICATE-----",
    	"keyPEM": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDDzlkT/tPsudlX\n...\nze1mLCUB65h7+/9E+dPOG/XR\n-----END PRIVATE KEY-----"
    },
    {
    	"url": "gemini://example.com/",
    	"certPEM": "example.com.crt",
    	"keyPEM": "example.com.key"
    },
    {
    	"url": "gemini://example.com/foo/bar/",
    	"certPEM": "/mnt/us/kindleto/certificates/example.com.foo.bar.crt",
    	"keyPEM": "/mnt/us/kindleto/certificates/example.com.foo.bar.key"
    }
]

#Issues

For any issues send an email to ~sotirisp/public-inbox@lists.sr.ht with a title beginning with [kindleto].

#License

Copyright 2020 Paul Gorman

Copyright 2021 Sotiris Papatheodorou

This program is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.