zhuizhuhaomeng Blog

「记录下来,一切都会更容易理解」

OpenResty Benchmark

upstream configuration 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 user nobody; worker_processes 2; worker_cpu_affinity 0010 0100; # bind to CPU1 and CPU2 error_log logs/error....

vulnerability scanning

1 2 3 4 yum install -y git make gcc golang git clone https://github.com/projectdiscovery/nuclei.git cd nuclei make

Nginx Mirror Request Keepalive 为什么不生效

在创建子请求的时候会设置 header_only,所以不会处理上游服务器的响应体 static ngx_int_t ngx_http_mirror_handler_internal(ngx_http_request_t *r) { ngx_str_t *name; ngx_uint_t i; n...

Inline SSL

Go 软件的一个好处就是没有依赖那么多的系统库,因此不会因为系统稍微变化就导致编译不过或者运行不起来的问题。 有时候我们为了减少 C 软件程序跟系统库的冲突,选择将一些库以静态编译的方式内联编译到目标软件。 将 OpenSSL 编译进目标软件就是一个很常见的例子。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 wget https://github.com/open...

为 OpenResty 编译 lua-gd

背景说明 lua-gd 也需要链接 luajit 才能被 OpenResty 使用,因此 luarocks 也需要重新编译。 编译 luarocks 1 2 3 4 5 6 7 8 9 10 11 sudo yum install patch gcc autoconf automake git wget wget https://luarocks.github.io/luarocks/...

和长辈闲谈 一

住在小城市,离老家很近,45 分钟的车程就可以回到老家。 而现在的社会很卷,平常很忙加上周末孩子培训,半年才回一次老家。 偶尔回老家一次,免不了这家坐一下那家坐一下,看看留守的老人,剩下和老父亲聊天的时间其实也非常的少。 聊天没有个主题,胡侃乱扯。女人擅长八卦,男人则谈天论地。 不知道怎么的突然讲到说现在还是有人捕捉鸟类。有的用网,有的用枪,还有用录音机的。 回想起来初中毕业那会儿去同学家...

crawler by lua-resty-http

The code of this crawler The crawler can not work in the real world. Just for fun! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 4...

Prepare abuild environment

prepare the environment See the code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 apk update apk add alpine-sdk build-base abuild apk-tools alpine-conf sudo adduser -D builder ...

selinux issues

查找 selinux 授权信息 1 ausearch --start 06/11/2024

prometheus 监控 nginx 请求

nginx/OpenResty 吐出数据 nginx 直接输出 prometheus 的格式可比再通过 nginx-prometheus-exporter 中转一次好多了。 nginx/OpenResty 吐出 Prometheus 格式的数据使用 https://github.com/knyar/nginx-lua-prometheus 这个库。但是也可以使用 https://gith...