Commit Graph
6 Commits
Author SHA1 Message Date
Qiu Yuzhou 76b19ba935 feat(ng2): remove HTTP proxy toggle, inbound always on
The toggle only gated a convenience endpoint: system proxy never used
the HTTP port, which serves the terminal export line and LAN proxy.
Stored httpProxyEnabled:false is silently ignored, no migration.
Proxy-endpoint settings rows lose their subtitles; glossary term is
now the permanent "HTTP proxy inbound".
2026-09-25 03:57:06 +08:00
Qiu Yuzhou ab6acf8912 refactor(ng2): remove UDP relay preference 2026-09-24 22:00:58 +08:00
Qiu Yuzhou c76ba93221 feat(ng2): finalize settings workflow persistence boundary 2026-09-24 00:20:42 +08:00
Qiu Yuzhou 9fc6446237 refactor(ng2): remove manual and external PAC 2026-09-23 18:47:15 +08:00
Qiu Yuzhou fe4c3e166e refactor(ng2): centralize typed failure presentation 2026-09-23 10:51:26 +08:00
Qiu Yuzhou 713c627deb refactor(ng2): deepen settings draft projection for new settings UI (#44)
加深 SettingsWorkflow,让平坦 UI 形状草稿成为编辑态唯一 source of truth,把
字段问题、端口占用事实、保存门禁、脏态、PAC 失效确认与重置确认收进 seam,
为重写设置 UI 提供稳定访问面。

- UI-facing interface 只含 UI 形状投影与 typed command:平坦 SettingsDraft
  (监听范围 = 布尔开关 + 公布地址文本,端口/超时为整数,不含持久化的当前
  模式)、按字段归位的 SettingsFieldIssue(端口问题用端口标识变体,每条载带
  点名文案)、按 SettingsPortID 索引的端口 field state(草稿值/类型化占用
  事实/字段问题/运行中端口例外/可否建议空闲端口)、保存门禁·脏态·提交中·
  失败点名文案投影、统一确认事实 SettingsConfirmation;离散动作走具名 typed
  command(save、reset、suggestFreePort(for:)、confirmPACNotice、
  cancelPACNotice、confirmReset、cancelReset、reloadFromCommitted)。
  module 不依赖 SwiftUI。
- 写入侧收窄为窄 seam SettingsCommitting(已提交快照、代理是否在跑、两个
  提交入口),ProxyRuntimeController 薄扩展即生产实现,测试注入 fake。
- 平坦草稿与 ProxySettings 互转集中在 SettingsDraftAdapter,校验错误归位与
  端口标识映射同属字段清单并收在同文件;Domain 快照类型只出现在后端缝与
  adapter。Domain 点名校验、端口互异/建议算法、PAC 失效判定与占用探测缝
  原样复用,行为不改写。
- 设置视图只绑投影与 typed command:删除 ListenScope 枚举拆装、探测层占用
  翻译、门禁推导与确认文案。重置确认摘要来自 seam 的范围裁定,并补齐重置
  事务的实际范围(全部偏好回出厂值、运行中代理停止);端口互异问题归位到
  冲突双方端口;隐藏的地址残留不再误报未保存修改。

用户可见变化:校验红字改为按字段归位显示;重置确认摘要由 seam 裁定。其余
行为与现状一致。

测试:新增 SettingsWorkflowInterfaceTests(30 项,fake 写入缝 + fake 探测)
覆盖校验归位、端口 field state、运行中端口例外、建议端口、保存门禁、脏态、
PAC/重置确认裁决、提交中与失败点名、占用探测代际;SettingsWorkflowTests
收敛为真实 ProxyRuntimeController 提交路径集成(5 项)。全量 427 项通过。
2026-09-22 22:28:39 +08:00