Skip to content
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.
/ tsid Public archive

Authenticate Tailscale users with Caddy

License

Notifications You must be signed in to change notification settings

astrophena/tsid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tsid is no longer maintained. Feel free to fork.


tsid is a Caddy plugin that allows access only to requests coming from the Tailscale network and allows to identify users behind these requests by setting some Caddy placeholders:

Placeholder Description
{http.vars.tailscale.name} User name
{http.vars.tailscale.email} User email

Usage

  1. Build Caddy with this plugin by xcaddy:

     $ xcaddy build --with go.astrophena.name/tsid
    
  2. Make sure that tsid is ordered first:

     {
       order tsid first
     }
    
  3. Add the tsid directive to your Caddyfile and use the placeholders:

     tsid
     
     respond "Hello, {http.vars.tailscale.name}!"
    

License

MIT © Ilya Mateyko

About

Authenticate Tailscale users with Caddy

Resources

License

Stars

Watchers

Forks

Languages