Support WebSocket early data for compatibility with sing-box, Xray, and Mihomo. Add opt-in client sending through path or header carriers, automatic server reception of up to 2048 bytes from Sec-WebSocket-Protocol, strict handshake validation, and fixes for buffered data and stream metadata, with configuration documentation and interoperability coverage.
Adds native Hysteria2 and TUIC v5 outbound clients so proxy routes can use either protocol directly for TCP and UDP. Includes pooled QUIC connections with bounded resource use, cancellation-safe TUIC commands, Hysteria2 Salamander obfuscation and port hopping, hardened HTTP/3 authentication, TLS verification, configuration examples, and interoperability coverage in CI.
Adds an outermost sudoku_mask wrapper so TCP clients and servers can interoperate with Xray FinalMask, including configurable layouts and padding, stacked masks, and XHTTP carriers. Preserves explicit flush ownership and prevents Vision or raw TCP splice from bypassing the mask, with configuration validation and documentation for supported placements and limits. Native UDP/QUIC masking is not included.
Add managed Linux TUN and REDIRECT capture with independent DNS interception, protected bootstrap and outbound sockets, best-effort systemd-resolved integration, and retained-ingress reload and recovery. Include configuration documentation, service integration, and kernel coverage.
Add Linux ARMv7 hard-float GNU and static musl binaries so 32-bit ARMv7 systems can use prebuilt Shoes releases. Retain the six existing targets, pin build tooling and cross images, and validate each packaged binary with native or QEMU checks before uploading it. Harden future releases with version and tag validation, SHA-256 checksums, and GitHub build-provenance attestations, and document platform requirements and artifact verification.
Refresh eligible Rust dependencies and build tooling, including notify 8.2.1, Web PKI roots 1.0.11 and the ctutils constant-time fix. Handle macOS watcher restart failures, update Unicode-domain data, and require Rust 1.99.1 while preserving maintained fork pins and protocol baselines. Retain parking_lot 0.12 and the upstream nix pin for Android/iOS compatibility.
Support server-key:user-key and longer identity chains for Shadowsocks 2022 AES clients, allowing connections to multi-user servers and identity relays. Add the required identity headers, configuration validation, and usage documentation while preserving existing single-key and legacy configurations. This is client-only support; native SS2022 UDP and server-side multi-user support remain out of scope.
Add advisory selector/reload performance reports, optional Linux unit/process coverage with changed-line summaries, and bounded rule-parser property tests to make regressions and verification gaps easier to spot. Reports reject invalid measurements and account for timing noise without introducing hard performance gates; existing tests and production behavior remain unchanged.
Catch resource retention across failed setup, cancellation, reloads, and owner destruction with allocation, task, descriptor, and permit regressions, alongside deterministic matcher invariants. Strengthen reload measurements with committed-upstream verification, exact-byte live-session checks, bounded cleanup, and byte-exact provenance, and add the coverage to CI.
Add a non-root Docker image for the Shoes binary and publish native amd64 and arm64 images to GHCR on master pushes and published releases. Reuse commit images by digest, gate branch and release tags on container smoke checks, and guard against stale promotions. Include the full license bundle and document configuration, writable state, and image tags.
Broadens unit and integration coverage of WebSocket framing, ShadowTLS and REALITY ClientHello parsing, VLESS fallback, Hysteria2 and TUIC authentication, DNS, and connection budgets across reloads, and fixes the defects it exposed: WebSocket streams now accept control frames up to RFC 6455's 125-byte limit, no longer report EOF into partly filled read buffers, and flush buffered frames before shutting down; the shared ClientHello parser reassembles hellos split across TLS records, as Go TLS stacks do; and message-stream shutdown after EOF is bounded like the stream relay's. It also builds the binary on the library crate instead of compiling every module twice, removes the unused UdpMessageStream, moves ShadowTLS interop tests to local handshake servers, makes filtered CI test steps fail when they select no tests, consolidates the WebSocket payload-reading code, and documents how to measure coverage along with the remaining gaps, including why WebSocket Close frames stay unanswered.
* build: remove distributable mobile SDK wrappers
Remove the Android Kotlin/Gradle wrapper, AAR and XCFramework packaging, and mobile SDK release publishing.
Preserve Rust JNI/C embedding and native cross-compilation CI, with checks for library outputs and the generated C header. Document app-owned integration and retain desktop release-notice verification.
* ci: verify mobile header after locked native builds
cbindgen resolves Cargo metadata without --locked and can update Cargo.lock. Run it after the native builds so it cannot hide a stale lockfile from their checks.
* docs: remove obsolete mobile wrapper examples
Remove examples referencing nonexistent JNI wrapper methods and clarify the app-owned callback contract. Keep native mobile support unchanged.
* docs: clarify native mobile CI coverage
Preserve payload bytes across fragmented VLESS response headers, nonempty WebSocket Ping frames, and ShadowTLS authentication fallback. Expand authentication, buffering, half-close, flow-control, and TUN reload coverage; harden isolated test selection, enable macOS process-watcher tests, and document suite boundaries and remaining gaps.
Update Rust dependencies for current fixes, including ML-KEM's removal of secret-dependent table lookups, and refresh the BLAKE3 fork while retaining binary-context key derivation. Allow wildcard GotaTun updates with source-notice validation, replace unmaintained test-only PEM parsing, and update Android and CI tooling with current AGP source-set APIs. Preserve Web PKI protections and required fork patches; defer YAML parser migration.
Prevent TUN startup resets and orphaned connections by deferring inbound TCP publication until handshakes complete, bounding half-open admission, and propagating worker failures while preserving Linux link-down and Apple queue-backpressure recovery. Fix Naive HTTP/2 writes that stall despite available credit and improve transfer diagnostics. Preserve full-payload and clean-EOF Mihomo REALITY coverage with reply-first sequencing, retaining early half-close as an opt-in peer regression. Upgrade Xray test peers to the 26.10.21 security release after upstream withdrew the previous releases.
Compile routing rules into shared indexes while preserving ordered policy evaluation and DNS decisions. Add typed predicates and bounded local SRS, sing-box JSON, Mihomo YAML/text/MRS, and GeoSite/GeoIP DAT sources through named rule groups or inline masks, with format detection, source caching, pre-activation compilation, and source-aware reloads. Include configuration examples, regression coverage, benchmark tooling, and dependency notices.
Expand WireGuard coverage for TCP and UDP forwarding, peer isolation, transport outages, rekeying, reloads, DNS routing, native TUN, and FFI lifecycle behavior to catch failures that affect real deployments. Add macOS lifecycle coverage and portable fixtures, and fix IPv6 DNS upstream literals being misclassified as hostnames.
Expand legacy and encrypted VLESS coverage across peer transports, Vision transitions, session lifecycle, replay isolation, and chained connections, with Xray updated to 26.10.17. Preserve complete XHTTP HTTP/2 responses when peers gracefully stop an unfinished upload while continuing to reject truncated responses and incomplete packet uploads. Isolate the pinned sing-box server TLS 1.2 shutdown limitation in a test-only workaround, retaining an ignored reproducer and a reference to SagerNet/sing-vmess#16 for removal when the peer pin includes the fix.
Add named userspace WireGuard endpoints so Shoes can route inbound and outbound traffic through WireGuard without a kernel interface. Includes TCP/UDP forwarding, proxy-chain transports, reload lifecycle management, configuration validation, documentation, and dependency notices for release artifacts.
Add opt-in native VLESS Encryption with X25519 and ML-KEM key chains, authenticated record encryption, bounded session resumption, and native Vision support while preserving legacy TLS/REALITY behavior and outer transports. Include validated configuration, credential generation, examples, interoperability fixtures, and regression coverage.
Add standard HTTP/2 CONNECT to HTTP and mixed listeners and opt-in HTTP proxy clients, allowing concurrent TCP tunnels to share a connection while preserving legacy HTTP/1 and NaiveProxy behavior. Keep the H2 transport independent of NaiveProxy, preserve route isolation and per-stream authentication, require matching TLS ALPN for explicit H2 clients, and handle flow control, cancellation, and graceful shutdown. Include configuration documentation, an example, compatibility regressions, and interoperability coverage for sing-box, Mihomo, and the native Caddy-based Naive server.
Improve XHTTP transfer reliability under slow destinations and resource pressure with bounded packet pipelining, admission before body reads, queue-acceptance acknowledgements, and cancellation-safe session handling. Preserve reusable H1 uploads, correct H2/H3 finalization, add configurable receive windows and download-tail timeouts, validate effective request capacity, and expand Xray/Mihomo interoperability coverage with pinned peers in CI.
Adds Xray-compatible XHTTP/SplitHTTP with packet-up, stream-up, and stream-one modes over HTTP/1.1, HTTP/2, and HTTP/3, including REALITY and existing proxy chains. Bounded buffering, flow-control-aware admission, connection pooling, and inactivity-based timeouts maintain backpressure without imposing a minimum upload rate. Preserves TLS key-exchange and ML-DSA policies, adds configuration examples and interoperability coverage, and vendors an h3 fix to prevent empty DATA frames from truncating streams.
Prefer X25519MLKEM768 with X25519 fallback for modern REALITY compatibility, and add optional pinned ML-DSA-65 authentication with configuration fields and key generation. Harden handshake validation and preserve transparent forwarding for incompatible targets or clients, with migration documentation and pinned Xray interoperability coverage.
Add ordered native rustls key-exchange allowlists for TLS and QUIC. Hybrid-only configurations require TLS 1.3 without classical fallback or early data; omitted settings preserve existing defaults. Reject incompatible or ignored security settings, document configuration, and cover transport and Xray/sing-box interoperability.
Add sing-box coverage for padded, single-carrier h2mux over REALITY, including concurrent TCP/UDP traffic and idle reuse. Verify GOAWAY carrier replacement, Shoes stream draining, and the forced-close deadline, and run peer lifecycle coverage in CI. Distinguish successful recovery from active-stream preservation, which sing-box does not provide on GOAWAY.
Add coverage for buffered parsing, UDP fragment budgets, proxy handshakes, DNS fallback, and connection-capacity reuse. Fix dropped empty UDP replies and malformed HTTP CONNECT success-status acceptance, stabilize readiness timeout tests, run process contracts in regular CI, and add a manual kernel TUN workflow.
Close gaps around TUN wakeups, UDP routing, and concurrent traffic with deterministic wake/setup tests, rootless IPv4/IPv6 raw-FD coverage, and opt-in kernel tests for real IPv6 and mixed TCP/UDP progress. Add Linux host-FFI and macOS rootless CI coverage while keeping privileged device tests out of ordinary CI. Wait for Mihomo routing readiness to prevent startup packet loss in AnyTLS tests.
* Add mobile build artifacts for iOS and Android
- Add GitHub Actions workflow to build XCFramework (iOS) and AAR (Android)
and publish them to GitHub releases on tag pushes
- Add scripts/build-ios.sh and scripts/build-android.sh for local builds
- Add android/ project (Gradle library module with Kotlin JNI wrapper)
- Add include/shoes.h C header for FFI consumers
- Gitignore /output build directory
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Fix Android JNI build: pin jni to 0.21, use --locked
The committed Cargo.toml had `jni = "*"` which resolved to jni 0.22.4 in
CI. jni 0.22 renamed JNIEnv to EnvUnowned, breaking the Android FFI code
written for the 0.21 API.
- Pin jni to "=0.21" (resolves to 0.21.1 via Cargo.lock)
- Add --locked to cargo ndk to enforce the lock file in CI
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Migrate Android JNI bindings to jni 0.22
jni 0.22 split JNIEnv into two types:
- EnvUnowned<'local> — FFI-safe type for native method signatures
- Env<'local> — high-level wrapper with get_string, new_string, etc.
Changes:
- Replace JNIEnv with EnvUnowned in all function signatures
- Use EnvUnowned::with_env() to access the Env inside each function
- Use Outcome enum (Ok/Err/Panic) from into_outcome() for error handling
- Replace new_global_ref return type: GlobalRef -> Global<JObject<'static>>
- Replace attach_current_thread() guard pattern with callback closure
- Replace &str method names/sigs with jni_str!/jni_sig! compile-time macros
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Auto-generate iOS C header with cbindgen
Replace hand-written include/shoes.h with cbindgen-generated output.
The header is now derived from doc comments on extern "C" functions
in src/ffi/ios.rs, keeping it in sync with the Rust source.
- Add cbindgen.toml (exports only ProtectSocketCallback + FFI functions)
- build-ios.sh runs cbindgen before building the XCFramework
- CI installs cbindgen in the iOS job
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix clippy and rustfmt CI failures
- Reorder jni imports in ffi/android.rs to match rustfmt order
- Remove unnecessary `as usize` cast in shadow_tls_server_handler.rs
- Collapse match guard in config/validate.rs (clippy::collapsible_match)
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>