16 Commits
Author SHA1 Message Date
Qiu Yuzhou 3d9aac6bfb chore(gitignore): ignore .omx 2026-10-26 16:46:08 +08:00
Qiu Yuzhou 48aa04b0a2 chore: add .env file to .gitignore 2026-10-22 16:17:42 +08:00
Qiu Yuzhou 9cca9f9a0a build: add signed and notarized DMG packaging 2026-10-22 14:32:47 +08:00
Qiu Yuzhou dc64349702 feat(plugins): bundle Cloak v2 client 2026-10-12 12:38:32 +08:00
Qiu Yuzhou a335e00a38 chore(agents): 同步 docs/agents 配置到当前 skills 并去掉仓库硬编码
对照 ~/.agents/skills/setup-matt-pocock-skills 的当前模板逐字节核对三份配置:

- triage-labels.md 与模板完全一致,无漂移,未改动。
- domain.md 同步标点(— 改为 :)与措辞(Single-context repo (this repo)
  改为 (most repos)),现与模板一致。
- issue-tracker.md 同步标点漂移,并把硬编码的
  --repo qiuyuzhou/ShadowsocksX-NG 换成从 clone 推导
  (gh repo view --json nameWithOwner)后显式 pin。保留「绝不写入其他仓库」的
  安全规则与那次误发事故的教训,但去掉仓库名,使该配置在合并进上游后仍然成立。
  AGENTS.md 的一行摘要同步去掉仓库名。

.scratch/ 加入 .gitignore 与 .zcodeignore:这是 setup-matt-pocock-skills 为
local-markdown tracker 约定的目录,切到本地 tracker 时 spec 文件不落进 git。

docs/design/ 与 docs/research/ 的去留尚未决定,本次不引入任何排除机制。
2026-10-05 22:25:42 +08:00
Qiu Yuzhou 7ab774fcfd chore(legacy): 移除 Legacy/ 旧版源码,归档到 legacy-v1 分支
旧版实现已由 shadowsocks/ShadowsocksX-NG 的 legacy-v1 分支跟踪,本仓库不再
保留同一份代码副本。删除 Legacy/ 下 603 个跟踪文件,被 gitignore 的
.DS_Store 一并清理。

删除前核对:Legacy/ShadowsocksX-NG/PACUtils.swift 的 blob hash 与
upstream/legacy-v1 的同名文件完全相同,且工作区在 Legacy/ 下无未提交改动。

配套改动:

- 根 README、AGENTS.md、ShadowsocksX-NG2/README.md:目录结构只留
  ShadowsocksX-NG2/;旧版说明改为指向 shadowsocks/ShadowsocksX-NG 的
  legacy-v1 分支(含其 README);pre-commit 说明去掉 Legacy/。
- codegraph.json 删除 "exclude": ["Legacy/"];.gitignore 与 .zcodeignore
  删除 Legacy 构建产物与依赖条目;.swiftlint.yml 删除 ../Legacy 排除项;
  .githooks/pre-commit 头部注释去掉冻结目录表述。
- docs/research 的 4 份历史研究报告(issue 7/11/12/17)中 129 处
  ../../Legacy/... 相对链接改写为 legacy-v1 的 GitHub blob 链接,正文未改;
  把新 URL 反替换回原相对路径后与 HEAD 版本逐字节相同,证明只动了链接。

验证:全仓库不再有指向 Legacy/ 的路径引用;剩余 Legacy 字样均为概念性用法
(Legacy 导入功能、ADR 与术语表、历史报告正文中的冻结陈述)。本次未改任何
NG2 源码或构建配置,暂存区无 NG2 .swift 文件,pre-commit 直接放行。
2026-10-05 21:39:06 +08:00
Qiu Yuzhou 9b6d73e91c build(signing): 签名身份按 config 注入,Debug 免证书构建
证书与 Team 不入库(开源仓库):Debug 基线改为 ad-hoc,新 clone 与 CI 无
需任何证书即可 task build / task test;Release 基线保持 Developer ID,发
布产物仍须真签名。本机身份由 gitignore 的 Configs/Signing.local.xcconfig
注入,打包门槛的 Team 期望值同源,缺失时明确失败而非静默跳过。

project.yml 不能再设置 CODE_SIGN_IDENTITY / DEVELOPMENT_TEAM:pbxproj 构
建设置优先于 project xcconfig,写死会静默盖掉基线(实测)。整条注入链条
由 Tests/Architecture/SigningConfigurationTests.swift 守卫。

ad-hoc 产物不带 Hardened Runtime(Xcode 对 ad-hoc 签名不传 -o runtime),
嵌套 helper 重签与之一致;Hardened Runtime 仍由 DevID 路径与打包门槛断言。
2026-10-05 21:25:12 +08:00
Qiu Yuzhou fb428f12bc refactor(app): 按分层重组 App/ 源码目录
App/ 根目录原有 73 个散落源文件,已无法从目录读出任何分组信息。

按「目录即分层」重组为 Composition / Application / Presentation / UI /
PlatformEffects / Resources 六个目录,UI 层再按子视图分目录(Workspace、
Home、Servers(含 Plugin)、Subscriptions、Rules、Settings、Diagnostics、
StatusMenu)。纯移动:类型名、模块名与 import 均未改动,App/ 根层不再有
散落文件。

配套改动:

- project.yml:Core 测试镜像的 excludes 由裸文件名改为 `**/` 递归形式。
  XcodeGen 的 exclude 不跨 `/`,裸名只匹配 App 根层;MainApp.swift 下移后
  旧写法会静默失效,把 @main 组合根编进测试镜像。info.path 与
  entitlements.path 指向 App/Resources/;并排除 `**/*.md`——App/ 下任何
  非源码文件都会被 XcodeGen 收进 Resources 阶段并封进签名后的 bundle。
- SkeletonTests 的架构守卫由「默认扫描全部 App/ + 7 个豁免文件 + 1 个豁免
  前缀 + 4 个豁免目录」改为正面圈定 App/UI/,豁免登记全部删除;新增运行时
  适配器放进 Application/ 即自动落在扫描范围外,无需再登记。
- README 工程结构说明同步;根 .gitignore 的生成物路径随 Resources/ 归位。

验证:clean build 0 error;task test 1022 用例全通过(含两个架构守卫);
task format 无改动(证明纯移动);task lint 与移动前同为 21 条内容型
warning;packaging-gate.sh ALL CHECKS PASSED,确认 plist/entitlements 归位
后签名与 entitlements 语义不变。

注意:迁移时须先删旧的生成物再 xcodegen generate,否则遗留的 App/Info.plist
会被当作普通资源扫进 Resources 阶段。
2026-10-05 19:56:18 +08:00
Qiu Yuzhou 851660f1c6 test: split real-process smoke into opt-in target
Real sslocal smoke (11 tests, ~27s) sat on every task test as the
slow tail. Tests/Smoke now builds as a separate target behind the
ShadowsocksX-NG2Smoke scheme; task test:smoke runs it on demand and
the README release gate requires it green next to packaging-gate.

SignalRecorder also gains kill(_, 0) semantics (stale pids report
ESRCH): the GUI-restart test burned the 5s waitForWrapperExit
ceiling on pid 99999, now 0.18s. Default lane: 617 tests ~40s.
2026-09-27 01:11:48 +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 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 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 315700b55b fixes cross-compilation and CI 2023-01-11 07:06:34 +08:00
Kebin Liu a902e20330 Compile dependency binaries from source code 2023-01-11 07:06:34 +08:00
Qiu Yuzhou 4d645c56fd Update .gitingore file. 2018-05-04 12:12:43 +08:00
Charlie Qiu c072244ebd Add .gitignore 2016-06-14 10:21:54 +08:00