8 Commits
Author SHA1 Message Date
yiguodev f870ffe454 Expand Vole client protocols, routing, DNS and HTTP processing (#8)
Add provider generations, automatic proxy groups, richer routing rules and live Controller configuration.
Extend encrypted DNS, persistent fake-IP mappings and GeoData support.
Add HTTP CONNECT, WireGuard, TrustTunnel, Mieru and MASQUE outbounds; expand TLS/ECH and transport compatibility.
Add separately configured H1/H2 MITM and URL, header and body rewriting.
Improve UDP association reuse, TCP delivery and H2/H3 scheduling while keeping memory bounded.
Add Linux TUN route and system DNS management, MPTCP and TCP Brutal.
Replace vendored dependencies with upstream libraries, update and pin Boring 5.4.0, and fix cross-platform builds and CI feature checks.
2026-11-03 08:22:46 +08:00
yiguodev f616f19fee Support custom Windows VPN profiles and stable host COM lifetime (#7)
* Support custom VPN profiles and canonical platform namespaces

Add strict profileName selection to Windows VPN lifecycle requests while preserving package ownership and single-session guards.

Use the canonical Android JNI and Apple logging namespace, with updated contracts and regression coverage.

* Keep Windows host MTA alive across bridge calls

Retain one process-lifetime MTA usage reference for cached WinRT factories while balancing each caller-thread initialization. Preserve STA rejection and prevent guards from moving between threads.

Add isolated native DLL regressions for repeated calls, caller MTA release, worker handoff and STA rejection, and run them before UWP artifact upload.

* Use setup-python and native Windows toolchains in CI
2026-10-09 15:20:23 +08:00
yiguodev dcbd7dd277 Add the Vole CLI, config-driven TUN, and unified releases (#6)
* 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
2026-10-08 23:24:07 +08:00
yiguodev 7ba711d9b6 Adopt tun-rs and separate TCP receive/send buffer budgets (#5)
* refactor(tun): adopt tun-rs and split TCP buffer budgets

Preserve borrowed-fd ownership, framing, bounded batches and stop semantics. Add independent receive/send TCP buffer totals without increasing defaults. Refresh netstack reference links and platform documentation.

Validation: 117 memory regressions; netstack and production Clippy; all-target compilation; iOS and tvOS checks; formatting and diff checks. Linux offload remains disabled.

* Update repository references for YuanDevTeam organization
2026-10-07 20:47:11 +08:00
yiguodev 66889d9d98 Improve TUN and GeoData performance and extend Linux/tvOS support (#3)
* feat(platform): add tvOS runtime and Apple artifacts

* test(memory): add isolated process benchmark and peak monitoring

Add frozen-input Release ABI probes, kernel footprint peaks, fault calibration and resumable owned-container runs.

Fix UDP facility fan-in and scheduling bottlenecks with a bounded process-wide sender, allocation-free peer address checks, per-flow official Mihomo listeners and eight peer vCPUs. Preserve default buffers, full payload checks and single-flow acceptance as a separate gate.

Validation: 25 expected facility outcomes, 18 repeated zero-loss UDP calibrations, 198 script tests, Ruff and Go vet. No full-CN or mobile Provider memory acceptance.

* fix(geodata): support complete enhanced cn within bounded storage

The enhanced CN category exceeded the old 65,536-record work bound. Raise it to 131,072 without changing value or shared allocation budgets, and account for old/new vector buffers during growth.

Add exhaustive independent CN semantics, production-ABI route and memory evidence, and bounded-resource regressions. Verify forwarding by the origin peer identity rather than guest-wide TCP counters. Three fresh macOS processes pass with a worst lifetime footprint of 9,191,976 bytes; mobile and high-rate acceptance remain separate.

* test(memory): add cold-start geodata attribution

* perf(memory): complete SOCKS5 load drivers and index GeoSite matches

* perf(memory): add external dual-stack TUN workloads and reliable shutdown

* test(memory): add protocol profiles and same-process transport reuse workloads

* test(memory): add lifecycle cancellation and update endurance scenarios

* docs(memory): retain standard policy pending complete candidate acceptance

* test(memory): freeze candidates and orchestrate final acceptance matrix

* test: move container experiments to independent benchmark

* test(geodata): isolate HTTP benchmark fixtures from production delivery

* perf(tun): streamline packet processing and UDP flow routing

Add real Linux TUN support and shared bounded packet batching across platforms. Separate UDP ingress from TCP netstack maintenance while preserving cancellation and synchronous shutdown.

Optimize GeoData category lookup and compatibility, pin TUN UDP rule actions per five-tuple, and track authenticated QUIC connection changes with independent idle reclamation.

Align runtime resource policies, documentation, and regressions with the validated memory and throughput workload.

* perf(runtime): isolate socket setup and expand UDP burst capacity

Run synchronous physical socket setup on tracked blocking tasks with cancellation and shutdown barriers. Increase the shared ordinary TUN UDP response queue to 4096 while retaining independent DNS capacity and nonblocking saturation. Align resource contracts, documentation, and regression coverage.

* build: restore boring release dependencies for PR

* feat: cap mobile GeoData and separate external test tooling

Share a 1,280,000-record iOS/tvOS allowance across GeoIP and GeoSite, preferring GeoIP. Keep VCore scripts compilation-only, move external validation responsibilities to the benchmark, and refresh public contracts and CI/build tooling.

* fix: complete GeoData matching and bound socket initialization

* fix: align Android bindgen targets and lazily resolve SDK defaults

NDK 30 rejects unversioned bindgen targets even when CC/CXX and CMake already use an API level. Supply the same versioned compiler target through bindgen target-scoped arguments while preserving effective extra flags.

Avoid querying Path.home when ANDROID_HOME is configured, which fixes hermetic helper tests on Windows. Cover API and argument precedence, missing home, and fallback behavior with regressions.
2026-10-06 20:09:16 +08:00
yiguodev 7b8ea15e74 feat: add ShadowTLS v3, UoT v2, TUIC v5, and HTTPUpgrade (#2)
* test: prepare protocol-completion validation

* feat: support ShadowTLS v3 for Shadowsocks 2022

* feat: add UoT v2 to Shadowsocks 2022

* feat: support TUIC v5 TCP and UDP

* feat: add HTTPUpgrade to VMess and Trojan

Reuse the existing raw upgrade stream with typed normal/fast-open options and strict early-data configuration. Reject an expired setup before ready IO can write any prefix. Add isolated official-peer data, UDP, authentication, fingerprint, close and legacy-transport gates.

* test: validate extended proxy chains and lifecycle

* build: freeze release dependencies for protocol completion

* fix: enforce HTTPUpgrade deadline on resumed IO

Recheck the absolute setup deadline before each handshake poll and before accepting success, without retaining a timer on established streams. Cover ready late responses, blocked prefix writes, and post-setup IO in both normal and fast-open modes.
2026-09-29 11:26:43 +08:00
yiguodev 608a8f255c feat: add client protocols, TLS capabilities, and platform validation (#1)
* chore: download latest official mihomo for interop tests

* test: capture N0 baseline and protocol feasibility probes

* docs: record N0 hybrid REALITY fork verification

* test: verify N0 controlled Hysteria2 auth and streams

Add an isolated Quinn adapter over existing DIRECT and SOCKS5 datagrams, bounded queues, protect rejection probes, and official latest peer fixtures. Record passing auth/TCP checks and the native Hysteria half-close failure separately. N0 remains incomplete; production sources and dependency locks are unchanged.

* test: validate N0 native QUIC hopping and XHTTP H3

Keep the probes isolated from production. Verify one-state Hysteria hopping, protected rebind rejection, Xray H3 entry and existing HY2 regressions. Set only the owned Linux peer MTU to avoid Initial-packet EMSGSIZE; retain native half-close failures as separate gates.

* fix: align XHTTP shutdown with Mihomo connection close

* test: verify N0 supplied-stream transport interfaces

Add isolated TLS, ordinary WebSocket and gRPC probes with owned I/O, bounded buffers and cancellation barriers.

Match Mihomo close behavior: preserve TLS/WS reads, distinguish clean WS underlay EOF from truncation, and close both gRPC directions. Use separate official SOCKS5 peers to avoid fixture loop detection.

Record 12 Debug/Release tests, 42 official Mihomo checks, dependency audits and Apple/Android compile checks. Keep production dependencies, third-party sources and remaining N0 gates unchanged.

* fix: upgrade h2 and retain completed responses after reset

* chore: use the current OneXray rustls fork origin

* chore: adopt published rustls 0.23.45 and official TLS binding

* chore: refresh N1 foundation and spike dependencies

* feat: validate next-protocol field and combination catalogs

* feat: share immutable TLS policies and bounded close semantics

* feat: add shared stream transports and decouple XUDP framing

* feat: add controlled datagram foundations and N1 acceptance harness

* chore: finalize N1 with verified x25519 dependency

* chore: publish N1 against the rustls release branch

* feat: add bounded Trojan request and datagram codecs

* feat: connect Trojan TLS TCP and UDP through the runtime

* feat: support Trojan WebSocket and duplex gRPC transports

* feat: enable Trojan and complete N2 consumer acceptance

* feat(vmess): add bounded AEAD header and body codecs

* fix(vmess): align close acceptance with Mihomo transports

* feat(vmess): add UDP codecs and isolated peer comparisons

* feat(vmess): complete public runtime and N3 acceptance

* docs: bind N3 acceptance and refresh validation guidance

* feat(vless): complete N4 transports, Vision and UDP support

Extract VLESS assembly, add plain/TLS stream transports, HTTPUpgrade, node-owned gRPC pooling, mTLS and classic REALITY, and implement Vision through public TLS record boundaries. Preserve XHTTP and the XUDP default while adding raw and packetaddr.

Complete 145 required groups and 39 field rows against isolated latest official peers, with 160 lifecycle/resource rounds, independent coverage and Apple/Android release builds. Preserve the three explicit WS/REALITY layered close comparisons and historical failures in the acceptance report. No third-party or dependency-lock changes.

* feat(vless): complete N5 XHTTP and sing-mux support

Add H1/H2/H3 request fields, independent download security and pools, bounded packet-up batching, and h2mux/smux/yamux over controlled transports.

Keep Mihomo-aligned close and path semantics, node-owned shutdown barriers, and isolated official-peer fixtures including the approved Caddy mTLS gateway.

Validate 416 required groups, 57 fields, 112 two-leg security checks, 240 lifecycle/resource cycles, independent coverage, and Apple/Android release builds. Record native-peer gaps and leave N6-N10, devices, CI, and release gates separate.

* feat: integrate boring TLS profiles and retire rustls fork

* test(tls): freeze selected fingerprint reference baseline

* docs(tls): record selected-profile library acceptance

* feat(tls): integrate selected client fingerprints and REALITY profiles

* feat(tls): complete selected fingerprint CF5 acceptance

* feat(hysteria2): complete N6 client support and acceptance

Implement Hysteria2 over official Quinn/h3/rustls and shared controlled IO, including TCP/UDP, bandwidth pacing, Salamander, port hopping, upstream snapshots and synchronous Stop.

Keep old-path receives active for the full bounded handover window, preserve independent reader wakeups, and require the exact nested TCP evidence assertions.

Validate one frozen N6 run: 36 required groups, 20 field rows, native Mihomo/Hysteria peers, H3 regression, 40 lifecycle rounds and Apple/Android production builds. Record independent coverage, artifact hashes and native-peer limitations.

* test(tls): record N7 hybrid REALITY prerequisite evidence

Preserve the locked classic-only API failure and distinguish the locally accepted boring hybrid extension from pending VCore S03/D16 integration. Record wrapper feasibility and publication boundaries without changing production configuration or dependencies.

* feat(vless): support explicitly required hybrid REALITY

* feat(crypto): wrap official BLAKE3 binary-context derivation

* feat(vless): implement authenticated Encryption wire transport

* feat(vless): enable authenticated Encryption across public transports

* build(tls): pin the authenticated ShadowTLS ClientHello hook

* feat(vless): add authenticated JLS transport security

Pin the separately approved boring JLS revision and expose strict main/download credentials under schema 24. Preserve native CertificateVerify and Finished, cancellation, and controlled IO ownership. Accept the JLS field slice with 122 isolated cases, 80 lifecycle/resource cycles, and Apple/Android release libraries; keep broader N7 gates separate.

* docs(n7): reconcile current JLS acceptance progress

* chore(vless): retire Restls while retaining JLS

* feat(vless): complete N7 static ECH and security combinations

Add static ECH for VLESS main and XHTTP download legs using existing TLS backends and official Rust HPKE. Keep Invoke v5 and advance the internal schema to revision 27.

Accept the narrowed N7 scope with 43 required groups, 11 fields, 301 isolated native cases, 240 lifecycle/resource rounds, and Apple/Android release builds. Record frozen inputs, 470 container cleanups, explicit upstream comparison gaps, and prior failed runs in docs/acceptance/next-protocols/N7.md.

* chore(protocols): retire WireGuard scope and foundations

* test: complete N9 protocol integration and resource gates

* build: add N10 production artifact evidence gates

* fix: restore Windows snapshot encoding and fail-closed delivery CI

* fix: use native ARM64 LLVM assembly and scoped delivery CI

* build: keep delivery lockfile bytes stable across platforms

* fix: preserve production guard lifecycle and isolate CI feature checks

* build: adopt released boring and registry shadowsocks

* ci: use release-oriented workflow names

* docs: consolidate contracts and streamline test tooling

Merge current protocol and platform contracts, remove milestone reports and obsolete spikes, and share core checks between local development and CI. Preserve all 884 executable case definitions and unique legacy assertions.

Validation: core Debug/Release, feature checks, Clippy, netstack, offline script tests, formatting and documentation links passed locally. Container interop smoke attempts failed during official peer downloads; business paths remain NOT RUN.

* test: replace milestone names with capability-based validation

Rename protocol and fingerprint suites, fixtures, and evidence identifiers by capability. Preserve acceptance cases and golden wire data while documenting reference, wire, and interoperability evidence separately.

* fix: address review findings and stabilize core CI

Flush accepted gRPC/H2 data through the supplied IO before reset, and wait for pending smux writes before FIN. Sanitize AnyTLS peer failures, reject XHTTP userinfo, and remove stale Android delivery artifacts.

Close container log capture even when inventory fails. Keep legacy host suites blocked before resource acquisition.

Separate Shadowsocks adapter codec checks from upstream strict server acceptance. Lock the random empty-request zero-padding failure with deterministic negative and positive fixtures, without changing the dependency or production behavior.

* test: isolate delivery fixture from Windows home lookup

* test: preserve UDP socket semantics during peer teardown

The memory peer treated its counterpart closing an mpsc channel as a local UDP BrokenPipe. That could terminate Quinn endpoint IO without waking a pending wait_idle, despite all four datagrams and CONNECTION_CLOSE having arrived.

Keep a closed peer link silent and late sends best-effort, add a deterministic fixture regression, and preserve the existing data and shutdown deadlines. Debug/Release, Clippy, and 300 consecutive regression iterations pass.

* fix: drain XHTTP uploads before releasing connection drivers

* fix: enforce lazy setup deadlines and safe delivery paths

Check the original deadline before accepting ready gRPC/H2 headers or sing-mux status, without limiting established reads. Reject symlinks and Windows reparse points in every delivery output path before filesystem mutations. Add deterministic memory and temporary-filesystem regressions.

* test: join XHTTP H3 peer tasks during cleanup

Quinn retains closed connections for three probe timeouts, so a delayed handshake can legitimately exceed the fixture's two-second wait_idle budget. Own, abort, and join the passive peer tasks after upload and client shutdown instead. Preserve upload integrity and client close bounds, and cover delayed handshakes in both streaming modes.
2026-09-28 12:50:01 +08:00
yiguo 3872789f85 init 2026-09-22 11:15:24 +08:00