--proxy snippets had nginx terminate TLS for the server's names with a certificate you supply, and only for the names known at install time. A domain added later got the wrong certificate on 443, its HTTP-01 challenges weren't passed on port 80, and the server's _443._tcp TLSA records described a certificate nobody was served.
nginx now routes 443 by name.
proxy/nginx-inbuxa-stream.conf (new, included at the top of nginx.conf): a stream block with ssl_preread. The console and the webmail go to nginx's own TLS on 127.0.0.1:8444. Every other name goes, untouched and with the PROXY protocol header, to the server's own HTTPS on 127.0.0.1:8443. It needs libnginx-mod-stream; the file says so, and what to do with an existing stream block or other sites on 443.
proxy/nginx-inbuxa.conf: the console and webmail servers listen on 127.0.0.1:8444 ssl proxy_protocol with real_ip_header proxy_protocol. Port 80 also passes the challenges for autoconfig., autodiscover., mta-sts. and ua-auto-config. of any domain.
The server side (jmap.PassThroughListener): the HTTPS listener is bound to 127.0.0.1:8443 on the host, or kept on the container's 443 and published on 127.0.0.1:8443. It takes PROXY only from where nginx connects (127.0.0.1, or the project gateway for a container), so a connection from there without the header is refused. X-Forwarded-For trust is unchanged: through the router, the peer is the real client.
Existing installs keep their layout. A new file in front of a server that wasn't fitted for it would break the server's names at the next reload. So a rerun without a key leaves the old file (which now says how to move) and logs it. install --key fits the listener, restarts the server, writes both files, and records passThrough in the install record. A move between shapes fits it again.
Caddy: plain Caddy can't route TLS by name, so the fragment is unchanged apart from a note on domains added later and TLSA.
Also: README, plan text, --key help.
Checks: gofmt, vet (amd64 + arm64), go test -count=1 ./..., govulncheck clean.
e2e on Debian 13:
proxy-snippets 24/24, including a domain added after install: mta-sts.second.test gets the server's certificate through nginx, and its port 80 challenges reach the server.
Docs: inbuxa.org branch docs/installer-48-sni-passthrough, to merge when this is in a release.
Fixes #48.
`--proxy snippets` had nginx terminate TLS for the server's names with a certificate you supply, and only for the names known at install time. A domain added later got the wrong certificate on 443, its HTTP-01 challenges weren't passed on port 80, and the server's `_443._tcp` TLSA records described a certificate nobody was served.
**nginx now routes 443 by name.**
- `proxy/nginx-inbuxa-stream.conf` (new, included at the top of `nginx.conf`): a `stream` block with `ssl_preread`. The console and the webmail go to nginx's own TLS on `127.0.0.1:8444`. Every other name goes, untouched and with the PROXY protocol header, to the server's own HTTPS on `127.0.0.1:8443`. It needs `libnginx-mod-stream`; the file says so, and what to do with an existing `stream` block or other sites on 443.
- `proxy/nginx-inbuxa.conf`: the console and webmail servers listen on `127.0.0.1:8444 ssl proxy_protocol` with `real_ip_header proxy_protocol`. Port 80 also passes the challenges for `autoconfig.`, `autodiscover.`, `mta-sts.` and `ua-auto-config.` of any domain.
**The server side** (`jmap.PassThroughListener`): the HTTPS listener is bound to `127.0.0.1:8443` on the host, or kept on the container's 443 and published on `127.0.0.1:8443`. It takes PROXY only from where nginx connects (127.0.0.1, or the project gateway for a container), so a connection from there without the header is refused. X-Forwarded-For trust is unchanged: through the router, the peer is the real client.
**Existing installs keep their layout.** A new file in front of a server that wasn't fitted for it would break the server's names at the next reload. So a rerun without a key leaves the old file (which now says how to move) and logs it. `install --key` fits the listener, restarts the server, writes both files, and records `passThrough` in the install record. A move between shapes fits it again.
**Caddy:** plain Caddy can't route TLS by name, so the fragment is unchanged apart from a note on domains added later and TLSA.
Also: README, plan text, `--key` help.
Checks: gofmt, vet (amd64 + arm64), `go test -count=1 ./...`, govulncheck clean.
e2e on Debian 13:
- proxy-snippets 24/24, including a domain added after install: `mta-sts.second.test` gets the server's certificate through nginx, and its port 80 challenges reach the server.
- proxy-snippets-upgrade 24/24 (new, `OLD_REF=origin/main`).
- all-host 20/20, install-local 26/26, install-public 20/20, topology 28/28, status-export 16/16, install-host 44/44, join-host 26/26.
Not covered: podman (DISTRO=fedora).
Docs: inbuxa.org branch `docs/installer-48-sni-passthrough`, to merge when this is in a release.
The nginx file terminated TLS for the server's names with a certificate the
operator supplied, for the names known at install time only. A domain added
later got the wrong certificate on 443, its HTTP-01 challenges weren't
forwarded on port 80, and the server's _443._tcp TLSA records described a
certificate nobody was served.
nginx now routes 443 by name, in nginx-inbuxa-stream.conf (stream,
ssl_preread). The console and the webmail go to nginx's own TLS on
127.0.0.1:8444; every other name goes, untouched and with the PROXY protocol
header, to the server's own HTTPS listener on 127.0.0.1:8443. That listener
is fitted by the installer (jmap.PassThroughListener): bound on loopback on
the host, or kept on the container's 443 and published on 127.0.0.1:8443,
and taking PROXY only from where nginx connects. Port 80 also passes the
challenges of the four service names of any domain.
An install from before keeps its layout, since a new file in front of an
unfitted server would break its names at the next reload. Running install
again with --key fits the listener and moves it over; the install record
notes it (passThrough). A move between shapes fits it again.
Caddy can't route by name without a plugin, so its fragment says what that
means for domains added later and TLSA.
proxy-snippets-upgrade.sh installs with the installer before #48 (OLD_REF),
runs this one without a key (the layout stays, and says how to move), then
with one (the router is written, the server's names pass through). The
second-run check in proxy-snippets.sh allows the server a new self-signed
certificate: what matters is that it is still the server's.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #48.
--proxy snippetshad nginx terminate TLS for the server's names with a certificate you supply, and only for the names known at install time. A domain added later got the wrong certificate on 443, its HTTP-01 challenges weren't passed on port 80, and the server's_443._tcpTLSA records described a certificate nobody was served.nginx now routes 443 by name.
proxy/nginx-inbuxa-stream.conf(new, included at the top ofnginx.conf): astreamblock withssl_preread. The console and the webmail go to nginx's own TLS on127.0.0.1:8444. Every other name goes, untouched and with the PROXY protocol header, to the server's own HTTPS on127.0.0.1:8443. It needslibnginx-mod-stream; the file says so, and what to do with an existingstreamblock or other sites on 443.proxy/nginx-inbuxa.conf: the console and webmail servers listen on127.0.0.1:8444 ssl proxy_protocolwithreal_ip_header proxy_protocol. Port 80 also passes the challenges forautoconfig.,autodiscover.,mta-sts.andua-auto-config.of any domain.The server side (
jmap.PassThroughListener): the HTTPS listener is bound to127.0.0.1:8443on the host, or kept on the container's 443 and published on127.0.0.1:8443. It takes PROXY only from where nginx connects (127.0.0.1, or the project gateway for a container), so a connection from there without the header is refused. X-Forwarded-For trust is unchanged: through the router, the peer is the real client.Existing installs keep their layout. A new file in front of a server that wasn't fitted for it would break the server's names at the next reload. So a rerun without a key leaves the old file (which now says how to move) and logs it.
install --keyfits the listener, restarts the server, writes both files, and recordspassThroughin the install record. A move between shapes fits it again.Caddy: plain Caddy can't route TLS by name, so the fragment is unchanged apart from a note on domains added later and TLSA.
Also: README, plan text,
--keyhelp.Checks: gofmt, vet (amd64 + arm64),
go test -count=1 ./..., govulncheck clean.e2e on Debian 13:
mta-sts.second.testgets the server's certificate through nginx, and its port 80 challenges reach the server.OLD_REF=origin/main).Not covered: podman (DISTRO=fedora).
Docs: inbuxa.org branch
docs/installer-48-sni-passthrough, to merge when this is in a release.