Skip to content

Commit 6e95027

Browse files
dedokphuslu
authored andcommitted
Add: build stream module, only if ssl stream is enabled. Update: readme.md's support versions
1 parent 509a4e8 commit 6e95027

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ A high performance nginx module for ja3 and http2 fingerprint.
88

99
### Support Matrix
1010

11-
| | OpenSSL_1_1_1 | openssl-3.0 | openssl-3.1 | openssl-3.2 |
11+
| | OpenSSL_1_1_1 | openssl-3.0 | openssl-3.1 | openssl-3.2 | openssl-3.4 |
1212
| -----------| -------------------- | ----------- | ----------- | ----------- |
13+
-----|
1314
| nginx-1.20 |||||
1415
| nginx-1.21 |||||
1516
| nginx-1.22 |||||
1617
| nginx-1.23 |||||
1718
| nginx-1.24 |||||
1819
| nginx-1.25 |||||
20+
| nginx-1.27 | | | | | ||
1921

2022
## Configuration
2123

config

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ HTTP_MODULES="$HTTP_MODULES ngx_http_ssl_fingerprint_module"
1212

1313
stream_module=""
1414

15-
if [ $STREAM_SSL_PREREAD = YES ]; then
15+
if [ $STREAM_SSL = YES ]; then
16+
echo "[+] ngx_stream_ssl_fingerprint_preread_module included"
1617
STREAM_MODULES="ngx_stream_ssl_fingerprint_preread_module $STREAM_MODULES"
1718
stream_module="$ngx_addon_dir/src/ngx_stream_ssl_fingerprint_preread_module.c"
19+
else
20+
echo "[-] ngx_stream_ssl_fingerprint_preread_module will no be compiled"
1821
fi
1922

2023
NGX_ADDON_SRCS="$NGX_ADDON_SRCS \

src/ngx_stream_ssl_fingerprint_preread_module.c

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11

22
/*
3-
* Please make sure that you have been incuded --with-streams before --add-module
4-
* Else this module won't be compiled
3+
* Please make sure that you have been incuded --with-streams_ssl_moduke
4+
* before --add-module Else this module won't be compiled
55
*/
6-
#if (NGX_STREAM_SSL)
76

87
#include <ngx_config.h>
98
#include <ngx_core.h>
@@ -27,15 +26,15 @@ static ngx_stream_module_t ngx_stream_ssl_fingerprint_preread_module_ctx = {
2726
ngx_module_t ngx_stream_ssl_fingerprint_preread_module = {
2827
NGX_MODULE_V1,
2928
&ngx_stream_ssl_fingerprint_preread_module_ctx, /* module context */
30-
NULL, /* module directives */
31-
NGX_STREAM_MODULE, /* module type */
32-
NULL, /* init master */
33-
NULL, /* init module */
34-
NULL, /* init process */
35-
NULL, /* init thread */
36-
NULL, /* exit thread */
37-
NULL, /* exit process */
38-
NULL, /* exit master */
29+
NULL, /* module directives */
30+
NGX_STREAM_MODULE, /* module type */
31+
NULL, /* init master */
32+
NULL, /* init module */
33+
NULL, /* init process */
34+
NULL, /* init thread */
35+
NULL, /* exit thread */
36+
NULL, /* exit process */
37+
NULL, /* exit master */
3938
NGX_MODULE_V1_PADDING
4039
};
4140

@@ -170,9 +169,3 @@ ngx_stream_ssl_fingerprint_preread_init(ngx_conf_t *cf)
170169
return NGX_OK;
171170
}
172171

173-
#else
174-
# pragma message "nginx-ssl-fingerprint: "
175-
# pragma message "disabled for ngx_stream or ngx_ssl_stream. Please add --with-streams with ssl support, "
176-
# pragma message "if you wish to enable it"
177-
#endif /** NGX_STREAM_SSL */
178-

0 commit comments

Comments
 (0)