main
stats-gateway
gRPC service collecting and publishing HTTP/TCP/DNS/TLS-handshake timing metrics for two geo-distributed OpenSpeedTest nodes (FL — Finland, PL1 — Poland). Powers the dashboard at https://stats.projectshitpost.fun/.
Components
cmd/server— gRPC server (TLS terminated by nginx, listens on loopback).cmd/collector— periodic prober (HTTP HEAD with httptrace), runs every 5 min via systemd timer.cmd/snapshot— generatessnapshot.jsonfor the dashboard, runs every 10 min.internal/probes— timing logic (DNS, TCP, TLS handshake, HTTP).internal/storage— SQLite WAL with embedded migrations.internal/service— gRPC handlers (RecentResults,Aggregate,Tunnel).proto/— protobuf definitions; generated Go ingen/.stats-site/— static dashboard (vanilla JS + canvas charts, no framework deps).psp-stats-cli/— Go CLI for querying the API.systemd/— ops units for running the service + timers.docs/AUTH.md— auth doc for theTunnelmethod (Bearer JWT/HS256, used by internal CI agents).
Build
make build # ./bin/{stats-gateway,stats-collector,stats-snapshot}
make test
cd psp-stats-cli && make build
API
grpcurl -d '{"node":"fl","limit":5}' \
stats.projectshitpost.fun:443 stats.v1.SpeedStatus/RecentResults
See proto/stats.proto.
License
MIT — see LICENSE.
Languages
Go
78.1%
HTML
10.8%
JavaScript
5.9%
Shell
2.2%
CSS
2.1%
Other
0.9%