Skip to content

Examples ​

Complete, runnable configurations for common Turna setups. Each example is a single turna.yaml; start it with:

sh
turna --config-file turna.yaml

Serving and routing ​

ExampleShows
Reverse ProxyAPI gateway with service, strip_prefix, cors, gzip, rate_limit, and access_log.
File ServerStatic files and SPA serving with the folder middleware.
TLSHTTPS entrypoints with self-signed certificates or automatic ACME (Let's Encrypt).
ViewSwagger documentation UI with the view middleware.

Authentication ​

ExampleShows
AuthThe PostgreSQL-backed auth middleware with session and login for a complete identity provider.
Basic AuthProtecting paths with htpasswd-style basic_auth.
LoginBrowser sessions against an external OAuth2 provider with session, login, and role_check.
OAuth2 With IAMThe legacy iam + oauth2 issuer stack.

Configuration and processes ​

ExampleShows
Environment ValuesLoading values with loads and templating them into service environments.
PreprocessReplacing placeholders in files before serving them.

TCP and UDP ​

ExampleShows
SOCKS5 ProxyA SOCKS5 proxy on a TCP entrypoint with credentials and hostname mapping.
DNS ServerA DNS responder on a UDP entrypoint with static records and upstream fallback.