Monday, October 11, 2010

New sshttp available

I switched the I/O engine inside sshttpd from blocking to
non-blocking sockets. Blocking I/O is by far easier,
but disappearing IPs could hang all other connections.
This should be fixed now.
Non-blocking socket state engines are really worth
a PhD thesis. :-)
Anything else is as before, just setup nf-setup
and run sshttpd.
Available for download here.

7 comments:

Anonymous said...

look at libev for your fd love requirements.
makes things easier

Anonymous said...

poll() is just fine. such small
loop doesnt need external lib.
But thx that someone is commenting
at all. :D

Anonymous said...

sometimes when i try to reach my server with a browser, i get that :

SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu3
Protocol mismatch.

Sebastian said...

The timeout for sshttp to decide
whether a browser is sending
HTTP requests (and therefor
forwarding it to HTTP_PORT)
is 200ms.Usually this should
work but on slow networks
it might be that the request
takes too long and your
browser is pointed to SSH_PORT
since it is expected to be
a ssh client.

Anonymous said...

Thank you for your response.

Indeed this happen when I abuse and my connection is surcharged.

Great software btw.

Anonymous said...

Tried getting this working but always got "Connection Reset" when attempting to access HTTP.

Any help?

(Flushed IP Tables rules, disabled CSF and there's no hardware firewall in place in the test environment)

Sebastian said...

Too few info for help.
Sounds like there is no httpd
running where sshttp could connect
to or the ports dont match.