77 Commits
Author SHA1 Message Date
Max Lv bff687bd34 Add Docker publishing, recommended installation and project history (#3052)
Document the shadowsocks-libev history and shadowsocks-c rename, and recommend Docker installation with mounted configuration and TCP/UDP port mappings.

Add native AMD64/ARM64 builds of the unprivileged static runtime image, real container relay and shutdown tests, and GHCR publication after both architecture checks pass. All 24 build/test checks pass at reviewed head 3f3f6bf8e01e5614821d1e15fda3ad8f07812902; publication is intentionally skipped on pull requests.
2026-09-11 16:22:30 +08:00
Max Lv bdc77408cb Rename to shadowsocks-c with libuv, async DNS and CI lint (#3051)
Rename the project to shadowsocks-c while retaining ss-* commands, the embedding ABI, and legacy library/package lookup compatibility.

Replace libev with bundled libuv for IOCP/kqueue event backends, expand asynchronous runtime DNS coverage, and add actionlint/Ruff with strict clang-tidy failure handling. Validate native platforms, static builds, packaging, interoperability, sanitizers, and canonical/legacy consumers.

All 22 hosted checks pass at reviewed head a8493250eb.
2026-09-11 14:18:37 +08:00
Max Lv 201e70c4bd Modernize C builds with offline dependencies and portable runtime helpers (#3050)
Bundle pinned offline dependencies, remove libcork/libipset and submodule requirements, and add portable runtime helpers with relocatable static/shared library installations.

Add Clang static build validation for Linux/musl, macOS and Windows, real TCP/UDP and SIP003 interoperability coverage, and recorded performance tradeoffs. All 21 hosted checks pass at the reviewed PR head 8d504e6218.
2026-09-11 13:42:11 +08:00
Max LvandClaude Opus 4.6 7bb250739e Modernize build: switch to CMake, add unit tests, fix man pages
* Modernize build: switch to CMake, add unit tests, fix man pages

Remove autotools (configure.ac, Makefile.am, m4/, autogen.sh) and make
CMake the sole build system. Enhance CMake with proper Find modules for
MbedTLS, libsodium, PCRE, and c-ares with version/feature detection.
Add support for connmarktos, nftables, stack protector, and MinGW.

Add 10 unit test suites (CTest) covering base64, buffer, cache, crypto,
jconf, json, netutils, ppbloom, rule, and utils modules. Add a Python
stress test measuring bandwidth per cipher with memory leak detection.

Fix man page typos ("Resovle" -> "Resolve"), document missing TCP buffer
options, fix ss-manager duplicate --executable entry, add example section
to ss-tunnel, and document --workdir and --nftables-sets options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Migrate from PCRE to PCRE2

Replace legacy PCRE (libpcre3) with PCRE2 (libpcre2-8). PCRE1 has been
end-of-life since 2021.

- src/rule.h: use pcre2_code and pcre2_match_data types
- src/rule.c: pcre_compile -> pcre2_compile, pcre_exec -> pcre2_match,
  pcre_free -> pcre2_code_free, with proper error message retrieval
- cmake/FindPCRE.cmake -> cmake/FindPCRE2.cmake: find libpcre2-8 via
  pkg-config, pcre2-config, or manual search
- Update all CMakeLists.txt, config.h.cmake, configure.cmake, README.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Update Dockerfiles: use CMake build and pcre2-dev

The alpine Dockerfile still used autotools (autogen.sh/configure) which
were removed. Switch to cmake build and replace pcre-dev with pcre2-dev.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix Docker build: disable tests and remove git dep

The tests/ directory is excluded by .dockerignore, so pass
-DBUILD_TESTING=OFF to cmake. Submodules are already checked out
by actions/checkout, no need for git inside the container.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix Docker build: disable static libs (not available in alpine)

Alpine's mbedtls-dev only provides shared libraries. Disable static
build since Docker only needs shared binaries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Rewrite GitHub Actions: build and test directly on runner

Replace Docker-based CI with direct cmake build on ubuntu-latest and
macos-latest. Install dependencies via apt/brew, build with cmake,
run unit tests with ctest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix CI: use mbedtls@3 on macOS, disable static build

- macOS: brew's mbedtls is now v4 (incompatible), use mbedtls@3
- Disable static build since CI runners lack static lib packages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix test build on Linux: add stdint.h and link libm

- test_ppbloom.c: add missing #include <stdint.h> for uint8_t
- test_json: link against libm for pow() used in json.c

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix test_ppbloom link: add libm for bloom's log()

On Linux, libbloom uses log() which requires explicit -lm linkage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix Linux build: link libm for test_buffer and test_crypto, fix warnings

Both test_buffer and test_crypto link libbloom.so which uses log() from
libm. Also fix unused variable warnings in test_json.c that would fail
with -Werror.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix Linux build: link libm for test_jconf (json.c uses pow)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* CI: add unit test and stress test steps to GitHub Actions

Split the Test step into separate "Unit tests" (ctest) and "Stress test"
(stress_test.py with 10MB transfer across all AEAD ciphers) steps for
better visibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 17:06:47 +08:00
vndroid 5fdb6624e3 Update
- Fix path error
2022-06-28 16:22:11 +08:00
vndroid c13c464604 Update
- Solve the problem of not being able to enter the container
- Execute strip after compilation
- Support multi-threaded compilation
2022-06-28 15:32:11 +08:00
Alexandre ABRIOUX e21f8248b6 fix: being able to use empty DNS_ADDRS with docker image 2022-04-11 08:32:33 +08:00
John 2a249b0bac added support for Docker secrets and password file in the Docker image
this means we no longer have to hardcode the password in the docker-compose file, and can treat the file as configuration rather than a secret.
2020-09-19 16:10:26 -02:30
cyber368 bab75a877a Update public libraries 2020-03-31 00:09:58 +08:00
mmx 57e0c9f924 Update Dockerfile set default timezone to UTC. 2020-03-20 16:28:48 +08:00
mmx b6ddbbe0b0 Add Dockerfile timezone, Update readme. 2020-03-20 14:20:28 +08:00
谭九鼎 21e3224ff1 readme(docker): remove "--fast-open" 2020-02-06 20:38:58 +08:00
Max Lv 74daa50e59 Fix #2565 #2566 2019-12-24 09:40:14 +08:00
David Osztertag 4c660f604f Set cap_net_bind_service for docker 2019-12-20 13:55:56 +01:00
Kebin Liu 2f61bac4c0 Update Dockerfile
Add ca-certificates for runtime dependency

When you use shadowsocks/shadowsocks-libev with [v2ray-plugin](https://github.com/shadowsocks/v2ray-plugin), it may occurs `x509: certificate signed by unknown authority` error.
2019-09-17 22:26:35 +08:00
Max Lv dc4742be4a Update mingw build scripts 2019-06-02 13:40:19 +08:00
Max Lv 0f55830b1d Remove default IPv6 and fast-open option in the dockerfile 2019-02-26 22:13:48 +08:00
Max Lv 4fb34de463 Use _aligned_malloc instead 2019-01-22 12:39:29 +08:00
edsgerlin 09762eda3f Docker: Support for IPv6 host, set default encryption method to GCM. 2018-09-10 15:35:49 +09:00
hwchan 00354513e6 Multipe nameservers support 2018-07-07 17:05:34 +08:00
Linus Yang 64100a1b22 Docker: speed up MinGW build by parallel make 2018-06-09 15:48:07 +08:00
Cheng Zhen 6ddbecc10f update image value.
Current setting will cause following error: `ERROR: pull access denied for shadowsocks-libev, repository does not exist or may require 'docker login'`, this update fixes this.
2018-05-27 10:14:16 +08:00
Dariush Alipour c3db67bce5 fixed docker -p flag syntax 2018-05-01 18:36:31 +04:30
zhuzeitou cb109a41fd Optimize Dockerfile, add SERVER_PORT back 2018-04-16 01:13:06 +08:00
Sah d70bba28f8 Docker: Dockerfile improvements
- Format adjustments
 - Fix error: missing runtime dependencies
2018-03-27 15:02:30 +02:00
Sah fdb6b6be3f Docker: optimize image size 2018-03-27 15:02:30 +02:00
Linus Yang af9dc106e3 MinGW: speed up docker build 2018-03-23 03:48:47 +08:00
Linus Yang f91f03e2e9 MinGW: update libcork and Docker script 2018-03-14 11:19:49 +08:00
Linus Yang cb369919a7 Compile plugin in Docker for MinGW 2018-03-14 09:58:28 +08:00
Linus Yang 735aeb41b8 Simplify Docker build on Windows 2018-03-10 17:03:38 +08:00
Linus Yang 2603dcbb4e Fix MinGW build using Docker 2018-03-08 22:54:10 +08:00
Linus Yang fd55773972 Use docker to build MinGW port 2018-03-08 18:10:28 +08:00
Sah 2a250d2e0a Update documents regarding dockerization
* Update README.md in docker/alpine
  - Replace contents with the usage of the image auto-built by Docker Cloud
  - Add descriptions on the customizable environment variables
* Update Dockerfile maintainer list

Refer to #1914
2018-02-10 12:46:10 +01:00
Sah a9a7d434ca Optimize Dockerfile
* Install rng-tools as runtime dependency
* Remove unnecessary 'git submodule update', as Docker Cloud runs 'git submodule update' after cloning the repository
* Replace variable SERVER_PORT with fixed port 8388, as it can't be customized with -e anyway
2018-02-10 12:45:54 +01:00
Sah ea571c3f41 Update Dockerfile to utilize Docker Cloud auto build
* Use the repository as context, instead of released .tar.gz
* Remove version information from Dockerfile, and let Docker Cloud handle it
* Add .dockerignore

Next steps:

1. Connect repository in Docker Cloud
2. Setup automated builds:
   - A push on `master` branch triggers build for `unstable` tag
   - A tag matching /^v[0-9]+(\.[0-9]+){2}$/ triggers build for a same-named tag

Refer to #1914
2018-02-08 18:31:18 +01:00
Sah (esaalii) 430839fbf0 Deprecate ubuntu-based docker image 2018-02-06 15:29:25 +01:00
Max Lv 85a64ae836 Bump version 2018-01-15 17:25:03 -08:00
Max Lv cba94db423 Bump version 2017-12-28 21:09:40 -08:00
玩牛牛 8a670546a2 Remove libtool to fix alpine 3.7 docker bug
Alpine 3.7 libtool pkg depends on bash pkg, this caused the compile hangs at "checking that generated files are newer than configure...", after check [this thread](https://forums.docker.com/t/problem-of-hanging-autoreconf/41015/3), I remove libtool and it works.
2017-12-03 23:03:19 +08:00
Max Lv 82198aece8 Bump version 2017-11-20 12:22:43 +08:00
Max Lv 69c41d9752 Bump version 2017-09-14 19:31:13 -07:00
Analyser 2a0f28bcfa Add missed package ca-certificates, automake, libmbedtls-dev.
fix these errors:

- ca-certificates missed
  fatal: unable to access
'https://github.com/shadowsocks/shadowsocks-libev.git/': Problem with
the SSL CA cert (path? access rights?)

- automake missed
  Can't exec "aclocal": No such file or directory at
/usr/share/autoconf/Autom4te/FileUtils.pm line 326.
  autoreconf: failed to run aclocal: No such file or directory
  
- libmbedtls-dev
  checking for mbedtls_cipher_setup in -lmbedcrypto... no
  configure: error: mbed TLS libraries not found.
2017-08-07 16:48:59 -07:00
Max Lv f1dd1354a9 Bump version 2017-07-27 11:22:27 +08:00
Secbone 4c88c72a66 delete duplicate code 2017-07-02 17:45:57 -05:00
Max Lv c11b2c08e4 Bump version 2017-06-27 14:17:53 +08:00
Jiewei Qian 42ce34518d Add ARGS env variable to alpine Dockerfile (#1537) 2017-06-21 00:57:02 -05:00
Max Lv bc96aed3b0 Bump version 2017-04-26 15:02:56 +08:00
Max Lv 48f5a3bec8 Bump version 2017-03-21 13:56:13 +08:00
Max Lv b725d575f2 Bump version 2017-03-16 14:21:11 +08:00
Max Lv 913dfd81e8 Bump version 2017-03-16 13:06:07 +08:00