aboutsummaryrefslogtreecommitdiff
path: root/internal
AgeCommit message (Collapse)AuthorFilesLines
2025-04-02Merge branch 'main' into Xe/imessage-scraper-bypassXe/imessage-scraper-bypassXe Iaso1-5/+5
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-01various: fix minor typos (#187)Patrick Linnane1-5/+5
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-03-31data/botPolicies: allow iMessage scraper by defaultXe Iaso1-0/+6
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-03-30fix(tests): disable integration tests on Windows due to posix feature ↵Jason Cameron1-0/+2
reliance (#169) Signed-off-by: Jason Cameron <git@jasoncameron.dev>
2025-03-29Add middleware to set Cache-Control header for challenge HTML (#132)Jason Cameron1-0/+9
* Add middleware to set Cache-Control header for challenge HTML * Add `NoStoreCache` middleware function in `internal/headers.go` to set Cache-Control: no-store header * Apply `NoStoreCache` middleware in `cmd/anubis/main.go` to set Cache-Control header for challenge HTML * docs: Add no-cache header information for challenge page * docs: Update changelog to reflect no-store Cache-Control header addition for challenge page * refactor: rename variable for clarity and update caching middleware in RenderIndex * chore: move changes to the unreleased section Signed-off-by: Jason Cameron <git@jasoncameron.dev> --------- Signed-off-by: Jason Cameron <jasoncameron.all@gmail.com> Signed-off-by: Jason Cameron <git@jasoncameron.dev>
2025-03-29Add staticheck to CI (#152)Xe Iaso2-4/+3
* Add staticheck to CI Signed-off-by: Xe Iaso <me@xeiaso.net> * fix staticcheck warnings Signed-off-by: Xe Iaso <me@xeiaso.net> * oh, right, playwright is broken Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-03-28Hide directory browsing on the static content (#85)Henri Vasserman1-0/+12
* Hide directory browsing on the static content * update changelog
2025-03-28Change how to make Anubis work without a reverse proxy (#86)Henri Vasserman1-6/+20
* Change how to make Anubis work without a reverse proxy * Apply suggestions from code review Co-authored-by: Xe Iaso <me@xeiaso.net> Signed-off-by: Henri Vasserman <henv@hot.ee> * add support for unix sockets. * add env var docs * lib: fix tests Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Henri Vasserman <henv@hot.ee> Signed-off-by: Xe Iaso <me@xeiaso.net> Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-03-27Apply bits of the cookie settings PR one by one (#140)Xe Iaso2-18/+25
Enables uses to change the cookie domain and partitioned flags. Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-03-25Linting and staticcheck fixes. (#101)Yulian Kuncheff1-2/+2
* Fix linting and staticcheck issues * Add changelog update * Remove SetNext
2025-03-22Refactor and split out things into cmd and lib (#77)Yulian Kuncheff5-27/+408
* Refactor anubis to split business logic into a lib, and cmd to just be direct usage. * Post-rebase fixes. * Update changelog, remove unnecessary one. * lib: refactor this This is mostly based on my personal preferences for how Go code should be laid out. I'm not sold on the package name "lib" (I'd call it anubis but that would stutter), but people are probably gonna import it as libanubis so it's likely fine. Packages have been "flattened" to centralize implementation with area of concern. This goes against the Java-esque style that many people like, but I think this helps make things simple. Most notably: the dnsbl client (which is a hack) is an internal package until it's made more generic. Then it can be made external. I also fixed the logic such that `go generate` works and rebased on main. * internal/test: run tests iff npx exists and DONT_USE_NETWORK is not set Signed-off-by: Xe Iaso <me@xeiaso.net> * internal/test: install deps Signed-off-by: Xe Iaso <me@xeiaso.net> * .github/workflows: verbose go tests? Signed-off-by: Xe Iaso <me@xeiaso.net> * internal/test: sleep 2 Signed-off-by: Xe Iaso <me@xeiaso.net> * internal/test: nix this test so CI works Signed-off-by: Xe Iaso <me@xeiaso.net> * internal/test: warmup per browser? Signed-off-by: Xe Iaso <me@xeiaso.net> * internal/test: disable for now :( Signed-off-by: Xe Iaso <me@xeiaso.net> * lib/anubis: do not apply bot rules if address check fails Closes #83 --------- Signed-off-by: Xe Iaso <me@xeiaso.net> Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-03-22internal/test: introduce integration tests using Playwright (#81)Valentin Anger1-0/+276
2025-03-21cmd/anubis: set X-Real-Ip based on X-Forwarded-For (#63)v1.14.1Xe Iaso1-0/+15
This triggers a SHAME release[0]. [0]: https://pridever.org/
2025-03-21Allow filtering by remote addresses (#52)Remilia Da Costa Faro1-3/+18
* Added the possibility to define rules for remote addresses * Added change in changelog * Added check for X-Real-Ip and X-Forwarded-For when checking for remote address filtering * cmd/anubis: refine IP filtering logic * Optimize the configuration so that the IP trie is created once at application start instead of dynamically being created every request. * Document the changes in the changelog and docs site. * Allow pure IP range filtering. * Allow user agent based IP range filtering. * Allow path based IP range filtering. * Create --debug-x-real-ip-default flag for testing Anubis locally without a HTTP load balancer. --------- Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-03-17initial import from /x/ monorepoXe Iaso2-0/+44
Signed-off-by: Xe Iaso <me@xeiaso.net>