1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-12 16:48:06 -05:00
Simon Tatham d489c64f48 Uppity: allow running multiple independent servers.
I've moved all the results of the command-line config options into a
small struct instead of having them be local variables of main(). We
maintain an array of those structs; most command-line options modify
the last element in the array; and we respond to the new special
option '--and' by appending a fresh struct to the end of the array and
initialising it to default values.

So now, if I want two or three SSH servers running on different ports
with separately configured host keys, banners, etc, I can do that with
a single command line along the lines of:

  ./uppity --listen 2222 --hostkey this.ppk --bannertext "this" \
     --and --listen 2223 --hostkey that.ppk --bannertext "that"

There's a single number space of connections used in log messages, and
each new connection reports which of the servers it connects to.

This is only a marginally useful feature: there's not much it does
that couldn't have been done just as well by running multiple Uppitys
each in their own process. But when I do want several servers at once
(which I've been using recently to test the jump-host system), it's
quite nice to have them all producing a single combined stream of log
data and all conveniently killable with a single ^C.
2021-09-17 16:15:54 +01:00
..
2021-04-26 18:00:01 +01:00
2019-03-31 10:35:10 +01:00