Feature: Embed the server TLS certificate in delivered DLLs
Add a "高级 → DLL内嵌TLS证书" toggle (off by default, persisted as
[settings] EmbedTlsInDll). When it is on, ReadKernelDll patches the server's
current TLS anchor into the ServerDll and ShellCode payloads, so clients that
come online through the loaders start their own session over TLS without
waiting for an online push. The plaintext DLL loader in client/main.c is
untouched; only the DLL's fresh connection is protected. The write happens
after SetServer and before CalcMD5FromBytes, and the anchor records the host
part of the master address rather than "ip:port" because the client matches
the anchor against its configured address set. TinyRun has no anchor block and
keeps working as before.
Toggling the switch, and confirming the certificate dialog, rebuild the six
payloads in place, so no server restart is needed after a certificate change.
The payload pointers are replaced as a whole, and the network threads that read
them (SendServerDll and TOKEN_GETVERSION) now take a dedicated critical section
for the full duration of use.
COMMAND_UPDATE no longer clears the tls_disabled marker on the client. Now that
any delivered DLL may carry the anchor, "the payload has an anchor" no longer
means the operator opted this host into TLS, and clearing the marker would
silently flip a host that was explicitly set to plaintext onto TLS against a
plaintext path. Re-enabling TLS stays an explicit action through
COMMAND_TLS_ENABLE and COMMAND_SET_PROTO, which still clear the marker.
Menu and notice strings were added to en_US, zh_TW and de_DE, and the embedded
TLS design document records the new switch and the revised update semantics.
The new menu entry also takes a feature-limits slot so a subordinate master
can hide it like every other 高级 item (see 8807321):
HIDE_MENU_EMBED_TLS_ANCHOR in UIBranding.h, MF_EMBED_TLS_ANCHOR at bit 57
in FeatureFlags.h (the first free one after MF_FILE_SPEED), a row in the
主菜单 tab of CFeatureLimitsDlg, and the matching DeleteMenu on the 高级
menu. The entry still has no bitmap of its own, so it renders without an
icon next to its three siblings.
Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
8b92f32c47
commit
c66f410831
12 files changed
+210
-45
No files matched your search
@@ -2135,6 +2135,15 @@ JPEG
|
||||
强制断开=Force Disconnect
|
||||
远程交谈=Talk
|
||||
|
||||
; ============================================
|
||||
; Advanced -> DLL embeds TLS certificate (DLL内嵌TLS证书)
|
||||
; ============================================
|
||||
DLL内嵌TLS证书=DLL embeds TLS certificate
|
||||
服务端还没有可用的 TLS 证书,无法内嵌。\r\n请先在 TLS 证书配置里启用证书,再打开此开关。=The server has no usable TLS certificate yet, so it cannot be embedded.\r\nEnable a certificate in the TLS certificate settings first, then turn this switch on.
|
||||
已开启:此后经 MDLL/ShellCode 形式上线的客户端会自动启用 TLS。\r\n\r\n已上线的客户端不会自动变,需要重启(重新走一遍加载器)才会拿到带证书的 DLL。=Enabled: clients that come online via MDLL/ShellCode from now on will use TLS automatically.\r\n\r\nClients already online are unchanged; they must restart (run through the loader again) to receive the DLL with the certificate.
|
||||
已关闭:此后下发的 DLL 不再内嵌证书。\r\n\r\n已经内嵌了证书的客户端不受影响。=Disabled: DLLs delivered from now on no longer carry a certificate.\r\n\r\nClients that already have an embedded certificate are not affected.
|
||||
重新生成内核载荷失败(资源缺失),仍沿用原来的 DLL。=Failed to regenerate kernel payloads (missing resource); the previous DLL is still in use.
|
||||
|
||||
; ===== TLS =====
|
||||
TLS证书(&T)...=TLS Certificate(&T)...
|
||||
TLS证书=TLS Certificate
|
||||
|
||||
Reference in new issue
Block a user