add Caddyfile, set up loopback and socat

This commit is contained in:
Ryan Heywood 2025-08-31 22:36:20 -04:00
parent 09666a69eb
commit 1fb9a610a0
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
2 changed files with 12 additions and 2 deletions

View File

@ -0,0 +1,3 @@
localhost:3000 {
respond "Hello, world! I'm in an enclave :^)"
}

View File

@ -1,4 +1,11 @@
#!/bin/sh
echo "Hello, world!"
caddy --version
echo "Configuring loopback network"
busybox ip addr add 127.0.0.1/32 dev lo
busybox ip link set dev lo up
echo "Establishing socat listener"
socat VSOCK-LISTEN:3000,reuseaddr,fork TCP:localhost:3000 &
echo "Starting Caddy"
caddy run --config /etc/caddy/Caddyfile