aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-04-03docs/local-dev: point people to yeet v1.13.3Xe/yeet-binariesXe Iaso1-1/+1
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03fix security alertXe Iaso1-1/+3
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03fix ci?Xe Iaso2-2/+2
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03fix code injection?Xe Iaso1-1/+1
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03split package build CI jobsXe Iaso2-3/+83
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03upload each package individuallyXe Iaso1-1/+1
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03rename package builds jobXe Iaso1-1/+1
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03tell CI to fetch all git metadataXe Iaso1-0/+2
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03build package artifacts in CIXe Iaso2-1/+75
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03Merge branch 'main' into Xe/yeet-binariesXe Iaso15-29/+71
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03cmd/anubis: add --extract-resources flag to extract static assets to the ↵Xe Iaso2-0/+41
filesystem (#216) Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03build(deps): bump image-size from 1.2.0 to 1.2.1 in /docs (#210)dependabot[bot]1-3/+3
Bumps [image-size](https://github.com/image-size/image-size) from 1.2.0 to 1.2.1. - [Release notes](https://github.com/image-size/image-size/releases) - [Commits](https://github.com/image-size/image-size/compare/v1.2.0...v1.2.1) --- updated-dependencies: - dependency-name: image-size dependency-version: 1.2.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-03Add new Anubis mascot (#204)Xe Iaso13-26/+27
* Add new Anubis mascot Signed-off-by: Xe Iaso <me@xeiaso.net> * web: add artist credit to footer Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-02Merge branch 'main' into Xe/yeet-binariesXe Iaso10-248/+140
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-02apply review feedbackXe Iaso2-5/+21
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-03data/botPolicies: allow iMessage scraper by default (#178)Xe Iaso3-0/+13
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-02add a Makefile (#191)Xe Iaso4-4/+34
* add a Makefile Based on advice from IRC, a makefile helps downstream packagers understand how to build the software. Signed-off-by: Xe Iaso <me@xeiaso.net> * Apply review suggestions Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-02README: add repology status imageXe Iaso1-0/+4
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-02build(deps): bump actions/cache from 3 to 4 in the github-actions group (#198)dependabot[bot]1-1/+1
Bumps the github-actions group with 1 update: [actions/cache](https://github.com/actions/cache). Updates `actions/cache` from 3 to 4 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02build(deps-dev): bump postcss-cli from 11.0.0 to 11.0.1 in the npm group (#197)dependabot[bot]2-242/+58
Bumps the npm group with 1 update: [postcss-cli](https://github.com/postcss/postcss-cli). Updates `postcss-cli` from 11.0.0 to 11.0.1 - [Release notes](https://github.com/postcss/postcss-cli/releases) - [Changelog](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-cli/compare/11.0.0...11.0.1) --- updated-dependencies: - dependency-name: postcss-cli dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02dependabot: enable (#189)Patrick Linnane2-0/+29
* dependabot: enable Signed-off-by: Patrick Linnane <patrick@linnane.io> * dependabot: group updates Signed-off-by: Patrick Linnane <patrick@linnane.io> --------- Signed-off-by: Patrick Linnane <patrick@linnane.io> Signed-off-by: Xe Iaso <me@xeiaso.net> Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-04-02Merge branch 'main' into Xe/yeet-binariesXe Iaso6-1/+46
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-01docs/developer: add local dev docs for yeetXe Iaso1-0/+29
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-01implement packaging proof of concept with yeetXe Iaso6-16/+138
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-01workflows: fix zizmor findings (part 1) (#190)Patrick Linnane5-1/+10
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-04-01ci: add `zizmor` (#188)Patrick Linnane2-0/+36
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-04-01various: fix minor typos (#187)Patrick Linnane3-6/+7
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-03-31docs: document ED25519_PRIVATE_KEY_HEX_FILE (#186)Talya Connor1-15/+16
2025-03-31cmd/anubis: support ED25519_PRIVATE_KEY_HEX_FILE (#185)Talya Connor2-22/+37
2025-03-31lib/anubis: actually check the result with the correct difficulty (#180)Henri Vasserman4-12/+98
* cmd/anubis actually check the result with the correct difficulty * chore: changelog * test(cmd/anubis): make test check for difficulty * lib: add regression test for CVE-2025-24369 Signed-off-by: Xe Iaso <me@xeiaso.net> * bump VERSION and CHANGELOG Tracks #181 Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net> Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-03-31web/js: Added a wait with button continue + 30 second auto continue after ↵Cyra Westmere5-31/+119
30s if you click "Why am I seeing this? (#166) * web/js: update page to allow users to read the "Why am I seeing this?", complete with a button to send them through after challenge completed, and a 30s timeout that does the same. * .gitignore: added .DS_store. * docs/docs/CHANGELOG: added to the Unreleased section as requested in code quality guidelines * web: pushing index_templ.go alongside this update. * package.json: added postcss to dependencies list. * package-lock: added postcss to dependencies * Revert "package-lock: added postcss to dependencies" This reverts commit bf02e7ba56e8bf8705821d4f4864c66b1ef614bf. * Revert "package.json: added postcss to dependencies list." This reverts commit 1a38c63049dc75099dc652ed725c7862eef4b3e4. * web/js: OG comments are important --------- Signed-off-by: Xe Iaso <me@xeiaso.net> Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-03-30Fix: Correct typo in challenge page title (main) (#174)Jason Cameron2-1/+2
- Fixed a typo in the challenge page title, removing an unnecessary backslash. - Updated the index page title to "Making sure you're not a bot!". Signed-off-by: Jason Cameron <git@jasoncameron.dev>
2025-03-30fix(tests): disable integration tests on Windows due to posix feature ↵Jason Cameron3-1/+4
reliance (#169) Signed-off-by: Jason Cameron <git@jasoncameron.dev>
2025-03-30xess: do not specify a version in `go:generate` (#164)soopyc1-1/+1
specifying a version breaks file generation with `-mod=vendor`, which is used by tooling like nixpkgs. this commit replaces the `go:generate` statement with ones found in other files (which builds successfully) for consistency. Signed-off-by: Cassie Cheung <me@soopy.moe>
2025-03-30chore: Update readme to reflect refactor from the monorepo (#163)Jason Cameron1-1/+1
Signed-off-by: Jason Cameron <git@jasoncameron.dev>
2025-03-29fix(logs): Correctly format listener address (#162)Jason Cameron2-3/+9
* fix: Correctly format listener address (https://github.com/TecharoHQ/anubis/issues/93) Handle addresses that include a hostname, not just ports. If the address starts with a colon, assume it's just a port and prefix it with "http://localhost". Otherwise, prefix the entire address with "http://". This ensures that the listener URL is correctly formatted regardless of whether it includes a hostname or just a port. Signed-off-by: Jason Cameron <git@jasoncameron.dev> * chore(docs): add changelog entry Signed-off-by: Jason Cameron <git@jasoncameron.dev> --------- Signed-off-by: Jason Cameron <git@jasoncameron.dev>
2025-03-29web/js: Add LibreJS banner to Anubis JavaScript to allow LibreJS users to ↵Fijxu2-1/+30
run the challenge (#161) * web/js: add project license in the JavaScript used by Anubis This will allow LibreJS users to pass the captcha without problems without having to whitelist anubis manually. * Update docs/docs/CHANGELOG.md Co-authored-by: Xe Iaso <me@xeiaso.net> Signed-off-by: Fijxu <fijxu@nadeko.net> --------- Signed-off-by: Fijxu <fijxu@nadeko.net> Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-03-29Debug tool for benchmarking proof-of-work algorithms (#155)jae beller13-8/+331
* cmd/anubis: add a debug option for benchmarking hashrate Having the ability to benchmark different proof-of-work implementations is useful for extending Anubis. This adds a flag `--debug-benchmark-js` (and its associated environment variable `DEBUG_BENCHMARK_JS`) for serving a tool to do so. Internally, a there is a new policy action, "DEBUG_BENCHMARK", which serves the benchmarking tool instead of a challenge. The flag then replaces all bot rules with a special rule matching every request to that action. The benchmark page makes heavy use of inline styles, because currently all global styles are shared across all pages. This could be fixed, but I wanted to avoid major changes to the templates. * web/js: add signal for aborting an active proof-of-work algorithm Both proof-of-work algorithms now take an optional `AbortSignal`, which immediately terminates all workers and returns `false` if aborted before the challenge is complete. * web/js: add algorithm comparison to the benchmark page "Compare:" is added to the benchmark page for testing the relative performance between two algorithms. Since benchmark runs generally have high variance, it may take a while for the averages to converge on a stable difference. --------- Signed-off-by: Xe Iaso <me@xeiaso.net> Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-03-29Add periodic cleanup job for DecayMap (#8) (#158)Jason Cameron5-1/+70
* Add periodic cleanup job for DecayMap see https://github.com/TecharoHQ/anubis/issues/8 * Refactor: Improve DecayMap cleanup tests and add Len method - Refactored DecayMap cleanup tests to use the new Len method for more precise assertions. - Added a Len method to DecayMap to retrieve the number of entries. - Simplified conditional checks in Get method. * chore(changelog): add entry * fix(tests): Use Impl.expire for decaymap cleanup Signed-off-by: Jason Cameron <git@jasoncameron.dev> --------- Signed-off-by: Jason Cameron <git@jasoncameron.dev>
2025-03-29cmd/containerbuild: use TrimSuffix instead of TrimRight (#157)Fijxu2-1/+2
Using TrimRight will remove all characters from `*dockerRepo` from right to left that match a character contained on `"/"+filepath.Base(*dockerRepo)` (the cutset) until it doesn't matches anymore. So for example, if `dockerRepo` is `example.com/fijxu/anubis`, and `"/"+filepath.Base(*dockerRepo)` is `/anubis`, it will remove `u/anubis` and not just `/anubis` from `dockerRepo` because `u` is a character inside the cutoff.
2025-03-29docs/developer/building-anubis: fix syntaxXe Iaso1-1/+1
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-03-29Show a progress bar for the probability of completing the proof of work ↵jae beller6-144/+119
challenge (#87) Since the challenge is done off of the main thread, there is no simple way to report the progress done towards completing it. This change adds a callback parameter, `progressCallback`, which is called with the most recently attempted nonce every ~1024 iterations (should this be configurable?). For the single-threaded "slow" algorithm, this is exactly every 1024 iterations. For the multi-threaded "fast" algorithm, threads take turns reporting in a round-robin as then notice they have passed a multiple of 1024. This complexity is to avoid individual threads falling behind their siblings due to the overhead of messaging the main thread. To minimize this overhead as much as possible, a regular number is sent instead of an object. With the new information provided by the callback, a hash rate display is added to the challenge page. This display is updated at most once per second and set with tabular numbers to avoid the constantly changing value being too visually distracting. * web: show a progress bar based on completion probability To provide more feedback to the user, the spinner is replaced with a progress bar of the probability the challenge is complete. Since it looks a little weird that a progress bar would fill up a quarter of the way and then jump to the end (even though the probability would make that happen 1 in 4 times), the bar is mapped with a quadratic easing function to move faster at the beginning and then slow down as the probability of redirection increases. If the probability exceeds 90%, a message appears letting the user know things are taking longer than expected and to continue being patient. Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-03-29Add middleware to set Cache-Control header for challenge HTML (#132)Jason Cameron3-5/+18
* 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-29docs/developer: add build directions for manually building Anubis (#154)Xe Iaso2-3/+48
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-03-29Add staticheck to CI (#152)Xe Iaso5-35/+9
* 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-28web/js: show more errors when some probable error cases happen (#151)Xe Iaso7-40/+105
Closes #150 This should hopefully make Anubis more self-describing when errors do happen so users can self-service.
2025-03-28all: do not commit generated JS/CSS to source control (#148)Xe Iaso28-75/+221
Closes #125 Closes #40 Among other things, this moves all of the asset generation to run within the context of an npm script. Developer documentation stubs have been added so that people can get started more easily. The top-level Dockerfile (which is no longer used in production) has been removed as its presence has been causing confusion. This changeset will break it anyways. These changes will make for less "repo churn" as the static assets are built and rebuilt, at the cost of making the build step more complicated for downstream packagers. If this becomes a burden, we can explore making a "release tarball" that contains pre-massaged outputs.
2025-03-28yeetfile: build debian packagesXe Iaso2-17/+20
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-03-28Hide directory browsing on the static content (#85)Henri Vasserman3-1/+14
* Hide directory browsing on the static content * update changelog
2025-03-28Change how to make Anubis work without a reverse proxy (#86)Henri Vasserman5-10/+26
* 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>