Research-Stack/5-Applications/caddy-edge/caddy.json
Brandon Schneider 683bde4af6 feat(infra): WebRTC bridge + Caddy edge config + Tailscale Funnel
WebRTC bridge (5-Applications/webrtc-bridge/):
- Go signaling server with pion/webrtc v4 + gorilla/websocket
- Browser client with dark UI, RTT/ICE metrics, request builder
- HTTP proxy over WebRTC data channel to Traefik
- k3s deployment on 361395-1 with hostNetwork
- Traefik IngressRoute at /webrtc with stripPrefix middleware
- Bypasses Tailscale DERP relay latency (~129ms → direct P2P)

Caddy edge config (5-Applications/caddy-edge/):
- Caddyfile with Porkbun DNS-01 challenge
- JSON config with explicit TLS connection policies
- k3s deployment on 361395-1 with hostNetwork
- Note: TLS handshake fails in Caddy 2.10.2 (internal error)
  despite certs being loaded. Using Tailscale Funnel instead.

Infrastructure fixes:
- Tailscale Funnel enabled on 361395-1 → Traefik
- Traefik ingress for 361395-1.tail4e7094.ts.net → Homer
- Funnel hostname: https://361395-1.tail4e7094.ts.net
2026-05-28 13:11:53 -05:00

87 lines
2.3 KiB
JSON

{
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [":443"],
"routes": [
{
"match": [{"host": ["researchstack.info"]}],
"handle": [
{
"handler": "reverse_proxy",
"upstreams": [{"dial": "100.102.173.61:30080"}]
}
],
"terminal": true
},
{
"match": [{"host": ["auth.researchstack.info"]}],
"handle": [
{
"handler": "reverse_proxy",
"upstreams": [{"dial": "100.102.173.61:30080"}]
}
],
"terminal": true
},
{
"match": [{"host": ["*.researchstack.info"]}],
"handle": [
{
"handler": "static_response",
"status_code": 301,
"headers": {
"Location": ["https://researchstack.info{http.request.uri}"]
}
}
],
"terminal": true
}
]
},
"srv_redirect": {
"listen": [":80"],
"routes": [
{
"handle": [
{
"handler": "static_response",
"status_code": 301,
"headers": {
"Location": ["https://{http.request.host}{http.request.uri}"]
}
}
]
}
]
}
}
},
"tls": {
"automation": {
"policies": [
{
"subjects": ["researchstack.info", "*.researchstack.info"],
"issuers": [
{
"module": "acme",
"ca": "https://acme-v02.api.letsencrypt.org/directory",
"email": "allaun@researchstack.info",
"challenges": {
"dns": {
"provider": {
"name": "porkbun",
"api_key": "{env.PORKBUN_API_KEY}",
"api_secret_key": "{env.PORKBUN_SECRET_KEY}"
}
}
}
}
]
}
]
}
}
}
}