Hacker Newsnew | past | comments | ask | show | jobs | submit | GSGBen's commentslogin

Ah yep, I read about the TCP RST problem in one of the RFC docs, then promptly forgot about it and never implemented anything to avoid it. Thankyou for the detailed notes.


Noice!


Oof, thanks.


Should be back up now with a very temporary workaround in place.


Found the issue - a use after free in send_response() if I close the session early due to an error. Was continuing to the next bit. Put a temp fix in place, will push a proper one later.


Still seems to have an issue, but no output before the crash. Will have to do some more debugging. Thanks for the test HN!

Source is here btw: https://github.com/GSGBen/unsafehttp/blob/main/src/main.c


hotfixing httpd UAFs is peak HN spirit :)


Whoops, should be back up now. I'll have to check logs later to see why it went down.


You're going to need a bigger host to support HN traffic :)


What is it about HN that overwhelms small servers like this? It was a small static page so I wouldn't think it'd be that much load on the server itself, even for an OrangePi like this one.

Too many simultaneous connections for his router maybe? Or too much bandwidth for his internet connection?


If they are behind a NAT/ stateful firewall there is just so much connections it will handle at once. I think OpenWRT has like 16K max by default, f.ex. So for less than 16K requests by different users/IPs… each is kept for about 1 minute I think… it quickly will go down, I guess. :)

cat /proc/sys/net/netfilter/nf_conntrack_max

Should give some details.


Do you know if using the DMZ feature on most routers instead of port forwarding would get around this limit, or if there's any other way?


With OpenWRT we can increase the limit, if needed. But it's a delicate process you need to balance out carefully depending on your router. I doubled my slots and it works fine:

It's done via /etc/sysctl.conf

> net.netfilter.nf_conntrack_max=32768

Afterwards "sysctl -p" to apply/ reload the config file. But increasing blindly is a bad idea… it needs to be done with ip_conntrack_buckets in sync for proper balance (memory use, CPU usage). Best to read upon it.

But just going from 16K to 32K shouldn't be any problem for most routers these days.


I wish submitters would try using .onion sites for small static pages, for example as an alternative URL

Fewer source IPs


(continued)

Other tips: I still had issues going too granular with GOAP actions at the start, so I recommend keeping your actions as coarse as possible. It's still a tool that you use with your AI designer hat on, it doesn't do everything on its own. But the power of being able to throw in a new goal, maybe one new action, and have the existing actions solve all the other prerequisites, is amazing. Defining world properties and states is a muuuuuuch lower mental load than using utilities for actions.

I wrote it all with performance in mind, and it seems to run fine. Basically lots of caching (each world property is only evaluated once per AI per tick then re-used, shared values are cached for all then re-used, etc); eliminating invalid paths early; and searching backwards from the goal instead of forwards from the current world state. I test with 4 AI players on an old i3 laptop processor from ~2016 without issue.


hmailserver is the replacement you want for this.


This is the way I ended up going and it worked great.


It is no longer under development.


That happens when you finish your roadmap and call it done. It’s frustrating that the modern sense of it became automatically negative.

This is an actual claim if someone is interested: https://www.hmailserver.com/state

On SHA-1: https://en.wikipedia.org/wiki/SHA-1

As of 2020, chosen-prefix attacks against SHA-1 are practical.[6][8] As such, it is recommended to remove SHA-1 from products as soon as possible and instead use SHA-2 or SHA-3. Replacing SHA-1 is urgent where it is used for digital signatures.

Digging further: https://www.hmailserver.com/forum/viewtopic.php?t=40568

Tl;dr: it uses sha256 by default and only has sha1 for backwards compatibility, which is considered insecure today. Critical updates are still there.


hmailserver needs openssl version bumps from time to time.


Hey thanks, this was a good catch. `--shutter 12000` fixes the screen, and is bright but not too bright.


Update 2: The servo's gears are absolutely grinding at the moment


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: