diff --git a/.gitmodules b/.gitmodules index 9256e89..c3c47d7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "jetstream/src"] path = jetstream/src url = https://github.com/bluesky-social/jetstream.git +[submodule "zplc"] + path = zplc + url = https://github.com/char/zplc-server.git diff --git a/ngx/build.sh b/ngx/build.sh index c9f1c68..4737c39 100755 --- a/ngx/build.sh +++ b/ngx/build.sh @@ -4,3 +4,4 @@ mkdir out 2>/dev/null || true deno run ./default.ts > out/default.conf deno run ./relay.ts > out/relay.conf deno run ./jetstream.ts > out/jetstream.conf +deno run ./zplc.ts > out/zplc.conf diff --git a/ngx/zplc.ts b/ngx/zplc.ts new file mode 100644 index 0000000..7cbd611 --- /dev/null +++ b/ngx/zplc.ts @@ -0,0 +1,21 @@ +import ngx from "jsr:@char/ngx@0.2"; + +export const config = ngx("", [ + ngx("server", [ + [ + ngx.serverName("zplc.cerulea.blue"), + ngx.listen(), + "listen 80", + "listen [::]:80", + ngx.letsEncrypt("zplc.cerulea.blue"), + ], + ngx("location /", [ + "proxy_pass http://127.0.0.1:2485", + "proxy_http_version 1.1", + "proxy_set_header Host $host", + "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for", + ]), + ]), +]); + +if (import.meta.main) console.log(config.build()); diff --git a/zplc b/zplc new file mode 160000 index 0000000..311dc16 --- /dev/null +++ b/zplc @@ -0,0 +1 @@ +Subproject commit 311dc168a827922de00cd4d4c559591da2eb4641