From 111416c072c7dc76eb7a96c8890185df866d8b1f Mon Sep 17 00:00:00 2001 From: Nexus Admin Date: Tue, 19 Nov 2024 19:48:16 +0100 Subject: [PATCH] init --- caddy.container | 6 ++++++ caddy.socket | 12 ++++++++++++ config/Caddyfile | 21 +++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 caddy.container create mode 100644 caddy.socket create mode 100644 config/Caddyfile diff --git a/caddy.container b/caddy.container new file mode 100644 index 0000000..4026f23 --- /dev/null +++ b/caddy.container @@ -0,0 +1,6 @@ +[Container] +Image=docker.io/caddy:2.9.0-beta.3-alpine +Volume=%h/.config/containers/systemd/caddy/config:/etc/caddy:Z,ro + +[Install] +WantedBy=multi-user.target default.target diff --git a/caddy.socket b/caddy.socket new file mode 100644 index 0000000..8957e10 --- /dev/null +++ b/caddy.socket @@ -0,0 +1,12 @@ +[Socket] +# fd/3 +ListenStream=[::]:80 + +# fd/4 +ListenStream=[::]:443 + +# fdgram/5 +ListenDatagram=[::]:443 + +[Install] +WantedBy=sockets.target diff --git a/config/Caddyfile b/config/Caddyfile new file mode 100644 index 0000000..a52639a --- /dev/null +++ b/config/Caddyfile @@ -0,0 +1,21 @@ +{ + auto_https disable_redirects + admin off +} + +http://nexus.plabble.org { + bind fd/3 { + protocols h1 + } + respond "Can't get this!" +} + +https://nexus.plabble.org { + bind fd/4 { + protocols h1 h2 + } + bind fdgram/5 { + protocols h3 + } + respond "Can't get this!" +}