Subj : Re: Talisman Doors
To   : apam
From : Bugz
Date : Sat Feb 04 2023 09:34 pm

-=> On Sat Feb 4 19:00:00 2023, apam wrote to Bugz <=-

> on talisman when you connect via ssh it creates a raw loopback connection
> so the socket that is passed is that socket not the ssh one.

-=> apam wrote to Bugz <=-

ap> on talisman when you connect via ssh it creates a raw loopback
ap> connection so the socket that is passed is that socket not the ssh one.

Ah, ok.  Neat.  I'll have to dig into that and see how that ticks.  ;)

Last time I worked with C++ sockets, I was using ASIO.  Ugh!

FYI, in go, it has interfaces (think "duck typing" in python).  I wrap the channel in an object that satisfies the interface a socket has.  I also do some other crazy things (like overriding the close function), so calling code can call close, but it doesn't.

That's how I got the "magic" to work with using one port for both telnet and SSH!  There'd probably be a lot of patches to libssh to do similar in C++.  I do patch go's ssh code, but it's just a few lines, to adjust the socket's read timeout (if the SSH handshake was successful). Otherwise,
it fails (with a timeout), tries to close and returns failure.

Take care,
Bugz

==================================
bugz
SysOp Red-Green BBS
==================================

... If it isn't broke then you're not trying.
=== TitanMail/linux v1.2.3
--- SBBSecho 3.14-Linux
* Origin: Red-Green BBS - bbs.red-green.com (0:0/0)