Git Product home page Git Product logo

ts-calibre-auth-proxy's Introduction

Authenticating Reverse Proxy for Calibre

Provide access to your Calibre ebook library as a separate node on your Tailnet, including authorization based on Tailscale user identity.

I make no claims about the security of this setup; use this at your own risk.

Setup

Calibre

You'll find all these settings under Preferences > Sharing over the net.

Main tab

  • Enable "Require username and password to access the Content Server"
  • Make a note of the port number if it's not 8080.

Advanced tab

  • Set "Choose the type of authentication used" to "basic"
  • Set "Number of login failures for ban" to "0"

User accounts tab

Create a user account for each Tailscale user you want to grant access to your server.

For the username: take their Tailscale login-name (likely their email address, you'll be able to see this in logs) and replace all characters that aren't letters, numbers, spaces, hyphens, or underscores with underscores.

Set the password to tailscale-authenticated

Proxy

Grab an auth key from the Tailscale admin console, and set it as the environment variable TS_AUTHKEY.

Run the proxy with ts-calibre-auth-proxy and it'll connect to your Tailnet and start providing access to your Calibre server.

If the port number of your Calibre server wasn't 8080, add the flag --origin http://localhost:PORT to the command.

If you want to provide a different name for the Tailscale node, add the flag --hostname NAME to the command.

Future work (?)

This could probably be modified or extended fairly easily to work with other origin servers and other authentication methods. I don't have a need to; this is good enough for my purposes.

ts-calibre-auth-proxy's People

Contributors

legowerewolf avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.