aboutsummaryrefslogtreecommitdiff
path: root/main.go
Commit message (Collapse)AuthorAgeFilesLines
* fix: serve media again by unsetting download-proxy and scoping Host per requestChristian Cleberg2026-07-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Two independent faults made every image fail while pages still rendered. config.example.json shipped download-proxy=http://127.0.0.1:8080. Only media fetches go through that proxy — pages reach DeviantArt via devianter on the default transport — so when nothing listens there, images 502 and the rest of the page looks fine. In a scratch container 127.0.0.1 is the container itself, so the default could never work under Docker. Unset it and document that it must stay empty unless an operator really runs a proxy. Host was a package global reassigned by every request, so a concurrent request could overwrite it mid-render and emit URLs on another origin's host and port. The instance's own default-src 'self' CSP then blocked those images. Thread the request's host through skunkyart instead, and take it as an explicit argument in URLBuilder, ParseMedia, ParseDescription, BuildUserPlate and ConvertDeviantArtURLToSkunkyArt. Feeds keep their absolute URLs. Also start RefreshInstances after ExecuteConfig rather than before it: the goroutine read CFG while json.Unmarshal was writing it (a race the detector flags), and its fetch escaped both the throttle and the configured User-Agent. Verified: 300 concurrent requests with distinct Host headers now round-trip their own host (was 1 leak per 300), go test -race is clean, and cache+proxy both enabled serves 200 image/jpeg cold and from cache.
* feat: throttle and time out outbound DeviantArt requestsChristian Cleberg2026-07-141-0/+4
| | | | | | | | | | | | DeviantArt fronts its API with CloudFront + WAF, which bans egress IPs that hit it too hard. devianter issues requests with a bare http.Client, so unbounded concurrent handlers each pulled ~150-200 KB of JSON, which both risked a ban and could exhaust the process under a bot flood. Wrap the default transport to bound rate and concurrency for deviantart.com and add timeouts. Other hosts (wixmp image CDN) pass straight through, so media stays fast, and ProxyFromEnvironment is preserved so HTTPS_PROXY egress still works.
* deps: migrate to github.com/zerolabsco/devianter v0.3.1Christian Cleberg2026-07-141-1/+1
| | | | | | | | | | Repoint the import path from git.macaw.me/skunky/devianter, replacing a placeholder v0.0.0 require that had no go.sum entry and did not resolve. v0.3.1 reorders the last two return values of PerformSearch, Group.Get and Group.Gallery from (..., error, Error) to (..., Error, error); adapt the call sites. The two types differ, so the compiler enforces this.
* Add da.opnxng.com + lost-skunk.cc is now in Finlandlost+skunk2025-04-071-0/+0
|
* v1.3.2v1.3.2lost+skunk2024-09-231-1/+1
|
* Два API-эндпоинтаlost+skunk2024-09-031-0/+2
|
* темплейты в бинарнике и улучшенная ↵lost+skunk2024-08-131-1/+2
| | | | система кеша
* v1.3lost+skunk2024-08-011-4/+14
|
* Реки и копирование темплейтов в озуlost+skunk2024-07-061-0/+1
|
* Реализация конфигаlost+skunk2024-07-061-0/+1
|
* крымские наработкиlost+skunk2024-06-271-1/+4
|
* панель навигации, ответы и ежедневные артыlost+skunk2024-06-141-1/+7
|
* альфа: работают только посты и поискlost+skunk2024-06-131-0/+7