infra: a dedicated access log for the public vhost, and deny hosting networks
deploy / build (push) Successful in 8m30s
deploy / deploy-web (push) Successful in 7s
deploy / deploy-api (push) Successful in 18s

The proxy's shared access.log mixes every site on oolon and records neither
Host nor Origin. Origin is the only field that separates our UI's WebSocket
from another site's, because browsers send no Referer on the upgrade. The
public vhost now writes its own JSON-lines log carrying both.

Ten days of the shared log showed no third-party site using the API, and two
headless pollers: an OVH host polling summary once a minute (88% of all
no-referer REST) and a Hetzner host identifying as `stardust-devops`. The
public vhost now refuses the hosting networks of both providers, from the
prefixes RIPEstat reports as announced by AS24940, AS213230, AS212317 and
AS16276, generated by script/deny-networks.py and committed so the list is
reviewed. AS35540 is OVH's residential broadband and is left out. Against the
same ten days, the list matches the two pollers and no visitor.

Refusals are a plain-text 403 and are still logged with "denied":1, so a VPN
user caught by it shows up rather than disappearing.

Closes #24

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E4Ldjix2ofMdQ7dzqgnYA8
This commit is contained in:
2026-09-22 15:03:12 +03:00
co-authored by Claude Opus 5
parent 501a9e6ad4
commit 6d8c3fe3ea
5 changed files with 869 additions and 2 deletions
+7 -1
View File
@@ -255,9 +255,15 @@ REMOTE
REMOTE
info "$EDGE_HOST: nginx configuration"
# Shipped together: the log format in the upstream file reads
# $blackbeard_denied, which only blackbeard-deny.conf defines, and nginx -t
# rejects a config naming a variable nothing defines. The deny list is
# regenerated here by script/deny-networks.py and never edited on the proxy
# (blackbeard/observer#24).
rsync -a --rsync-path 'sudo rsync' \
"$REPO_ROOT/asset/nginx/blackbeard-deny.conf" \
"$REPO_ROOT/asset/nginx/blackbeard-upstream.conf" \
"$EDGE_HOST:/etc/nginx/conf.d/blackbeard-upstream.conf"
"$EDGE_HOST:/etc/nginx/conf.d/"
rsync -a --rsync-path 'sudo rsync' \
"$REPO_ROOT/asset/nginx/$PUBLIC_NAME.conf" \
"$REPO_ROOT/asset/nginx/$INTERNAL_NAME.conf" \