Commit Graph
25 Commits
Author SHA1 Message Date
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
edsgerlin a87b490a94 Add gcc back to travis. 2018-09-15 00:51:49 +09:00
Max Lv 0ec3e648bf Update .travis 2017-08-31 13:53:08 +08:00
wangxufire 61e145140d trigger macOS build
trigger macOS build

trigger macOS build

trigger macOS build

trigger macOS build

trigger macOS build

trigger macOS build
2017-07-09 23:36:59 -05:00
Baiyi "Patrick" Liao e164ac0a01 Improve Travis (#1452)
* Improve Travis

Faster booting with "sudo : required"...Newer environment (i.e. higher GCC version) for more stable builds.

* Improve Speed #2

* Improve Speed #3

Improved based on the log of last build
2017-04-17 09:50:39 +08:00
Max Lv 70873ef83d Update cmake for travis-ci 2017-03-19 17:39:31 +08:00
Max Lv 087bfe7f91 Stop the timer properly 2017-03-19 17:19:49 +08:00
Max Lv f2b585a00b Enable shared libraries in Travis CI 2017-03-16 15:00:00 +08:00
Max Lv 69e5e1284e Update travis CI 2017-03-16 14:39:18 +08:00
wener 95a8a4db50 Add missing ss-redir install; Remove cmake build success echo. 2017-02-18 02:43:30 +08:00
wener 47acac3b8c Add cmake to ci 2017-02-18 02:23:32 +08:00
Max Lv 889079e69b Replace the URL for libsodium 2017-02-13 10:50:40 +08:00
Max Lv 0bb3739286 Update travis-ci 2017-02-01 12:56:59 +08:00
Max Lv 3b2a5d1a1f Fix SNI parser 2017-01-31 18:41:57 +08:00
Max Lv b0e00b4044 Fix mbed TLS's URL 2017-01-31 16:51:52 +08:00
Max Lv 32057ed3c5 Fix key sizes 2017-01-31 16:22:33 +08:00
Mygod 37594afb5d Use libsodium tarball to ensure reproducible build in Travis (#1153) 2017-01-31 16:13:43 +08:00
Kim 51785ece25 fix shared lib search path issue (#1109)
The shared lib file, libsodium.so, could not be found in default share object file path.

The default libsodium.git install files into /usr/local/lib, which is NOT found by system defaults.
2017-01-21 18:19:57 +08:00
Max Lv 7eb7898e1b Update scripts for travis-ci 2017-01-18 12:07:23 +08:00
Max Lv c9890756c1 Update scripts for travis-ci 2017-01-18 11:58:35 +08:00
Max Lv 1f5b0eacf2 Fix dependency issue 2016-07-04 18:32:48 +08:00
Max Lv 2643de44f2 Clean up 2016-07-04 18:23:17 +08:00
Max Lv 659f845bf9 build with libev 2014-10-22 14:44:47 +08:00
Max Lv bb3cd6cf3b try to fix libev 2013-03-15 14:17:07 +08:00
Max Lv e28a8bb2be add travis 2013-03-15 14:13:45 +08:00