- Add embedded KLALBWebServer with REST API, SSE streaming (200ms) and SPA hosting
- Introduce enableTUN configuration flag with fallback and non-admin execution support
- Refactor LineTable and ConnectLineTable to openConnections and autoConnections
- Rename denyLineTableQuery/Broadcast to denyConnectionQuery/Broadcast with backwards compatibility
- Support runtime config hot-reloading and automatic persistence to klalb-config.json
- Update default Web API port to 4665 and update dashboard submodule reference
- sendJsonResponse now serializes JsonElement via toString(), since gson-2.1's
JSON_ELEMENT factory misses JsonObject/JsonArray subclasses and falls back to
reflection (leaking the internal "members" field into every REST response)
- Document javac full-path requirement, pre-existing compile warnings,
frontend page data flow, and gson quirks in AGENTS.md
- routing-protocol JSON API: nodeinfotinyreq/resp returns device name
only and is never gated; nodeinfofullreq/resp returns external
endpoints + device name + description, where denyExternalEndpointQuery
hides only the endpoint list (name/description always answer);
legacy openlines* wire types removed - upgrade the whole mesh together
- rename misnamed openConnections -> externalEndpoints and
denyConnection{Query,Broadcast} -> denyExternalEndpoint{Query,Broadcast};
legacy config keys normalized on load because gson-2.1 lacks
@SerializedName(alternate=...)
- remove TCP-based KLALBRemoteManagement, superseded by the HTTP API
- dashboard settings follow the renamed keys; update AGENTS.md
- new "Web API settings" section after security settings in the Swing
options panel: checkbox bound to webUI plus a port text field bound
to webPort (empty -> default 4665; non-numeric or out of 0-65535
shows an invalid-port warning and aborts the save)
- load handler fills both controls from the current config item
- add i18n keys to klalb_zh_CN / klalb_en_US bundles
- include previously missing webUI/webPort fields in
KLALBControllerConfigItem equals/hashCode
- replace integer webPort with MultiProtocolSocketAddress webListen
(default: http://0.0.0.0:4665) in controller config
- rename Swing UI item to "Web API 监听地址" and validate as full URI
- update WebServer binding to honor configured host and port
- normalize legacy webPort integers to http://0.0.0.0:<port> on load
and keep JSON API backward compatibility
- update i18n keys in zh_CN and en_US resource bundles
- update root klalb-config.json and AGENTS.md documentation
SerinaNya
marked the pull request as ready for review 2026-08-26 19:56:04 +08:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
KLALBWebServer支持 REST API、200ms SSE 实时事件流与 SPA 静态托管enableTUN开关配置,解耦TUNName与禁用状态判定LineTable/ConnectLineTable为openConnections/autoConnectionsklalb-config.json4665,更新 dashboard 模块引用KLALBWebServer.java— fix gson-2.1members序列化 bugWIP: Web UI (dashboard)to WIP: impl Web UI (dashboard)- routing-protocol JSON API: nodeinfotinyreq/resp returns device name only and is never gated; nodeinfofullreq/resp returns external endpoints + device name + description, where denyExternalEndpointQuery hides only the endpoint list (name/description always answer); legacy openlines* wire types removed - upgrade the whole mesh together - rename misnamed openConnections -> externalEndpoints and denyConnection{Query,Broadcast} -> denyExternalEndpoint{Query,Broadcast}; legacy config keys normalized on load because gson-2.1 lacks @SerializedName(alternate=...) - remove TCP-based KLALBRemoteManagement, superseded by the HTTP API - dashboard settings follow the renamed keys; update AGENTS.mdAbout
e0296e0ccd1. 节点信息查询协议(srv6)
openlinesreq/resp报文类型,替换为两类查询接口:nodeinfotinyreq/resp:仅返回设备名称,开销最小,不受任何隐私开关限制(设备名本就随路由广播公开)。nodeinfofullreq/resp:返回外部端点列表 + 设备名称 + 设备描述,用于查看节点详情。KLALBRoutingProtocolAPIClient新增requestNodeInfoTiny/requestNodeInfoFull,统一回调KLALBNodeInformation值对象;响应处理对空数据做了空安全处理。denyExternalEndpointQuery=true时仅隐藏端点列表(data=null),设备名称与描述仍正常应答,不再整体静默。2. 配置键更名(纠正历史错误命名)
openConnections/LineTableexternalEndpointsdenyConnectionQuerydenyExternalEndpointQuerydenyConnectionBroadcastdenyExternalEndpointBroadcastautoConnections本次保持不变。@SerializedName(alternate=...),因此在KLALBConfigItem.getDefaultJsonDeserializer()中手动归一化旧键名,旧配置文件可无损加载;Web APIhandleConfig同样接受新旧键,新保存一律写标准键名。klalb-config.json示例已更新为新键名。3. 移除 TCP 远程管理协议
KLALBRemoteManagement(默认监听127.9.9.9:49573的 JSON-over-TCP 协议),其能力已全部由内置 Web 服务器 HTTP API 覆盖:/api/links/api/links/action/api/configKLALBProxySystem中相关启用/禁用方法及主程序中的注释残块。4. Dashboard(子模块)
externalEndpoints,回退旧键;保存时同时携带新标准键与全部历史别名,新旧后端均可工作。OK