🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

go.shabbyrobe.org/rackoff

Package Overview
Dependencies
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

go.shabbyrobe.org/rackoff

Go Modules
Version
v0.0.0-20260522013351-8e5002dc376a
Version published
Created
Source

Rack Off

El cheapo alternative to some of the heavier, or more encumbered, proof-of-work challenge based bot defense systems. Likely nowhere near as good. Very simple. Probably works. Maybe.

"Rack Off" is Australian for "Go Away". You say it when you don't want to use stronger language. Given what abusive scrapers are doing to the open internet, it's probably time for stronger language.

Quickstart

inner := http.HandlerFunc(func (w http.ResponseWriter, r *http.Request) {
    w.Write([]byte("OK"))
})

rackOffConfig := rackoff.Config{
    SecretKey:        "<secret>",
    CookieName:       "rackoff",
    Difficulty:       16,
    TokenLifetime:    24 * time.Hour,
    ChallengeTimeout: 2 * time.Minute,
}
rackOff, err := rackoff.NewMiddleware(rackOffConfig, inner, nil)
if err != nil {
    return err
}

http.ListenAndServe("127.0.0.1:8990", rackOff)

Expectation management

This is a tool I hack on for my own amusement in an ad-hoc fashion. No stability guarantees are made, the code is not guaranteed to work, and anything may be changed, renamed or removed at any time as I see fit.

If you wish to use any of this, I strongly recommend you copy-paste pieces as-needed (including tests and license/attribution) into your own project, or fork it for your own purposes.

Bug reports are welcome, feature requests discouraged, and code contributions will not be accepted.

License

rackoff is Copyright Blake Williams code@shabbyrobe.org. It is licensed under the MIT license.

FAQs

Package last updated on 22 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts