frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Swad 0.11 – auth service for Nginx and Anubis alternative

https://github.com/Zirias/swad
3•Zirias•22h ago

Comments

Zirias•22h ago
TBH, I've shown this before, but a LOT has changed since then, most notably:

* Performance improvements by adding support for epoll() (with singalfd and timerfd), kqueue() and solaris event ports, and also by fixing a few design issues

* Server side sessions are gone, instead signed Json Web Tokens are implemented -> saves lots of RAM

Among other things, swad can do what Anubis can do, that's why it's in the title. It's much smaller though, and proof-of-work-crypto-challenge-to-defeat-bots is just ONE module, the other modules offering more regular means of authentication: by calling some external tool, by checking a bcrypt hash from a file, or by asking PAM.

Contrary to Anubis, it's NOT a reverse proxy but designed to work with nginx' auth_request facility instead, might also work with other reverse proxies if they offer something similar. Swad is written in C, compiles to a 200-300kiB (depending on compiler and platform) binary, needs only zlib, OpenSSL (LibreSSL) and optionally libpam. Doing some stress testing with 1000 distinct simulated clients, I managed to bump up the resident set on my FreeBSD machine to 100MiB, but no more. Without heavy load, it typically stays at much less.

The general architecture of swad is a reactor with attached thread pool. A HTTP request is parsed (to headers and body) in the main thread, then a thread job is created to run the handler pipeline (including response compression, cookie management, form and query string parsing, etc) that's expected to add a HTTP response to some context object, once that's finished, the main thread takes over again sending that out to the client.

During my stress test mentioned above, I was kind of surprised to see the main (reactor) thread almost maxing out one core, while the pool threads (running request pipelines) didn't have too much to do. Well, serving a small login form and processing login requests indeed isn't THAT much work. Maybe it might make sense to have more than one "reactor thread"? Could this work, e.g. by just listening on the same socket from multiple threads?

1oooqooq•5h ago
and the estimate of all the wasted energy for AI doesn't even account for all the personal devices now wasting proof of work because the enshitification cause by AI master's crawlers.

CSS Relative Color Syntax

https://developer.chrome.com/blog/css-relative-color-syntax
1•stefankuehnel•1m ago•0 comments

Please don't upload my code to GitHub

https://nogithub.codeberg.page/
2•max_•3m ago•0 comments

Not in My Name: An Open Letter to Microsoft from Brian Eno

https://www.stopwar.org.uk/article/not-in-my-name-an-open-letter-to-microsoft-from-brian-eno/
1•tareqak•3m ago•0 comments

It Is Time to Stop Teaching Frequentism to Non-Statisticians (2024)

https://arxiv.org/abs/1201.2590
1•Tomte•4m ago•0 comments

Return to the Text (2022)

https://im1776.com/2022/01/07/return-to-the-text/
1•Tomte•4m ago•0 comments

CSS-Text-Wrap: Balance

https://developer.chrome.com/docs/css-ui/css-text-wrap-balance
1•stefankuehnel•4m ago•0 comments

Show HN: Terminal Flower Garden

https://github.com/bdavidzhang/flower-garden-cli
1•alphacentauri42•6m ago•0 comments

Show HN: Templated – add a graphic editor to SaaS/App without rebuilding Canva

https://templated.io/embed-image-editor-in-your-app/
1•fieldspeter•10m ago•0 comments

Mexican drug cartels use 100s of 1000s of guns bought from licensed US gun shops

https://stories.theconversation.com/mexican-drug-cartels-use-hundreds-of-thousands-of-guns-bought-from-licensed-us-gun-shops-fueling-violence-in-mexico-drugs-in-the-u-s-and-migration-at-the-border/index.html
1•rntn•12m ago•0 comments

Qubit -this plugin converts telegram into unlimited cloud storage

https://qubit.up.railway.app
1•itssaju•14m ago•0 comments

I Bought a Robot Cat for My Rabbit

https://nautil.us/i-bought-a-robot-cat-for-my-rabbit-1213169/
1•dnetesn•17m ago•0 comments

OpenAI Platform – Remote MCP

https://platform.openai.com/docs/guides/tools-remote-mcp
1•koolba•18m ago•0 comments

What Birdsong Says About Motivation

https://nautil.us/what-birdsong-says-about-motivation-1213111/
1•dnetesn•18m ago•0 comments

On Interstellar Quantum Communication and the Fermi Paradox

https://arxiv.org/abs/2408.02445
1•bookofjoe•18m ago•0 comments

Show HN: I spent 8 months trying to make LLMs Hack

1•Adeeb0123•20m ago•0 comments

Rpl: Replace strings in files – Linux man page

https://linux.die.net/man/1/rpl
2•thunderbong•22m ago•0 comments

Scientists discover class of crystals with properties that may be revolutionary

https://www.nanotechnologyworld.org/post/scientists-discover-class-of-crystals-with-properties-that-may-prove-revolutionary
3•MaysonL•25m ago•0 comments

After one post, 80 messages, a sabotage, and now a relaunch with top incubator

https://www.styly.io/
1•Duhan•26m ago•0 comments

I 3D-Printed Luigi Mangione's 'Ghost Gun' [video]

https://www.youtube.com/watch?v=tQB_ib-KQXA
1•avipars•28m ago•0 comments

Live facial recognition cameras may become 'commonplace' as police use soars

https://www.theguardian.com/technology/2025/may/24/police-live-facial-recognition-cameras-england-and-wales
3•c-oreills•28m ago•0 comments

Droplet Outbursts from Onion Cutting

https://arxiv.org/abs/2505.06016
1•zdw•30m ago•0 comments

Evolution study shows how rice inherits tolerance to cold without DNA changes

https://www.nature.com/articles/d41586-025-01616-9
1•zdw•31m ago•0 comments

AI can't even fix a simple bug – but sure, let's fire engineers

https://nmn.gl/blog/ai-scam
37•namanyayg•32m ago•14 comments

Nvidia to launch cheaper Blackwell AI chip for China

https://www.cnbc.com/2025/05/24/nvidia-to-launch-cheaper-blackwell-ai-chip-for-china-reuters-says.html
1•belter•32m ago•0 comments

RiskRAG: A Data-Driven Solution for Improved AI Model Risk Reporting

https://dl.acm.org/doi/10.1145/3706598.3713979
1•Gigacore•34m ago•0 comments

Psychiatrist Reveals What Alcohol Actually Does to Your Brain [video]

https://www.youtube.com/watch?v=5QWMSLmVVyw
1•teleforce•35m ago•0 comments

Cory Doctorow Keynote Speech PyCon US 2025 [video]

https://www.youtube.com/watch?v=ydVmzg_SJLw&list=PL2Uw4_HvXqvb98mQjN0-rYQjdDxJ_hcrs&index=1
3•andersource•36m ago•0 comments

I built a local autonomous trading AI in 2 hours to destroy Wall Street

https://github.com/statikfintechllc/AscendAI
1•GremlinGPT•38m ago•0 comments

If anyone builds this, everyone dies

https://ifanyonebuildsit.com/
3•lumenwrites•39m ago•0 comments

OCR-to-TMDB Movie/Show Detection System

https://gist.github.com/andrewarrow/b6a20109ccb96dd7336419c8750a2946
1•andrewfromx•39m ago•1 comments