Examples
Complete, runnable configurations for common Turna setups. Each example is a single turna.yaml; start it with:
sh
turna --config-file turna.yamlServing and routing
| Example | Shows |
|---|---|
| Reverse Proxy | API gateway with service, strip_prefix, cors, gzip, rate_limit, and access_log. |
| File Server | Static files and SPA serving with the folder middleware. |
| TLS | HTTPS entrypoints with self-signed certificates or automatic ACME (Let's Encrypt). |
| View | Swagger documentation UI with the view middleware. |
Authentication
| Example | Shows |
|---|---|
| Auth | The PostgreSQL-backed auth middleware with session and login for a complete identity provider. |
| Basic Auth | Protecting paths with htpasswd-style basic_auth. |
| Login | Browser sessions against an external OAuth2 provider with session, login, and role_check. |
| OAuth2 With IAM | The legacy iam + oauth2 issuer stack. |
Configuration and processes
| Example | Shows |
|---|---|
| Environment Values | Loading values with loads and templating them into service environments. |
| Preprocess | Replacing placeholders in files before serving them. |
TCP and UDP
| Example | Shows |
|---|---|
| SOCKS5 Proxy | A SOCKS5 proxy on a TCP entrypoint with credentials and hostname mapping. |
| DNS Server | A DNS responder on a UDP entrypoint with static records and upstream fallback. |