I have a non-forking, select-based and mostly-1.0-complient HTTP server that uses almost no memory, is only about a hundred lines of code, and works with all the web-browsers I've thrown at it nicely. It cheats horribly since it's specifically meant to be used to hijack arbitrary HTTP servers by using DNS to point back at your local machine, so it utterly ignores all incoming bytes until it gets the 'blank line' sequence indicating the client isn't sending any more headers. Then it sends back a fixed 83-byte buffer, closes the socket, and goes back to listening for more connections.
Now, to make it handle DNS requests as well, and in effect filter them... that will be harder, but it's about time I learned stuff like file-modification monitoring and the like. Long-term? I'd love to port this stuff to Windows as a Service, but that would require all KINDS of junk I'd rather not consider just yet.
If anyone wants to see the code so far, ( it's behind this cut. )
Now, to make it handle DNS requests as well, and in effect filter them... that will be harder, but it's about time I learned stuff like file-modification monitoring and the like. Long-term? I'd love to port this stuff to Windows as a Service, but that would require all KINDS of junk I'd rather not consider just yet.
If anyone wants to see the code so far, ( it's behind this cut. )