Skip to content

Rename to shadowsocks-c with libuv, async DNS and CI lint - #3051

Merged
madeye merged 4 commits into
masterfrom
feature/libuv-dns-lint
Sep 11, 2026
Merged

madeye merged 4 commits into
masterfrom
feature/libuv-dns-lint

Conversation

@madeye

@madeye madeye commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Rename the project to shadowsocks-c and replace its event backend with libuv while preserving existing command names and library consumers.

Replace libev with pinned, bundled libuv 1.52.1 so Windows socket polling uses IOCP and macOS uses kqueue. Keep protocol callbacks behind a small internal event API that shares one poll handle per socket and allows watchers to stop/free during callbacks.

Runtime hostname resolution uses c-ares asynchronously for client ACL bypass and server manager updates, alongside existing TCP/UDP destination lookups. DNS socket watchers grow dynamically instead of reusing a fixed six-slot array. Numeric-only address helpers reject hostnames rather than silently performing blocking DNS. Initial configuration/listener/proxy-address resolution remains synchronous before serving traffic.

Add backend and delayed-DNS tests covering 256 sockets, watcher lifetime, A/AAAA results, NXDOMAIN, cancellation, exactly-once callbacks and timer progress. Native macOS/Windows and other portability jobs run hostname ACL integration with an unreachable proxy upstream, so successful transfers prove direct resolution. Update static library exports and system build dependencies for libuv. Keep libuv platform headers private to avoid Linux TCP-header conflicts. Apply a documented, checked Windows CPU-info type fix to extracted libuv sources; the pinned archive remains unchanged.

Add pinned actionlint/Ruff CI checks. Strengthen the zero-warning clang-tidy job to fail on tool/compiler errors and retain full diagnostics as artifacts.

Validation:

  • Local macOS: all 35 CTest cases pass; 19 project tests also pass under ASan/UBSan.
  • Both hostname ACL bypass policies pass normally and under sanitizers; six-method TCP/UDP self-relay with SIP003 passes.
  • Installed system-mode static/shared consumers link and run; Windows x86-64 programs, libraries and tests cross-compile with Zig.
  • Actionlint 1.7.12, Ruff 0.15.6 and Homebrew LLVM 22 clang-tidy pass with zero findings. Project builds treat warnings as errors.
  • Local Docker Clang/musl ARM64: fully static outputs pass 33 unit/vendor tests, six-method TCP/UDP relay and both hostname ACL policies with networking disabled.
  • Hosted CI validates native Windows IOCP, macOS kqueue, Linux/FreeBSD, static outputs and pinned clang-tidy-18; all 22 checks pass on a849325.

New builds expose libshadowsocks-c and CMake/pkg-config package shadowsocks-c. Install legacy library filename aliases and package lookup wrappers, retaining the shadowsocks.h ABI and ss-* commands. Source archives, displayed branding, license paths and the primary manual use the new name. Configuration paths, Debian package/service identifiers and current GitHub URLs remain compatible.

Both new and legacy CMake consumers and static pkg-config consumers pass locally. A previously built macOS shared consumer runs against the renamed installation. Windows cross-builds install canonical and legacy libraries; CI exercises both sets of consumer filenames on Windows, Linux and macOS. All 22 hosted checks pass on the renamed head a849325, including native Windows GCC/Clang, macOS, Linux, FreeBSD, Debian packaging and legacy consumers.

Native MSVC remains unsupported. No event-backend performance improvement is claimed.

@madeye madeye changed the title Replace libev with libuv, expand async DNS and enforce CI lint Rename to shadowsocks-c with libuv, async DNS and CI lint Sep 11, 2026
@madeye
madeye merged commit bdc7740 into master Sep 11, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant