Commit Graph
636 Commits
Author SHA1 Message Date
Qiu Yuzhou a88e96c1e8 docs: subscription extension fallback semantics in CONTEXT.md (#35)
把「环」从刷新失败清单移出:私有扩展(含环在内的任何无效)按子票 #4
决议回退标准扁平列表、刷新本身按成功处理,与实现一致。
2026-09-21 06:22:52 +08:00
Qiu Yuzhou 0ecca53a20 feat(ng2): subscription fetch, snapshot semantics and UI (#35)
SIP-008 v1 + x_shadowsocksx_ng extension parsing with flat fallback;
HTTPS/Content-Type gated fetch seam; atomic snapshot commits carrying
only the local enabled overlay; URL edit keeps identity; recursive
delete clears source, fixed group, members and credentials; subscription
cards pane and menu-bar update-all wiring.
2026-09-21 06:15:52 +08:00
Qiu Yuzhou 72f9a45a74 feat(ng2): add system proxy modes and health gate (#29) 2026-09-20 23:31:33 +08:00
Qiu Yuzhou a6825aaafa feat(ng2): diagnostics log viewer and redacted export (#34)
主窗口诊断区(spec #21 D5/D11):

- RuntimeLog 增加事件接收缝,GUI 侧接入 RuntimeEventStore 内存环形缓冲
  (容量 500),wrapper 侧不变(stderr → agent.log 收敛)
- 主窗口侧栏新增「服务器/诊断」分区切换;诊断区日志查看器双源:GUI 事件
  实时呈现 + agent.log 尾部(1s 轮询),均可复制
- DiagnosticReportBuilder 显式触发的脱敏诊断导出:只含状态、存在性、权限、
  大小/时间、数量与脱敏元数据;不读 Keychain 与契约/目录内容;原始错误
  detail 不入导出,家目录前缀改写为「~」;服务器地址与备注不进入任何输出
- 投毒夹具测试验证导出不含任何敏感类目(密码/插件参数/地址/备注/token/JSON)

Closes #34
2026-09-20 22:41:28 +08:00
Qiu Yuzhou 8578de0ba4 feat(ng2): add PAC runtime and listen scope (#28) 2026-09-20 22:26:45 +08:00
Qiu Yuzhou 60a31b5df3 feat(ng2): main window server tree, ss:// codec and QR share/import (#32)
主窗口服务器分区(D11,issue #32):NavigationSplitView 分组树(订阅子树
只读、仅启用开关;行内 checkbox;右键激活/启停/重命名/新建分组/移动/删除,
非空手动组二次确认;拖拽移动,跨来源拒绝;空组保留可编辑)、服务器详情
表单(插件区只读展示「本版本未提供」状态)、分组详情。添加三入口(剪贴板
ss://、导入 URL、二维码图片识别:文件选择 + 拖图入窗)共用批量导入落点,
每次新建身份不去重;分享区二维码弹窗 + 复制 ss://。SsUri 按 SIP002 编解码
(含 legacy base64 兼容、SIP022 明文 userinfo、IPv6、插件 name;opts 逐字节
同构),二维码走 CoreImage 生成 + Vision 识别。目录提交后接 postCommit 钩
子,代理运行时立即重展开(#27 catalogDidCommit)。
2026-09-20 21:37:38 +08:00
Qiu Yuzhou 6bfd3c0d35 feat(ng2): proxy runtime LaunchAgent, wrapper and sslocal lifecycle (#27)
GUI → LaunchAgent → wrapper → sslocal full chain (spec #21 D2/D5):

- ShadowsocksX-NG2Agent: Swift BundleProgram tool target embedded at
  Contents/MacOS, supervised by launchd via SMAppService agent plist
  (Contents/Library/LaunchAgents, bundle-relative ProgramArguments,
  KeepAlive={SuccessfulExit:false}). Wrapper reads the cross-process
  contract v2/sslocal-active.json, spawns sslocal -c <absolute path>
  and supervises it: SIGTERM chain stop, SIGUSR1 forward for
  server-only changes vs graceful restart on listen fingerprint
  changes, non-zero exit on unexpected child loss for KeepAlive
  replay, invalid/missing contract → clean exit with plain unlink.
- Runtime file protocol: RuntimeFileStore reuses AtomicFileWriter
  (0700 dir self-heal, 0600 temp at creation, atomic replace);
  explicit-stop cleanup unlinks contract, agent pid file and stale
  temporaries. Shared read-side validation via
  SslocalRuntimeDocument.decodeValidated so GUI and wrapper cannot
  drift. Wrapper pid file bridges SMAppService's missing pid.
- GUI: ProxyRuntimeController consumes ActivationStateMachine effects
  through pure ProxyRuntimePlan decision table (ordered actions,
  idempotent skip of identical contract); proxy toggle and launch
  failure presentation (naming endpoint:port) in the status menu;
  launch resync reconciles agent registration, wrapper liveness and
  on-disk contract; catalog commits re-expand immediately.
- Log sanitization baseline: closed RuntimeLogEvent enum plus Redactor,
  wrapper/sslocal output converged to a 0600 agent.log with RUST_LOG
  defaulting to warn.

Tests (126 total, all green): stub-sslocal driven wrapper lifecycle
(start/stop order, SIGTERM chain, crash replay, cleanup, reload
protocol), real sslocal smoke (SOCKS port binding + full SOCKS5
handshake), plan decision table, controller flows with fakes,
runtime file permissions/atomic replace, endpoint probe, redaction.

Manual release-gate items (real launchd/SMAppService): agent
registration approval flow, GUI-quit persistence, bootout behaviors.

Closes #27
2026-09-20 20:26:54 +08:00
Qiu Yuzhou 9439e597e2 feat(ng2): activation semantics and runtime config derivation (#26)
激活状态机与派生层(spec #21 D3 激活族 + D5 派生):

- ActivationStateMachine:持久化活动目标(服务器或分组);激活原子成功
  或点名失败(保留原目标与运行状态);目录提交后立即重展开,失效即清除
  并发出停止意图(删除/禁用/变空/无效叶子各路径,无静默回退)
- 组激活按显式子序递归展开有效启用叶子;组目标保持组 UUID
- SslocalRuntimeDocument:完整 sslocal JSON 契约文档,凭据派生时解析,
  插件字段无插件时整体省略;ManagedPluginProviding 缝按「未提供」参与
  无效判定(真实受管集 #38 接通)
- ActivationStateFileStore:activation.json 持久化(0700/0600、原子替换,
  损坏按安全侧恢复为无活动目标);与 CatalogFileStore 共享 AtomicFileWriter
2026-09-20 18:50:58 +08:00
Qiu Yuzhou e8eb22c63d fix(ng2): bump build number above legacy 1.x
Shipped 1.x builds all carried CFBundleVersion 1: the old
Info.plist hardcoded it and the release flow only set the
marketing version. Same bundle id, so NG2 must exceed 1.
2026-09-20 18:05:10 +08:00
Qiu Yuzhou 0cf28c97fe feat(ng2): config catalog domain core with credential refs (#25)
配置目录领域核心(spec #21 D3/D5,票 #25):

- Domain/ 新增配置目录树:单父、显子序、无环;手动/订阅来源严格分离;
  有效启用 = 节点及其全部祖先启用;手动节点携带子树移动与重排;
  非空手动组递归删除(返回被删条目供 Keychain 清理);空组持久保留;
  非法操作(跨来源、身份复用即共享父、成环、订阅节点结构改动、
  订阅服务器直挂根)全部带明确原因拒绝且状态不动。
- 凭据引用:密码/插件参数只在 Keychain 存权威副本,配置树只持
  CredentialReference;KeychainCredentialStore 写读一致、覆盖写、幂等删。
- CatalogFileStore:v2/catalog.json 目录 0700/文件 0600,临时文件原子替换;
  缺失 → 空目录,损坏/版本未知/结构不一致(悬空、共享父、成环含根外孤环、
  不可达)→ 命名明确的 corrupt,结构校验收敛在
  ConfigurationCatalog.validated 工厂。
- 测试 43 项覆盖全部验收项;project.yml 增加 Domain/ 源码目录。
- .swiftlint.yml 关闭 trailing_comma(与 .swift-format 尾逗号基线冲突,
  触发案例见文件内注释),README/AGENTS.md 同步 Domain/ 与工具说明。
2026-09-20 15:22:09 +08:00
Qiu Yuzhou 1b8b1f0767 docs(ng2): move style tool setup from AGENTS.md to README
AGENTS.md keeps only the agent contract: hook enable step, gate
behavior, manual commands, rule-tuning policy. Install steps,
tool baselines, and config rationale are human-facing setup and
now live in README's 代码风格工具 section.

Update stale pointers that sent readers to AGENTS.md for tool
install (root AGENTS.md, pre-commit hook comment and error
message); hook behavior unchanged.
2026-09-20 14:36:35 +08:00
Qiu Yuzhou a20df3001f feat(ng2): external binary supply chain and packaging gate (#24)
Pin sslocal v1.25.0 (aarch64-apple-darwin) and v2ray-plugin v1.3.2 via
committed manifests (tag + asset URL + archive SHA-256 + bundle location +
sign identifier):

- Scripts/fetch-external-binaries.sh downloads the pinned archive, verifies
  its SHA-256 byte-for-byte, extracts only the named member (arm64-only
  check) and stamps the local cache; archive hash mismatch fails hard, and
  any manifest/local-artifact drift forces a re-verified refetch. It re-runs
  as a pre-build phase so tampering fails the build itself.
- project.yml installs both binaries via Copy Files into
  Contents/Helpers[/Plugins]; generate requires the artifacts to exist
  (fetch before generate, else Copy Files phases are silently dropped).
- Scripts/sign-embedded-helpers.sh re-signs each helper Developer ID with
  --options runtime --timestamp and the pinned identifier
  (<bundle-id>[.plugin.]<name>) before Xcode seals the outer app signature.
- Scripts/packaging-gate.sh asserts strict nested signature verification,
  DevID + Hardened Runtime on the app with no App Sandbox entitlement, and
  exact per-binary manifest coverage under Contents/Helpers.
- Tests pin both manifests' schema and anchor hashes.

Verified: build + gate all green; byte-flip, foreign-binary and
missing-binary tampers each caught; 5 unit tests pass; no submodules or
in-repo builds; notarization stays out of scope (#39).
2026-09-20 14:27:21 +08:00
Qiu Yuzhou 635d22378e feat(ng2): add swift format + SwiftLint pre-commit gate (#23)
- ShadowsocksX-NG2/.swift-format: Apple Swift 6.4 toolchain default rules snapshot
- ShadowsocksX-NG2/.swiftlint.yml: default rules, excludes build artifacts and Legacy/
- .githooks/pre-commit: format staged NG2 Swift files into the index, then SwiftLint;
  error-severity violations reject the commit; non-NG2 files pass through untouched
- ShadowsocksX-NG2/AGENTS.md: NG2-scoped conventions (tiered below root AGENTS.md)
- normalize skeleton sources to swift format baseline (2-space indent)
2026-09-20 13:45:48 +08:00
Qiu Yuzhou 3f052e403f feat(ng2): add 2.0 project skeleton and signing baseline (#22)
XcodeGen-managed SwiftUI menu bar app in ShadowsocksX-NG2/: LSUIElement,
inherited bundle id com.qiuyuzhou.ShadowsocksX-NG, macOS 15 arm64,
Hardened Runtime + Developer ID signing, empty entitlements dict (no App
Sandbox; Release disables base entitlement injection). Placeholder status
menu and main window; unit test target wired into the app scheme. Test
bundles sign with the Apple Development cert so Hardened Runtime library
validation accepts injection. Generated .xcodeproj and plists are
gitignored; project.yml is the source of truth. Legacy/ untouched.

Closes #22
2026-09-20 09:00:29 +08:00
Qiu Yuzhou 40bb5c9638 docs(domain): add managed plugin and plugin activation semantics
Wayfinder #19: plugin program references persist verbatim, only managed
plugins are selectable, unavailable plugins are invalid activation
candidates, and plugin options are sensitive in their entirety.
2026-09-20 07:42:50 +08:00
Qiu Yuzhou 252b1a631a docs(research): add Wayfinder Issue 7 — Legacy configuration migration and legacy feature boundaries audit 2026-09-20 07:25:24 +08:00
Qiu Yuzhou 1a4b96fe83 docs(research): wayfinder issue 18 — SIP003 plugin distribution and verification boundary 2026-09-20 07:19:05 +08:00
Qiu Yuzhou 5acd4f1256 docs(research): wayfinder issue 17 — legacy runtime safe handoff APIs 2026-09-20 07:14:52 +08:00
Qiu Yuzhou 6218944b29 docs(research): wayfinder issue 16 — app firewall × non-loopback listen
实测结论(macOS 27.0,HITL 确认):回环零交互;launchd 语境按二进制
归属,官方 sslocal(adhoc,linker-signed)主机地址态必弹裸名弹窗;
DevID 重签静默放行为首选缓解;应答按路径落库、升级不重弹;拒绝后
本机自连不可见,需 --getappblocked 检测与定向修复文案。原型在
research/firewall-nwlistener @ 94829fe。
2026-09-20 06:12:47 +08:00
Qiu Yuzhou 4f39b88366 docs(domain): define local endpoint port semantics 2026-09-20 05:35:44 +08:00
Qiu Yuzhou fef0daa7da docs(domain): define proxy runtime host semantics 2026-09-20 04:12:27 +08:00
Qiu Yuzhou 6b58925bbd docs: Add research for wayfinder issue 12 (PAC HTTP server) 2026-09-20 03:43:15 +08:00
Qiu Yuzhou 940fb603a6 docs(agents): require explicit --repo on gh (fork has upstream remote) 2026-09-20 03:42:53 +08:00
Qiu Yuzhou e3604e513c docs(domain): define listen scope 2026-09-20 03:36:16 +08:00
Qiu Yuzhou 43c56cdbe1 merge: PAC research into develop 2026-09-20 03:00:54 +08:00
Qiu Yuzhou d9adfdc31f docs: research PAC implementation options 2026-09-20 02:37:37 +08:00
Qiu Yuzhou a81192eb0f docs: define HTTP proxy boundary 2026-09-20 02:28:37 +08:00
Qiu Yuzhou de26dc1da9 docs(domain): define subscription refresh policy
Resolve subscription identity, snapshot merge, and stale-data recovery rules.

Refs #9
2026-09-20 02:08:49 +08:00
Qiu Yuzhou 9ab38063d4 docs: Add research documents for Wayfinder issues 4 and 6
- Introduced "wayfinder-issue-4.md" detailing SIP-008 nested grouping extension and subscription compatibility boundaries, including decision summaries, evidence sources, and compliance constraints.
- Added "wayfinder-issue-6.md" outlining the approach for XcodeGen, SwiftPM, and external binary packaging release, covering official release facts, XcodeGen project structure, signing procedures, and CI validation requirements.
2026-09-20 01:10:29 +08:00
Qiu Yuzhou 85a9244930 docs: add agent skills configuration (issue tracker, triage labels, domain docs) 2026-09-19 23:57:22 +08:00
Qiu Yuzhou ac3c60e9e5 chore: add .zcodeignore to exclude specific files from zcode ai agent 2026-09-19 23:37:01 +08:00
Qiu Yuzhou 720794de2d chore: add project-level xcodegen agent skill 2026-09-19 23:30:00 +08:00
Qiu Yuzhou 5ec308301a docs: add initial README for ShadowsocksX-NG project 2026-09-19 22:54:59 +08:00
Qiu Yuzhou 20870b5775 docs: add Legacy agent guidance 2026-09-19 22:53:38 +08:00
Qiu Yuzhou 20264eeda7 chore: add .zcodeignore to exclude OS X and Xcode temporary files 2026-09-19 22:32:18 +08:00
Qiu Yuzhou 3a62f473bc chore: restructure repo for modern reimplementation
- Remove GitHub Actions workflows and issue templates
- Move legacy ShadowsocksX-NG project into Legacy/
- Remove git submodules; dependencies will use prebuilt
  binaries copied from upstream releases instead of
  building in-repo
- Add ShadowsocksX-NG2/ directory for the new project
- Update .gitignore paths for the new layout
2026-09-19 22:31:37 +08:00
Kebin Liu 719203afc6 Merge pull request #1501 from hiddenSharp429/develop
Feat(QRCode): Enhance 'Scan QR Code From Screen' notifications # #1250
v1.10.3
2024-10-29 19:54:49 +08:00
hiddenSharp429 3fccede1a7 fix: update release.yml for build configuration 2024-10-29 19:37:30 +08:00
hiddenSharp429 c8643526b8 fix: update feature.yml for build configuration 2024-10-29 18:54:41 +08:00
hiddenSharp429 2fc108699c Feat(QRCode): Enhance 'Scan QR Code From Screen' notifications # #1250
Improve the clarity of notifications in the QR code scanning feature:

1. Permission handling:
   - Show notification when screen recording permission is missing
   - Automatically open system settings for permission grant

2. Enhanced scanning status notifications:
   When no QR code found:
   - Title: "Scanned X displays"
   - Subtitle: "No QR codes found"
   - Body: "Try adjusting the QR code position on your screen"

   When invalid QR codes found:
   - Title: "Found X QR code(s)"
   - Subtitle: "No valid Shadowsocks URLs"
   - Body: "QR codes found are not Shadowsocks configuration"

   When valid QR codes found:
   - Title: "Found X Shadowsocks URL(s)"
   - Subtitle: "Scanned X displays, found X QR codes"
   - Body: "Successfully added X server configuration(s)"
2024-10-28 12:09:16 +08:00
Kebin Liu 4c731d3dda Merge pull request #1461 from bdyebd/develop
Delay write of plist file to fix frequent notification issue on Ventura
v1.10.2
2023-03-28 21:55:49 +08:00
bdyebd 6c8c162e3c Delay write of plist file for ventura notification 2023-03-27 23:57:28 +08:00
Kebin Liu e42131e8e4 Merge pull request #1456 from shadowsocks/disable_code_signing_inject_base_entitlements_for_release
Disable CODE_SIGNING_INJECT_BASE_ENTITLEMENTS for release build, to resolve CVE-2023-27574
v1.10.1
2023-03-10 16:50:29 +08:00
Kebin Liu 1e5efb47ec Disable CODE_SIGNING_INJECT_BASE_ENTITLEMENTS for release build #1455 2023-03-03 21:37:28 +08:00
Kebin Liu b8eb26caaa Enhance workflows event v1.10.0 2023-01-11 07:06:34 +08:00
Kebin Liu 322e3de17e Add release workflows 2023-01-11 07:06:34 +08:00
Kebin Liu 2454d1fdd9 Set version number to commit 2023-01-11 07:06:34 +08:00
Kebin Liu 88f99a0853 Fixes privoxy linking 2023-01-11 07:06:34 +08:00
Kebin Liu ee13ef6412 Try to use macos-latest runner 2023-01-11 07:06:34 +08:00
Kebin Liu bf34184e5d Add --disable-documentation flag 2023-01-11 07:06:34 +08:00