* Add mixed-port inbound and allow unauthenticated LAN access * Remove Invoke API and configuration version fields * Unify CLI and native lifecycle through Invoke Share Invoke dispatch across CLI, C ABI and JNI, make startup configuration-owned, and select Windows TUN backends at build time. Add fixed-name CLI tag releases and document scoped validation. * Rename project and public interfaces to Vole Rename crates, CLI and native libraries, C ABI and JNI symbols, environment variables, Windows identities and release assets consistently. Update repository references while preserving third-party code, fixed protocol vectors and historical validation evidence. * Unify CLI and FFI builds and tag releases * Simplify release packaging and fix Windows script tests Windows CI fixtures assumed LF bytes and a POSIX host, while a global subprocess mock also intercepted Windows platform detection. Preserve actual notice bytes, set the Android fixture platform explicitly, and mock native build boundaries for packaging tests. Remove internal build manifests, source snapshots, artifact hashes, delivery mode, and repeated archive inspection. Reuse platform builders, upload only the fixed archives, and assemble the complete CLI/FFI set once. Validated 56 script tests, 58 simulated Windows-condition regressions, Ruff checks, and a native macOS ARM64 CLI release build with offline flag and configuration checks. * Streamline build scripts, tests, and documentation Consolidate CLI/FFI packaging and license collection, reuse native Cargo build setup, and shorten CI job names. Remove duplicate audits, binary parsers, redundant script tests, and development-history documentation. Validation: 9 Python tests and Ruff passed; native macOS ARM64 CLI and FFI builds passed, including offline CLI checks and an Invoke version call. Resolved production feature graphs are unchanged. * Separate UWP headers from the shared FFI API Move VoleWindowsVpnInvoke into a UWP-only header and ship it only with the UWP backend. Include matching Windows build headers, keep Apple frameworks limited to shared headers, and update the UWP example. Clarify that dns-hijack ignores arbitrary scheme prefixes to match Mihomo without adding validation. Validation: 9 script tests, Ruff, and C/C++ header compilation for Windows x64 and ARM64 passed. Windows native builds were not run. * Fix Windows release metadata decoding and timeouts Decode Cargo and rustc output explicitly as UTF-8 instead of the Windows CP1252 default. Remove the fixed 60-second subprocess timeout that interrupted cold BoringSSL dependency downloads; release jobs already have a 90-minute limit. Add a regression using a real subprocess under a simulated CP1252 locale. Validation: 10 script tests and Ruff passed, all six Windows feature/target metadata combinations parsed, and CLI/Wintun/UWP notice collection passed. A 61-second subprocess failed before the fix and completed afterward. Windows native builds have not been rerun. * Validate UWP TUN settings and preserve absolute CLI paths * Parallelize Apple FFI builds and remove embedded licenses
编译与发布
在 Vole 根目录执行。需要 Rust、uv、C/C++、CMake、Perl 和 libclang,以及对应平台工具链。
uv run --project scripts --locked vole-scripts build cli
uv run --project scripts --locked vole-scripts build cli --profile debug
uv run --project scripts --locked vole-scripts build cli --target aarch64-apple-darwin
uv run --project scripts --locked vole-scripts build apple
uv run --project scripts --locked vole-scripts build android
uv run --project scripts --locked vole-scripts build linux
uv run --project scripts --locked vole-scripts build windows --backend wintun
uv run --project scripts --locked vole-scripts build windows --backend uwp
CLI 默认构建当前宿主的 Release,Windows 固定 Wintun;Windows FFI 默认 UWP。 脚本输出产物路径,编译失败直接返回失败。
| 目标 | 工具链与输出 |
|---|---|
| CLI | Linux/macOS/Windows amd64、arm64;target/<triple>/<profile>/vole[.exe] |
| Apple FFI | macOS/Xcode;dist/apple/LibVole.xcframework,iOS/tvOS ARM64 真机及模拟器、macOS universal 共五切片 |
| Android FFI | macOS/Linux + NDK 30;dist/android/<abi>,ARM64、x86_64 的 libvole.so 与匹配的 libc++_shared.so |
| Linux FFI | 原生 GNU 工具链;dist/linux/<architecture> 的静态库、动态库和头文件 |
| Windows FFI | 原生 Visual Studio C++;dist/windows/<architecture>/<backend> 的 DLL/import library 和头文件;UWP 另含两个 host 程序 |
Apple 最低版本为 iOS 13、macOS 10.15、tvOS 17;ARM64 iOS 模拟器/macOS 分别至少
14/11。原生消费者需链接 libc++,module map 已声明。Windows ARM64 还需要 LLVM 与 Ninja。
Android 优先使用 ANDROID_NDK_HOME,否则在 ANDROID_HOME/ndk 中选择 NDK 30 的最新已安装正式版。
VOLE_ANDROID_NDK_VERSION 可指定版本,VOLE_ANDROID_API 默认 24。
CARGO_TARGET_DIR 按 Cargo 约定覆盖中间产物目录;其余本地覆盖见 builds.py。
发布
Release workflow 在 vX.Y.Z tag push 时构建并发布,
tag 必须匹配 Cargo 版本。PR 使用同一构建矩阵,全部构建成功后汇总十四个归档。
CLI 构建后执行 -h/-v/-t 检查。
Apple FFI 的六个 Rust 目标分别在独立 job 并行编译并缓存;FFI Apple 等待全部目标
成功后合并 macOS 双架构、生成五切片 XCFramework 并打包。
CI 的依赖来源检查见 TLS 依赖。
| 归档 | 内容 |
|---|---|
vole-{linux,darwin}-{amd64,arm64}.gz |
单个 CLI 可执行文件 |
vole-windows-{amd64,arm64}.zip |
vole.exe,Wintun 后端 |
vole-ffi-apple.tar.gz |
XCFramework,含 headers/module maps |
vole-ffi-android.tar.gz |
两种 ABI 的核心库、C++ runtime 和 C 头文件 |
vole-ffi-linux-{amd64,arm64}.tar.gz |
libvole.so、libvole.a 和 C 头文件 |
vole-ffi-windows-{wintun,uwp}-{amd64,arm64}.zip |
vole.dll、vole.dll.lib 和 C 头文件;UWP 另含 Provider Host、Session Host |
公共 C 接口由 vole.h 提供;UWP 另附 vole_windows_uwp.h,声明 Windows 安装包桥接接口。
文件名不带版本号,不附带 checksums 或 wintun.dll。
发布脚本不收集许可证;CLI、FFI、XCFramework 与归档不额外内嵌或打包许可证内容。
Linux/macOS 的 CLI 使用 gzip 单文件归档,解压后需设置执行权限。下载匹配系统与架构的 归档后执行(以 Linux amd64 为例):
gzip -dc vole-linux-amd64.gz > vole
chmod +x vole
./vole -v
发布入口为 python -m vole_scripts.release,参数见 --help;
build-apple-target 构建单个 Apple 静态库,assemble-apple --inputs <目录> --output <目录>
从 <inputs>/<Rust target>/libvole.a 汇总六个目标并打包,不重复编译。
省略 --tag 可在本地验证打包。builds.py 负责平台编译,release.py 负责打包与汇总。