mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-06-10 06:18:15 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e7181a9a4b | |||
| 5660426700 | |||
| 44d5fa3ce0 |
@@ -44,3 +44,6 @@ xou
|
|||||||
AWOO
|
AWOO
|
||||||
firewalls
|
firewalls
|
||||||
bindhosts
|
bindhosts
|
||||||
|
handrolled
|
||||||
|
xai
|
||||||
|
gitlab
|
||||||
|
|||||||
@@ -10,4 +10,3 @@ builds:
|
|||||||
ldflags:
|
ldflags:
|
||||||
- -s -w
|
- -s -w
|
||||||
- -extldflags "-static"
|
- -extldflags "-static"
|
||||||
- -X github.com/TecharoHQ/anubis.Version={{.Env.VERSION}}
|
|
||||||
|
|||||||
@@ -1,12 +1,27 @@
|
|||||||
// Package anubis contains the version number of Anubis.
|
// Package anubis contains the version number of Anubis.
|
||||||
package anubis
|
package anubis
|
||||||
|
|
||||||
import "time"
|
import (
|
||||||
|
"runtime/debug"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
bi, ok := debug.ReadBuildInfo()
|
||||||
|
if !ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// XXX(Xe): many things in this repo assume that the development version
|
||||||
|
// of anubis is `devel` and ReadBuildInfo returns `(devel)`. Shim the gap.
|
||||||
|
if bi.Main.Version != "(devel)" {
|
||||||
|
Version = bi.Main.Version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Version is the current version of Anubis.
|
// Version is the current version of Anubis.
|
||||||
//
|
//
|
||||||
// This variable is set at build time using the -X linker flag. If not set,
|
// This is set from the Go module runtime version.
|
||||||
// it defaults to "devel".
|
|
||||||
var Version = "devel"
|
var Version = "devel"
|
||||||
|
|
||||||
// CookieName is the name of the cookie that Anubis uses in order to validate
|
// CookieName is the name of the cookie that Anubis uses in order to validate
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ bots:
|
|||||||
# Challenge Firefox AI previews
|
# Challenge Firefox AI previews
|
||||||
- import: (data)/clients/x-firefox-ai.yaml
|
- import: (data)/clients/x-firefox-ai.yaml
|
||||||
|
|
||||||
|
# x.ai has a scraper that is killing gitlab instances
|
||||||
|
- import: (data)/crawlers/xai.yaml
|
||||||
|
|
||||||
# Allow common "keeping the internet working" routes (well-known, favicon, robots.txt)
|
# Allow common "keeping the internet working" routes (well-known, favicon, robots.txt)
|
||||||
- import: (data)/common/keep-internet-working.yaml
|
- import: (data)/common/keep-internet-working.yaml
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
- name: xai-crawler-and-asn
|
||||||
|
action: DENY
|
||||||
|
user_agent_regex: code-review-sourcing.*\+xai-research
|
||||||
|
remote_addresses:
|
||||||
|
- 69.12.56.0/21
|
||||||
|
- name: xai-crawler-user-agent
|
||||||
|
action: DENY
|
||||||
|
user_agent_regex: code-review-sourcing.*\+xai-research
|
||||||
@@ -25,6 +25,9 @@
|
|||||||
# Challenge Firefox AI previews
|
# Challenge Firefox AI previews
|
||||||
- import: (data)/clients/x-firefox-ai.yaml
|
- import: (data)/clients/x-firefox-ai.yaml
|
||||||
|
|
||||||
|
# x.ai has a scraper that is killing gitlab instances
|
||||||
|
- import: (data)/crawlers/xai.yaml
|
||||||
|
|
||||||
# Allow common "keeping the internet working" routes (well-known, favicon, robots.txt)
|
# Allow common "keeping the internet working" routes (well-known, favicon, robots.txt)
|
||||||
- import: (data)/common/keep-internet-working.yaml
|
- import: (data)/common/keep-internet-working.yaml
|
||||||
|
|
||||||
|
|||||||
@@ -23,12 +23,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Improve error messages and fix broken REDIRECT_DOMAINS link in docs ([#1193](https://github.com/TecharoHQ/anubis/issues/1193))
|
- Improve error messages and fix broken REDIRECT_DOMAINS link in docs ([#1193](https://github.com/TecharoHQ/anubis/issues/1193))
|
||||||
- Add Bulgarian locale ([#1394](https://github.com/TecharoHQ/anubis/pull/1394))
|
- Add Bulgarian locale ([#1394](https://github.com/TecharoHQ/anubis/pull/1394))
|
||||||
- Fixed case-sensitivity mismatch in geoipchecker.go
|
- Fixed case-sensitivity mismatch in geoipchecker.go
|
||||||
|
- Use [Go's native version stamping](https://michael.stapelberg.ch/posts/2026-04-05-stamp-it-all-programs-must-report-their-version/) instead of a handrolled variant.
|
||||||
- Fix CEL internal errors when iterating `headers`/`query` map wrappers by implementing map iterators for `HTTPHeaders` and `URLValues` ([#1465](https://github.com/TecharoHQ/anubis/pull/1465)).
|
- Fix CEL internal errors when iterating `headers`/`query` map wrappers by implementing map iterators for `HTTPHeaders` and `URLValues` ([#1465](https://github.com/TecharoHQ/anubis/pull/1465)).
|
||||||
- Enable [metrics serving via TLS](./admin/policies.mdx#tls), including [mutual TLS (mTLS)](./admin/policies.mdx#mtls).
|
- Enable [metrics serving via TLS](./admin/policies.mdx#tls), including [mutual TLS (mTLS)](./admin/policies.mdx#mtls).
|
||||||
- Enable [HTTP basic auth](./admin/policies.mdx#http-basic-authentication) for the metrics server.
|
- Enable [HTTP basic auth](./admin/policies.mdx#http-basic-authentication) for the metrics server.
|
||||||
- Fix a bug in the dataset poisoning maze that could allow denial of service [#1580](https://github.com/TecharoHQ/anubis/issues/1580).
|
- Fix a bug in the dataset poisoning maze that could allow denial of service [#1580](https://github.com/TecharoHQ/anubis/issues/1580).
|
||||||
- Add config option to add ASN to logs/metrics.
|
- Add config option to add ASN to logs/metrics.
|
||||||
- Log weight when issuing challenge.
|
- Log weight when issuing challenge.
|
||||||
|
- Block x.ai's crawler for code review training.
|
||||||
- Gate pprof endpoints behind `metrics.debug` in the policy file.
|
- Gate pprof endpoints behind `metrics.debug` in the policy file.
|
||||||
- Limit naive honeypot r9k delay to one second.
|
- Limit naive honeypot r9k delay to one second.
|
||||||
- Fix an obscure case where adding query values to a subrequest match could cause an invalid rule match when using path based matching for protected resources.
|
- Fix an obscure case where adding query values to a subrequest match could cause an invalid rule match when using path based matching for protected resources.
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@ $`npm run assets`;
|
|||||||
},
|
},
|
||||||
|
|
||||||
build: ({ bin, etc, systemd, doc }) => {
|
build: ({ bin, etc, systemd, doc }) => {
|
||||||
$`go build -o ${bin}/anubis -ldflags '-s -w -extldflags "-static" -X "github.com/TecharoHQ/anubis.Version=${git.tag()}"' ./cmd/anubis`;
|
$`go build -o ${bin}/anubis -ldflags '-s -w -extldflags "-static" ./cmd/anubis`;
|
||||||
$`go build -o ${bin}/anubis-robots2policy -ldflags '-s -w -extldflags "-static" -X "github.com/TecharoHQ/anubis.Version=${git.tag()}"' ./cmd/robots2policy`;
|
$`go build -o ${bin}/anubis-robots2policy -ldflags '-s -w -extldflags "-static"' ./cmd/robots2policy`;
|
||||||
|
|
||||||
file.install("./run/anubis@.service", `${systemd}/anubis@.service`);
|
file.install("./run/anubis@.service", `${systemd}/anubis@.service`);
|
||||||
file.install("./run/default.env", `${etc}/default.env`);
|
file.install("./run/default.env", `${etc}/default.env`);
|
||||||
|
|||||||
Reference in New Issue
Block a user