Commit Graph
474 Commits
Author SHA1 Message Date
cfal 758bfbb7c4 test(anytls): verify large padding schemes with current sing-box peers 2026-10-31 10:59:40 +00:00
cfal 2c8472f3c0 fix(vless): carry Vision UDP through opaque MUX and XUDP framing 2026-10-31 10:59:39 +00:00
cfal 79ffae11f3 fix(hysteria2): route each UDP packet and preserve relay reply sources 2026-10-31 10:59:39 +00:00
cfal 57430133dd refactor(xudp): share bounded whole-frame decoding with client adapters 2026-10-31 10:59:39 +00:00
cfal f3f2b9eb7e fix(tuic): retain pre-auth streams and route each UDP destination 2026-10-31 10:59:39 +00:00
cfal 06d5192c87 fix(vision): split oversized padding frames and bound accepted writes 2026-10-31 10:59:39 +00:00
cfal ef0e7612b8 fix(handshake): preserve hop identity and validate WebSocket upgrades 2026-10-31 10:59:38 +00:00
cfal 798fdda201 fix(socks): advertise the control connection's local UDP endpoint 2026-10-31 10:59:04 +00:00
cfal 212d50cabb fix(proxy): flush terminal failures and validate SOCKS hostname lengths 2026-10-31 10:59:04 +00:00
cfal 4b49092e48 fix(anytls): share validated padding updates and bound wire records 2026-10-31 10:59:03 +00:00
cfal c710dfbcd5 fix(vmess): emit UDP padding without advancing state on rejection 2026-10-31 10:59:03 +00:00
cfal 0094b1b5ff fix(streams): reject oversized messages and consume empty ShadowTLS records 2026-10-31 10:59:03 +00:00
cfal e35e1fe790 refactor(stream): preserve local endpoints through protocol wrappers 2026-10-31 10:59:02 +00:00
cfal e256448109 fix(tun): reject fragmented IPv4 UDP packets 2026-10-31 10:58:55 +00:00
cfal 96f45f0a01 fix(xudp): isolate and bound metadata decoding 2026-10-31 10:58:54 +00:00
cfal 6888329d14 Add WebSocket early-data support (#250)
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.
2026-10-31 18:39:17 +08:00
cfal e0282cf72c Add native Hysteria2 and TUIC clients (#249)
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.
2026-10-31 16:56:16 +08:00
cfal 1fac4c231c Add Xray-compatible Sudoku TCP masking (#246)
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.
2026-10-30 22:58:56 +08:00
cfal 829625ad2c Simplify TLS read/write ownership (#245)
* Make TLS protocol handoff flushes explicit

* Keep TLS reads independent of writes
2026-10-30 16:19:52 +08:00
cfal 7460f5d046 Add managed Linux desktop TUN capture (#241)
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.
2026-10-30 15:07:46 +08:00
cfal 09f09bf611 Fix lost TLS writer wakeups (#244)
* Fix split-task readiness during TLS read-driven flushes

Preserve original reader and writer registrations behind a shared readiness dispatcher. Keep internal receive, drain and flush helpers non-registering, and wake parked writers on read-driven progress or fatal receive errors without adding write-side self-wakes.

Cover ordinary TLS, REALITY, raw handoff, vectored writes, control-operation readiness, reader cancellation and terminal errors. Extract the fix and later TLS test cleanups from 5f475063 and f83bc0f1 without the Sudoku-only test cases.

* Simplify TLS readiness regression tests
2026-10-30 11:55:41 +08:00
cfal 4fcbd7c776 Fix resolver refresh after DNS transport failures (#242)
Preserve Hickory transport error kinds during hostname lookups so the existing resolver refresh and retry policy handles timeouts and unavailable connections. Reuse the shared error conversion and cover transport recovery, cached success, and NXDOMAIN responses without unnecessary refresh.
2026-10-29 15:20:08 +08:00
cfal e4db054f9f Use 8 MiB UDP buffers across QUIC endpoints (#240)
Raise the configurable QUIC socket-buffer default to 8 MiB and apply it consistently to listeners, outbound proxies, and DNS-over-HTTP/3. Keep tuning best-effort under OS limits, normalize Linux readbacks, suppress repeated warnings, and document kernel settings and reload behavior.
2026-10-28 23:25:51 +08:00
cfal c3453ef1ab Add ARMv7 release builds and verified artifact packaging (#239)
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.
2026-10-28 12:29:58 +08:00
cfal 201ba24ca8 Refresh smoltcp fork to current upstream (#238) 2026-10-28 10:12:44 +08:00
cfal 3737e07467 Prepare v0.3.6 release v0.3.6 2026-10-27 03:18:26 +00:00
cfal 33bbea93e4 Refresh dependencies and build tooling (#235)
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.
2026-10-27 10:43:07 +08:00
cfal c05f92d65b Fix REALITY handshakes with minimal EncryptedExtensions (#236)
REALITY connections fail when the cover target uses a minimal 28-byte EncryptedExtensions record because rustls adds an SNI acknowledgement that no longer fits. Pin the stable-release rustls fork that omits this acknowledgement only for REALITY, update the cover fixtures to use minimal records, and add regression coverage for successful handshakes and rejection of undersized records. Ordinary TLS behavior and strict record-capacity checks remain unchanged.
2026-10-27 09:42:50 +08:00
cfal 739e2ea91e Extract large unit-test suites into adjacent modules (#234)
Move 37 large unit-test suites into adjacent child modules to keep production files easier to navigate while preserving access to private implementation details. Small suites remain inline and integration tests stay separate. Remove unused fixture parameters and duplicate helpers, and clarify configuration test setup without changing test coverage or behavior.
2026-10-26 22:27:54 +08:00
cfal 881b0472ab Prepare version 0.3.5 v0.3.5 2026-10-26 13:45:46 +00:00
cfal 2401917d0e Add ordered health-checked fallback groups (#232)
Add opt-in fallback groups that route new flows through the first healthy eligible path and fail closed when no path remains, without overriding manual selections or replaying traffic. Reuse the shared probe engine with bounded generation-owned scheduling, resolver-aware path identity and reload cleanup, and reject transport combinations that cannot reliably attribute health to a concrete path.
2026-10-26 19:26:28 +08:00
cfal 8f52f98103 Support SS2022 client identity key chains (#233)
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.
2026-10-26 18:39:44 +08:00
cfal 38523d65ed Add performance reports, Linux coverage, and rule property tests (#228)
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.
2026-10-26 16:50:44 +08:00
cfal f94fa61e36 Make native DNS cache freshness explicit (#227)
Add a system-only native_cache_secs option for configurable OS/NSS application memoization while preserving the existing 60-second implicit default and uncached explicit system behavior. Disable completed-cache reads and writes for zero windows, reject invalid DNS options, and document freshness and lookup-sharing semantics.
2026-10-26 14:56:33 +07:00
cfal b821c56f86 Add opt-in connection notes (#226)
Expose bounded setup, routing, and DNS notes in existing `/connections` responses so dashboards can explain active connections without a separate debug API or retained history. Add the default-off `connection_notes` controller setting and bounded per-connection storage while preserving existing connection metadata and forwarding behavior.
2026-10-26 14:56:33 +07:00
cfal 51fbd24ceb Improve strict configuration diagnostics (#225)
Make configuration failures easier to locate without weakening validation: add configuration-entry and rule context, preserve native YAML error locations, and identify input files in validation errors. Reject previously ignored unknown fields in named PEM entries and TCP settings, clarify diagnostic limits and upgrade requirements, and add coverage for strict parsing, representative configurations, and offline validation behavior.
2026-10-26 14:56:33 +07:00
cfal 4ab9e8714c Add bounded background file logging (#224)
Move file I/O onto dedicated per-sink workers so slow storage does not stall relay threads. Bound pending records and escaped bytes, drop newest records on overload with health counters, and preserve FIFO ordering and flush barriers. Integrate bounded shutdown and reusable file-sink ownership with CLI and mobile FFI while preserving sanitization and existing log formatting.
2026-10-25 23:26:11 -04:00
cfal c112f00ea9 Fix fixture startup flakes and DNS connection-close failover (#222)
Retain fixture ports until listener handoff, await Shoes readiness before starting dependent peers, and settle native watcher setup notifications before activation assertions. Pin Hickory 0.26.3 to a connection-close recovery backport that preserves typed H3 errors and healthy-upstream failover without widening retry limits.
2026-10-25 11:13:14 -04:00
cfal 5fdbe696c5 Make reload rollback safe and release TCP setup state (#219)
* Release setup-only routing owners before TCP relay

* Restore failed reloads and retain unchanged TCP listener sockets

* Simplify reload activation and listener lifecycle code

* Reject duplicate fixed TCP addresses during direct startup

* Preserve inherited TUN descriptors across rejected reloads

* Defer overlapping TCP listeners until retirement

* Document reload rollback and listener retention

* Exercise retained TCP sockets in lifecycle retention regression
2026-10-25 07:50:31 -04:00
cfal b0b30617a2 Add automatic URL-test upstream groups (#221)
Add URL-scoped health and delay-based upstream selection so new connections can use healthy, transport-compatible proxies without requiring a controller listener. This introduces strict client_group.type configuration in place of strategy, bounded automatic probes with lazy activity tracking and reload fencing, controller reporting, and configuration documentation. It also preserves local failure attribution through outbound HTTP/2 adapters so local resource limits do not incorrectly penalize proxy health.
2026-10-24 23:52:28 -04:00
cfal 1e02a9887b Add retention and reload lifetime regressions (#218)
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.
2026-10-24 22:53:56 -04:00
cfal a40aae55cc Improve native DNS caching and coalesce concurrent lookups (#220)
Share native resolver cache entries across destination ports and coalesce concurrent misses with bounded, cancellation-safe ownership. Preserve ordered address candidates, caller ports, and error details while using a conservative 60-second result-age policy rather than a DNS record TTL. Cover cancellation, expiry, failure, and capacity limits with deterministic tests and document the default behavior and trade-offs.
2026-10-24 20:44:33 -04:00
cfal f6abcd8245 Add ACME certificates and live TLS/QUIC rotation (#217)
Add shared file and ACME certificate sources for automatic issuance, renewal, and live TLS/QUIC rotation without interrupting existing connections. Support HTTP-01 and TLS-ALPN-01, durable retry and account state, and CLI/FFI lifecycle handoffs. Extend live rotation to existing file-backed identities and document stricter certificate validation requirements.
2026-10-24 06:17:31 -04:00
cfal fb1fa5b8bb Upgrade Tokio to fix Interval timer race (#216) v0.3.4 2026-10-24 04:33:18 -04:00
cfal aa20a6cffd Finalize version 0.3.4 release notes 2026-10-24 07:05:35 +00:00
cfal a361e69b77 Publish multiarchitecture Shoes images to GHCR (#215)
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.
2026-10-23 22:30:44 -04:00
cfal 38db23f27d Log Clash controller startup and allow wildcard CORS (#214)
Make Clash controller endpoints visible at startup and allow dashboards from any origin when explicitly configured with `cors_origins: ["*"]`. Startup messages include TCP addresses or Unix socket paths, while wildcard CORS preserves authentication and preflight restrictions; controller configuration changes still require a restart.
2026-10-23 21:29:52 -04:00
cfal fbcc5f9d46 Add Clash API and runtime proxy selectors (#213)
Expose runtime proxy selection and connection visibility without restarting Shoes. This adds an opt-in authenticated Clash-compatible TCP/Unix API, persistent selector choices, traffic and connection statistics, delay probes, live logs, and per-flow cancellation, with reload-aware integration across proxy protocols, DNS, and TUN.
2026-10-23 17:50:36 -04:00
cfal a72cc7f0bb Expand test coverage and fix the protocol bugs it exposed (#212)
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.
2026-10-23 06:18:10 -04:00
cfal c24bdf8be5 Organize REALITY modules and tests (#211)
Clarifies the fork-backed REALITY code layout by naming modules after their responsibilities, colocating client and server handlers, and grouping shared fixtures and handshake tests under src/reality/tests. Keeps the reality_ filename prefixes and preserves protocol behavior while reusing existing helpers and simplifying imports.
2026-10-22 19:34:05 -04:00