yuanyuanxiang and deepseek-v4-pro
96b9eea70a
Feat: One-way TLS transport for the MFC server
...
Add optional one-way TLS to the MFC server (server/2015Remote) so the device
port can serve both TLS clients and legacy plaintext clients on the same port,
mirroring the Go server.
Server: on a connection's first bytes, sniff for a TLS ClientHello (0x16 0x03
+ handshake type 0x01). When [tls] Enabled=1 and the identity loads, hand the
socket to a short-lived blocking handshake thread (Option A) running Schannel
AcceptSecurityContext, then decrypt on recv and encrypt on send; plaintext
connections replay the sniffed bytes straight into the existing parse path, so
the plaintext code path is otherwise unchanged. The identity is loaded once
from [tls] CertPath/KeyPath as PEM + CNG (PKCS#8) — the same key pair the Go
server uses — and a missing [tls] section, an empty value, or a load failure
leaves plaintext serving intact and fail-closes any TLS ClientHello.
Also fix two transport-reliability bugs that surfaced end-to-end:
- send path: encrypt only the freshly appended plaintext tail and post a
single IOWrite wake-up guarded by a bSendPending flag, so back-to-back small
sends (terminal resize -> COMMAND_NEXT -> resize) no longer run concurrent
WSASends over the same mutable buffer (client saw DecryptMessage failures,
with WSAGetLastError() = 6001 / ERROR_DECRYPTION_FAILED);
- client Recv: keep the handshake's unconsumed tail bytes in m_raw and drain
them before the next recv, and log the real SECURITY_STATUS on
DecryptMessage failure instead of the stale Winsock error.
Co-Authored-By: deepseek-v4-pro
2026-10-15 13:48:27 +02:00
..
2026-10-09 16:23:23 +02:00
2026-10-10 13:58:38 +02:00
2026-04-19 22:55:21 +02:00
2026-09-06 09:39:59 +02:00
2026-10-06 18:05:14 +02:00
2026-04-19 22:55:21 +02:00
2026-10-12 15:41:24 +02:00
2026-10-15 13:48:27 +02:00
2026-10-15 13:48:27 +02:00
2026-04-19 22:55:21 +02:00
2026-07-14 22:32:29 +02:00
2026-04-19 22:55:21 +02:00
2026-10-09 14:05:52 +02:00
2026-10-10 13:58:38 +02:00
2026-10-10 13:58:38 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-05-23 13:37:28 +02:00
2026-05-23 13:37:28 +02:00
2026-10-15 13:48:27 +02:00
2026-10-15 13:48:27 +02:00
2026-09-06 09:39:59 +02:00
2026-05-10 19:46:48 +02:00
2026-08-20 17:54:33 +02:00
2026-08-15 11:09:14 +02:00
2026-10-10 13:58:38 +02:00
2026-04-19 22:55:21 +02:00
2026-08-20 17:54:33 +02:00
2026-08-20 17:54:33 +02:00
2026-10-08 22:15:31 +02:00
2026-10-08 22:15:31 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-08 21:53:53 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-09-03 13:29:39 +02:00
2026-09-03 13:29:39 +02:00
2026-06-20 13:01:35 +02:00
2026-06-20 13:01:35 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-04 18:23:06 +02:00
2026-10-04 18:23:06 +02:00
2026-10-01 16:56:30 +02:00
2026-10-09 14:05:52 +02:00
2026-05-22 00:31:54 +02:00
2026-10-08 21:53:53 +02:00
2026-04-19 22:55:21 +02:00
2026-05-05 21:21:38 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-09-06 09:39:59 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-08-16 14:37:11 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-09 16:23:23 +02:00
2026-05-10 13:50:04 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-09-06 09:39:59 +02:00
2026-08-20 16:36:30 +02:00
2026-04-19 22:55:21 +02:00
2026-10-10 13:58:38 +02:00
2026-08-16 14:37:11 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-15 13:48:27 +02:00
2026-04-19 22:55:21 +02:00
2026-10-15 13:48:27 +02:00
2026-10-15 13:48:27 +02:00
2026-10-15 13:48:27 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-12 15:41:24 +02:00
2026-05-11 20:22:07 +02:00
2026-10-08 21:53:53 +02:00
2026-05-27 15:28:56 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-07-16 00:10:12 +02:00
2026-07-16 00:10:12 +02:00
2026-04-19 22:55:21 +02:00
2026-10-01 16:56:30 +02:00
2026-10-01 16:56:30 +02:00
2026-10-01 16:56:30 +02:00
2026-10-01 16:56:30 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-08-05 20:07:21 +02:00
2026-10-10 13:58:38 +02:00
2026-04-19 22:55:21 +02:00
2026-10-04 14:39:38 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-08 21:53:53 +02:00
2026-04-25 17:30:07 +02:00
2026-05-13 13:05:31 +02:00
2026-05-13 13:05:31 +02:00
2026-05-21 23:33:13 +02:00
2026-04-19 22:55:21 +02:00
2026-10-08 21:53:53 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-08 21:53:53 +02:00
2026-09-09 17:13:17 +02:00
2026-08-20 16:36:30 +02:00
2026-10-10 13:58:38 +02:00
2026-04-19 22:55:21 +02:00
2026-10-15 13:48:27 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-15 13:48:27 +02:00
2026-10-15 13:48:27 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-06-06 13:02:29 +02:00
2026-04-19 22:55:21 +02:00
2026-09-11 16:28:37 +02:00
2026-09-11 16:28:37 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-04 18:23:06 +02:00
2026-10-09 14:05:52 +02:00
2026-08-13 12:59:29 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-05-10 17:36:46 +02:00
2026-09-03 13:29:39 +02:00
2026-09-03 13:29:39 +02:00
2026-10-08 21:53:53 +02:00
2026-10-06 17:50:30 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-10-07 13:57:34 +02:00
2026-04-19 22:55:21 +02:00
2026-04-19 22:55:21 +02:00
2026-05-17 18:46:21 +02:00
2026-10-03 18:23:10 +02:00
2026-08-25 14:14:26 +02:00
2026-04-19 22:55:21 +02:00
2026-05-30 18:10:15 +02:00
2026-05-30 18:10:15 +02:00