NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: builtin httpd + pub dirs = snafu

On Wed 22 Jun 2011 at 03:09:52 -0400, Eric d'Halibut wrote:
> nb. What I am calling the "builtin httpd" is not Apache2; it is
> distributed with the NetBSD distribution. When you install NetBSD --
> Bam -- you've got httpd. In my /etc/rc.conf I _now_ have <ahem> er
> <cough>:

Speaking of built-in httpds, there is a feature I've been looking for
for a while but I haven't found yet.

Sometimes I visit places that have a very restrictive firewall and don't
allow access to ssh ports, only http and https ports and little more.
Still I would like to ssh home.

Often these places only have mswindows computers so specific ssh
configurations are often not possible. Searching, I have mostly found
connecting ssh through proxies, such as or

The simplest option is to run sshd on the http(s) port, but then you
lose http(s) service.

What I imagine is a little program that sits on the https or http port,
accepts connections, determines whether it is ssh or http, does some
plumbing[1] and gets out of the way.

Determining the protocol ought to be possible. HTTP servers expect an
immediate GET request. SSH servers first issue a prompt before a client
reply is due. So if the little program first waits for half a second or
so to see if a HTTP request comes in, and otherwise assumes SSH, this
should be good enough.

[1] as far as I know there is no way to plumb two file descriptors
together, a read and a write one, both open in the current program, such
that the current process gets taken out of the loop and data written to
the one are immediately available on the other. That would be very
useful for a utility like this[2].

[2] and while we're thinking up new plumbing operations, a pipe cutter
that interposes a process into the data stream of a single existing pipe
or other file descriptor would be useful too.

___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
\X/ rhialto/at/    -- can't be childish sometimes. -The 4th Doctor

Home | Main Index | Thread Index | Old Index