Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/astrophena/tsid
Authenticate Tailscale users with Caddy
https://github.com/astrophena/tsid
Last synced: 8 days ago
JSON representation
Authenticate Tailscale users with Caddy
- Host: GitHub
- URL: https://github.com/astrophena/tsid
- Owner: astrophena
- License: mit
- Archived: true
- Created: 2021-04-28T18:38:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-08T16:03:36.000Z (about 2 years ago)
- Last Synced: 2024-08-01T13:30:13.704Z (3 months ago)
- Language: Go
- Homepage:
- Size: 404 KB
- Stars: 26
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
`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
[Caddy]: https://caddyserver.com
[Tailscale]: https://tailscale.com
[placeholders]: https://caddyserver.com/docs/conventions#placeholders
[xcaddy]: https://github.com/caddyserver/xcaddy
[MIT]: LICENSE.md