simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sat Sep 18 10:21:18 BST 2021
TL;DR:
d489c64f Uppity: allow running multiple independent servers.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2021-09-18 10:21:18
commit d489c64f48d50a17e688edc9fee4973790f8aca7
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=d489c64f48d50a17e688edc9fee4973790f8aca7;hp=fb663d4761c221fed090ff98d891a9883e76cbb3
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Sep 17 16:10:29 2021 +0100
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.
unix/uppity.c | 263 ++++++++++++++++++++++++++++++++++------------------------
1 file changed, 155 insertions(+), 108 deletions(-)
More information about the tartarus-commits
mailing list