AmendHub

jcs

/

subtext

/

amendments

Amendments on June 13, 2022

tcp: Move TCPResolveName to dnr, put SOCKS code behind an ifdef

jcs made amendment 141 about 1 year ago

session: Remove session_output_string, enforce login timeout

jcs made amendment 142 about 1 year ago

Amendments on June 15, 2022

session: Do session close log from each node type

jcs made amendment 143 about 1 year ago

telnet: Use TCPNoCopyRcv instead of TCPRcv

Avoid copying input data to an intermediate node buffer, just to then
process it and copy it to the session buffer.
Doesn't seem to make things any faster, but might as well do it
jcs made amendment 144 about 1 year ago

Amendments on June 16, 2022

main: SelectWindow before dragging it

jcs made amendment 148 about 1 year ago

logger: Include seconds in timestamps

jcs made amendment 149 about 1 year ago

telnet: Make listening more resilient, add IP banning

MacTCP doesn't make it easy to detect when a listening socket has a
valid connection, or when it doesn't. Sometimes the connection is
accepted but then closed, sometimes TCPStatus returns a
connectionDoesntExist error, sometimes an open connection lingers in
TCP Wait. All of these were contributing to us no longer opening a
listening socket after some period of time accepting and closing
connections.
When bots try to login with a banned username, add their IP to a
ring buffer of IPs that we won't service. Unfortunately there is no
way to actually block these connections before they are accepted, so
we have to accept them, check the IP, and then close them right away.
jcs made amendment 150 about 1 year ago

Amendments on June 17, 2022

serial: Fix sscanf parameter

jcs made amendment 151 about 1 year ago

telnet: Fast-track single-byte writes, spin a bit after sending

If our send succeeds and returns quickly, we can avoid having to
return and wait for uthread to cycle back to us. Since sends can take
a very long time, we can't simply switch to synchronous TCPSend calls
or we'll hang forever on a dead connection.
We can also avoid zeroing the full tcp_wds structure each time, since
it is zeroed at the node allocation and we only need to zero wds[1]
ptr and length.
jcs made amendment 152 about 1 year ago

db: Set default max_login_seconds to 90

This timer doesn't reset on input, so this has to cover the entire
login process.
jcs made amendment 153 about 1 year ago

session: Don't run all session_printf formats through expand_template

session_expand_template is only needed for actual template views and
is pretty expensive. We only really need support for bolding and
resetting in session_printf.
This had the side effect of converting all bare \r's in session_printf
to \r\n, which screwed up ANSI output that was trying to just jump
back to the beginning of the line, like chat output.
jcs made amendment 155 about 1 year ago

Amendments on June 21, 2022

telnet: Don't abort TCP connection while there is an active session

telnet_idle is called outside of a uthread so just set session ending
and let it tear itself down once that thread is scheduled again
jcs made amendment 156 about 1 year ago

settings: struct_editor: Allow lowercase option letter, too

jcs made amendment 158 about 1 year ago

blanker: Add a simple screen blanker

This will trigger after the configured number of idle seconds, when
there are no active sessions. A mouse click or key press will unblank
right away, otherwise it will unblank automatically after the
configured number of runtime seconds.
This is a more CPU-friendly alternative to a normal screen saver, and
it will only run for a short amount of time to do its job of blanking
the screen to prevent burn-in.
jcs made amendment 159 about 1 year ago

Amendments on June 22, 2022